Add and document REINDEX_TICKETS rpc request type
| | |
| | | public static enum RpcRequest {
|
| | | // Order is important here. anything above LIST_SETTINGS requires
|
| | | // administrator privileges and web.allowRpcManagement.
|
| | | CLEAR_REPOSITORY_CACHE, GET_PROTOCOL, LIST_REPOSITORIES, LIST_BRANCHES, GET_USER, LIST_SETTINGS,
|
| | | CLEAR_REPOSITORY_CACHE, REINDEX_TICKETS, GET_PROTOCOL, LIST_REPOSITORIES, LIST_BRANCHES, GET_USER, LIST_SETTINGS,
|
| | | CREATE_REPOSITORY, EDIT_REPOSITORY, DELETE_REPOSITORY,
|
| | | LIST_USERS, CREATE_USER, EDIT_USER, DELETE_USER,
|
| | | LIST_TEAMS, CREATE_TEAM, EDIT_TEAM, DELETE_TEAM,
|
| | |
| | |
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | public static final int PROTOCOL_VERSION = 6;
|
| | | public static final int PROTOCOL_VERSION = 7;
|
| | |
|
| | | private IStoredSettings settings;
|
| | |
|
| | |
| | | } else {
|
| | | response.sendError(notAllowedCode);
|
| | | }
|
| | | } else if (RpcRequest.REINDEX_TICKETS.equals(reqType)) {
|
| | | if (allowManagement) {
|
| | | if (StringUtils.isEmpty(objectName)) {
|
| | | // reindex all tickets
|
| | | gitblit.getTicketService().reindex();
|
| | | } else {
|
| | | // reindex tickets in a specific repository
|
| | | RepositoryModel model = gitblit.getRepositoryModel(objectName);
|
| | | gitblit.getTicketService().reindex(model);
|
| | | }
|
| | | } else {
|
| | | response.sendError(notAllowedCode);
|
| | | }
|
| | | }
|
| | |
|
| | | // send the result of the request
|
| | |
| | | }
|
| | |
|
| | | /**
|
| | | * 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
|
| | |
| | | <tr><td>Gitblit v1.1.0</td><td>4</td></tr>
|
| | | <tr><td>Gitblit v1.2.0+</td><td>5</td></tr>
|
| | | <tr><td>Gitblit v1.3.1+</td><td>6</td></tr>
|
| | | <tr><td>Gitblit v1.4.0+</td><td>7</td></tr>
|
| | | </tbody>
|
| | | </table>
|
| | |
|
| | |
| | | <tr><td>SET_REPOSITORY_TEAM_PERMISSIONS</td><td>repository name</td><td><em>admin</em></td><td>5</td><td>List<String></td><td>-</td></tr>
|
| | | <tr><td>LIST_SETTINGS</td><td>-</td><td><em>admin</em></td><td>1</td><td>-</td><td>ServerSettings (management keys)</td></tr>
|
| | | <tr><td>CLEAR_REPOSITORY_CACHE</td><td>-</td><td><em>-</em></td><td>4</td><td>-</td><td>-</td></tr>
|
| | | <tr><td>REINDEX_TICKETS</td><td>repository name</td><td><em>-</em></td><td>7</td><td>-</td><td>-</td></tr>
|
| | | <tr><td colspan='6'><em>web.enableRpcAdministration=true</em></td></tr>
|
| | | <tr><td>LIST_FEDERATION_REGISTRATIONS</td><td>-</td><td><em>admin</em></td><td>1</td><td>-</td><td>List<FederationModel></td></tr>
|
| | | <tr><td>LIST_FEDERATION_RESULTS</td><td>-</td><td><em>admin</em></td><td>1</td><td>-</td><td>List<FederationModel></td></tr>
|