| | |
| | | import com.gitblit.models.RepositoryModel;
|
| | | import com.gitblit.models.ServerSettings;
|
| | | import com.gitblit.models.ServerStatus;
|
| | | import com.gitblit.models.SettingModel;
|
| | | import com.gitblit.models.UserModel;
|
| | | import com.google.gson.reflect.TypeToken;
|
| | |
|
| | |
| | | public static final Type NAMES_TYPE = new TypeToken<Collection<String>>() {
|
| | | }.getType();
|
| | |
|
| | | public static final Type SETTINGS_TYPE = new TypeToken<Collection<SettingModel>>() {
|
| | | public static final Type SETTINGS_TYPE = new TypeToken<Map<String, String>>() {
|
| | | }.getType();
|
| | |
|
| | | private static final Type REPOSITORIES_TYPE = new TypeToken<Map<String, RepositoryModel>>() {
|
| | |
| | | }.getType();
|
| | |
|
| | | private static final Type SETS_TYPE = new TypeToken<Collection<FederationSet>>() {
|
| | | }.getType();
|
| | |
|
| | | private static final Type BRANCHES_TYPE = new TypeToken<Map<String, Collection<String>>>() {
|
| | | }.getType();
|
| | |
|
| | | /**
|
| | |
| | | }
|
| | |
|
| | | /**
|
| | | * Retrieves a map of all branches in the Gitblit server keyed by
|
| | | * repository.
|
| | | * |
| | | * @param serverUrl
|
| | | * @param account
|
| | | * @param password
|
| | | * @return
|
| | | * @throws IOException
|
| | | */
|
| | | public static Map<String, Collection<String>> getAllBranches(String serverUrl,
|
| | | String account, char[] password) throws IOException {
|
| | | String url = asLink(serverUrl, RpcRequest.LIST_BRANCHES);
|
| | | Map<String, Collection<String>> allReferences = JsonUtils.retrieveJson(url,
|
| | | BRANCHES_TYPE, account, password);
|
| | | return allReferences;
|
| | | }
|
| | |
|
| | | /**
|
| | | * Do the specified administrative action on the Gitblit server.
|
| | | *
|
| | | * @param request
|