| | |
| | | import com.gitblit.Constants;
|
| | | import com.gitblit.Constants.RpcRequest;
|
| | | import com.gitblit.GitBlitException.UnknownRequestException;
|
| | | import com.gitblit.models.FederationModel;
|
| | | import com.gitblit.models.FederationProposal;
|
| | | import com.gitblit.models.FederationSet;
|
| | | import com.gitblit.models.FeedModel;
|
| | | import com.gitblit.models.RegistrantAccessPermission;
|
| | | import com.gitblit.models.RepositoryModel;
|
| | | import com.gitblit.models.ServerSettings;
|
| | | import com.gitblit.models.ServerStatus;
|
| | | import com.gitblit.models.TeamModel;
|
| | | import com.gitblit.models.UserModel;
|
| | | import com.gitblit.models.*;
|
| | | import com.google.gson.reflect.TypeToken;
|
| | |
|
| | | /**
|
| | |
| | |
|
| | | }
|
| | |
|
| | | /**
|
| | | /**
|
| | | * Create a fork of an already existing repo
|
| | | *
|
| | | * @param repository
|
| | | * @param user
|
| | |
|
| | | * @return true if the action succeeded
|
| | | * @throws IOException
|
| | | */
|
| | | public static boolean forkRpository(RepositoryModel repository, UserModel user, String serverUrl,
|
| | | String account, char[] password) throws IOException {
|
| | | UserRepositoryCompositeModel userRepositoryCompositeModel = new UserRepositoryCompositeModel();
|
| | | userRepositoryCompositeModel.setRepositoryModel(repository);
|
| | | userRepositoryCompositeModel.setUserModel(user);
|
| | | return doAction(RpcRequest.FORK_REPOSITORY, null, userRepositoryCompositeModel, serverUrl, account, password);
|
| | | }
|
| | |
|
| | |
|
| | | /**
|
| | | * Send a revised version of the repository model to the Gitblit server.
|
| | | *
|
| | | * @param repository
|
| | |
| | | }
|
| | |
|
| | | /**
|
| | | * Reindex all tickets on the Gitblit server.
|
| | | *
|
| | | * @param serverUrl
|
| | | * @param account
|
| | | * @param password
|
| | | * @return true if the action succeeded
|
| | | * @throws IOException
|
| | | */
|
| | | public static boolean reindexTickets(String serverUrl, String account,
|
| | | char[] password) throws IOException {
|
| | | return doAction(RpcRequest.REINDEX_TICKETS, null, null, serverUrl, account,
|
| | | password);
|
| | | }
|
| | |
|
| | | /**
|
| | | * Reindex tickets for the specified repository on the Gitblit server.
|
| | | *
|
| | | * @param serverUrl
|
| | | * @param repositoryName
|
| | | * @param account
|
| | | * @param password
|
| | | * @return true if the action succeeded
|
| | | * @throws IOException
|
| | | */
|
| | | public static boolean reindexTickets(String serverUrl, String repositoryName,
|
| | | String account, char[] password) throws IOException {
|
| | | return doAction(RpcRequest.REINDEX_TICKETS, repositoryName, null, serverUrl,
|
| | | account, password);
|
| | | }
|
| | |
|
| | | /**
|
| | | * Create a user on the Gitblit server.
|
| | | *
|
| | | * @param user
|