summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/servlet
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-03-06 13:38:12 -0500
committerJames Moger <james.moger@gitblit.com>2014-03-06 13:38:12 -0500
commit88693e491b0d929b6b3f5783d11126fce87b1370 (patch)
tree6cf89f7fa51cd838883599d5b474064098ab1841 /src/main/java/com/gitblit/servlet
parent9883341c1fbb35abcb7a1d09f93f6a9e805ea551 (diff)
downloadgitblit-88693e491b0d929b6b3f5783d11126fce87b1370.tar.gz
gitblit-88693e491b0d929b6b3f5783d11126fce87b1370.zip
Add and document REINDEX_TICKETS rpc request type
Diffstat (limited to 'src/main/java/com/gitblit/servlet')
-rw-r--r--src/main/java/com/gitblit/servlet/RpcServlet.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/main/java/com/gitblit/servlet/RpcServlet.java b/src/main/java/com/gitblit/servlet/RpcServlet.java
index 28f0d5bf..2d59ebd7 100644
--- a/src/main/java/com/gitblit/servlet/RpcServlet.java
+++ b/src/main/java/com/gitblit/servlet/RpcServlet.java
@@ -59,7 +59,7 @@ public class RpcServlet extends JsonServlet {
private static final long serialVersionUID = 1L;
- public static final int PROTOCOL_VERSION = 6;
+ public static final int PROTOCOL_VERSION = 7;
private IStoredSettings settings;
@@ -383,6 +383,19 @@ public class RpcServlet extends JsonServlet {
} 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