From 6c5511020457c39961d069071ac60f7140ec724f Mon Sep 17 00:00:00 2001
From: Lukasz Jader <ljaderdev@gmail.com>
Date: Wed, 19 Sep 2012 16:24:10 -0400
Subject: [PATCH] Update polish translation of EmptyRepositoryPage

---
 src/com/gitblit/utils/FederationUtils.java |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/src/com/gitblit/utils/FederationUtils.java b/src/com/gitblit/utils/FederationUtils.java
index 324aa67..4d6060d 100644
--- a/src/com/gitblit/utils/FederationUtils.java
+++ b/src/com/gitblit/utils/FederationUtils.java
@@ -38,6 +38,7 @@
 import com.gitblit.models.FederationModel;
 import com.gitblit.models.FederationProposal;
 import com.gitblit.models.RepositoryModel;
+import com.gitblit.models.TeamModel;
 import com.gitblit.models.UserModel;
 import com.google.gson.reflect.TypeToken;
 
@@ -56,6 +57,9 @@
 	}.getType();
 
 	private static final Type USERS_TYPE = new TypeToken<Collection<UserModel>>() {
+	}.getType();
+
+	private static final Type TEAMS_TYPE = new TypeToken<Collection<TeamModel>>() {
 	}.getType();
 
 	private static final Logger LOGGER = LoggerFactory.getLogger(FederationUtils.class);
@@ -281,6 +285,21 @@
 	}
 
 	/**
+	 * Tries to pull the gitblit team definitions from the remote gitblit
+	 * instance.
+	 * 
+	 * @param registration
+	 * @return a collection of TeamModel objects
+	 * @throws Exception
+	 */
+	public static List<TeamModel> getTeams(FederationModel registration) throws Exception {
+		String url = asLink(registration.url, registration.token, FederationRequest.PULL_TEAMS);
+		Collection<TeamModel> models = JsonUtils.retrieveJson(url, TEAMS_TYPE);
+		List<TeamModel> list = new ArrayList<TeamModel>(models);
+		return list;
+	}
+
+	/**
 	 * Tries to pull the gitblit server settings from the remote gitblit
 	 * instance.
 	 * 
@@ -295,6 +314,19 @@
 	}
 
 	/**
+	 * Tries to pull the referenced scripts from the remote gitblit instance.
+	 * 
+	 * @param registration
+	 * @return a map of the remote gitblit scripts by script name
+	 * @throws Exception
+	 */
+	public static Map<String, String> getScripts(FederationModel registration) throws Exception {
+		String url = asLink(registration.url, registration.token, FederationRequest.PULL_SCRIPTS);
+		Map<String, String> scripts = JsonUtils.retrieveJson(url, SETTINGS_TYPE);
+		return scripts;
+	}
+
+	/**
 	 * Send an status acknowledgment to the remote Gitblit server.
 	 * 
 	 * @param identification

--
Gitblit v1.9.1