Update of 
/var/cvs/contributions/CMSContainer_Modules/luceus/src/java/com/finalist/cmsc/module/luceusmodule/taglib
In directory 
james.mmbase.org:/tmp/cvs-serv10202/luceus/src/java/com/finalist/cmsc/module/luceusmodule/taglib

Modified Files:
      Tag: b1_5
        FullIndexTag.java 
Log Message:
CMSC-1137 - Add nodemanager to the FullIndexTag of the CMSc Luceus module


See also: 
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer_Modules/luceus/src/java/com/finalist/cmsc/module/luceusmodule/taglib
See also: http://www.mmbase.org/jira/browse/CMSC-1137


Index: FullIndexTag.java
===================================================================
RCS file: 
/var/cvs/contributions/CMSContainer_Modules/luceus/src/java/com/finalist/cmsc/module/luceusmodule/taglib/FullIndexTag.java,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -u -b -r1.5 -r1.5.2.1
--- FullIndexTag.java   12 Apr 2008 14:26:32 -0000      1.5
+++ FullIndexTag.java   4 Nov 2008 10:04:02 -0000       1.5.2.1
@@ -9,6 +9,8 @@
  */
 package com.finalist.cmsc.module.luceusmodule.taglib;
 
+import net.sf.mmapps.commons.util.StringUtil;
+
 /**
  * Perform a Luceus FullIndex
  * 
@@ -21,11 +23,19 @@
     */
    public boolean erase = false;
 
+   /**
+    * Optionally give a nodemanager to specifically index the given type
+    */
+   private String nodemanager = null;
+
 
    @Override
    public void doTag() {
       if (isRunning()) {
-         getModule().startFullIndex(erase);
+         if (erase && !StringUtil.isEmptyOrWhitespace(nodemanager)) {
+            throw new IllegalArgumentException("A *clean* FullIndex can not be 
executed together with a specific nodemanager type! Please remove either one of 
the two.");
+         }
+         getModule().startFullIndex(erase, nodemanager);
       }
    }
 
@@ -34,4 +44,9 @@
       this.erase = erase;
    }
 
+
+   public void setNodemanager(String nodemanager) {
+      this.nodemanager = nodemanager;
+   }
+
 }
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to