Shinsuke Sugaya 10 年 前
コミット
dd1976f9d7
1 ファイル変更8 行追加1 行削除
  1. 8 1
      src/main/java/jp/sf/fess/job/CrawlJob.java

+ 8 - 1
src/main/java/jp/sf/fess/job/CrawlJob.java

@@ -50,6 +50,8 @@ public class CrawlJob {
 
 
     protected String sessionId;
     protected String sessionId;
 
 
+    protected String namespace = Constants.CRAWLING_SESSION_SYSTEM_NAME;
+
     protected String[] webConfigIds;
     protected String[] webConfigIds;
 
 
     protected String[] fileConfigIds;
     protected String[] fileConfigIds;
@@ -76,6 +78,11 @@ public class CrawlJob {
         return this;
         return this;
     }
     }
 
 
+    public CrawlJob namespace(final String namespace) {
+        this.namespace = namespace;
+        return this;
+    }
+
     public CrawlJob operation(final String operation) {
     public CrawlJob operation(final String operation) {
         this.operation = operation;
         this.operation = operation;
         return this;
         return this;
@@ -280,7 +287,7 @@ public class CrawlJob {
         crawlerCmdList.add("--sessionId");
         crawlerCmdList.add("--sessionId");
         crawlerCmdList.add(sessionId);
         crawlerCmdList.add(sessionId);
         crawlerCmdList.add("--name");
         crawlerCmdList.add("--name");
-        crawlerCmdList.add(Constants.CRAWLING_SESSION_SYSTEM_NAME);
+        crawlerCmdList.add(namespace);
 
 
         if (webConfigIds != null && webConfigIds.length > 0) {
         if (webConfigIds != null && webConfigIds.length > 0) {
             crawlerCmdList.add("-w");
             crawlerCmdList.add("-w");