Author: kwright
Date: Mon Dec 29 18:15:20 2014
New Revision: 1648402

URL: http://svn.apache.org/r1648402
Log:
Handle posting of filters

Modified:
    
manifoldcf/branches/CONNECTORS-1130/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/DCTM.java

Modified: 
manifoldcf/branches/CONNECTORS-1130/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/DCTM.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1130/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/DCTM.java?rev=1648402&r1=1648401&r2=1648402&view=diff
==============================================================================
--- 
manifoldcf/branches/CONNECTORS-1130/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/DCTM.java
 (original)
+++ 
manifoldcf/branches/CONNECTORS-1130/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/DCTM.java
 Mon Dec 29 18:15:20 2014
@@ -3234,6 +3234,36 @@ public class DCTM extends org.apache.man
               node.addChild(node.getChildCount(),attrNode);
             }
           }
+          x = variableContext.getParameter(seqPrefix+"filter_"+k+"_count");
+          int filterCount = Integer.parseInt(x);
+          for (int kk = 0; kk < filterCount; kk++)
+          {
+            String op = 
variableContext.getParameter(seqPrefix+"filter_"+k+"_"+kk+"_op");
+            if (!op.equals("Delete"))
+            {
+              String attributeName = 
variableContext.getParameter(seqPrefix+"filter_"+k+"_"+kk+"_name");
+              String operation = 
variableContext.getParameter(seqPrefix+"filter_"+k+"_"+kk+"_operation");
+              String value = 
variableContext.getParameter(seqPrefix+"filter_"+k+"_"+kk+"_value");
+              SpecificationNode filterNode = new 
SpecificationNode(CONFIG_PARAM_FILTER);
+              filterNode.setAttribute("name",attributeName);
+              filterNode.setAttribute("op",operation);
+              filterNode.setAttribute("value",value);
+              node.addChild(node.getChildCount(),filterNode);
+            }
+          }
+          // Add at the end
+          x = variableContext.getParameter(seqPrefix+"filter_"+k+"_op");
+          if (x.equals("Add"))
+          {
+            String attributeName = 
variableContext.getParameter(seqPrefix+"filter_"+k+"_name");
+            String operation = 
variableContext.getParameter(seqPrefix+"filter_"+k+"_operation");
+            String value = 
variableContext.getParameter(seqPrefix+"filter_"+k+"_value");
+            SpecificationNode filterNode = new 
SpecificationNode(CONFIG_PARAM_FILTER);
+            filterNode.setAttribute("name",attributeName);
+            filterNode.setAttribute("op",operation);
+            filterNode.setAttribute("value",value);
+            node.addChild(node.getChildCount(),filterNode);
+          }
           ds.addChild(ds.getChildCount(),node);
         }
       }


Reply via email to