manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1622740 [5/9] - in /manifoldcf/trunk: connectors/alfresco/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/alfresco/ connectors/alfresco/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/alfresco/ connec...
Date Fri, 05 Sep 2014 16:48:07 GMT
Modified: manifoldcf/trunk/connectors/jdbc/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jdbc/JDBCConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/jdbc/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jdbc/JDBCConnector.java?rev=1622740&r1=1622739&r2=1622740&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/jdbc/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jdbc/JDBCConnector.java
(original)
+++ manifoldcf/trunk/connectors/jdbc/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jdbc/JDBCConnector.java
Fri Sep  5 16:48:06 2014
@@ -1045,90 +1045,92 @@ public class JDBCConnector extends org.a
     tabsArray.add(Messages.getString(locale,"JDBCConnector.Queries"));
     tabsArray.add(Messages.getString(locale,"JDBCConnector.Security"));
 
+    String seqPrefix = "s"+connectionSequenceNumber+"_";
+
     out.print(
 "<script type=\"text/javascript\">\n"+
 "<!--\n"+
 "\n"+
-"function SpecOp(n, opValue, anchorvalue)\n"+
+"function "+seqPrefix+"SpecOp(n, opValue, anchorvalue)\n"+
 "{\n"+
 "  eval(\"editjob.\"+n+\".value = \\\"\"+opValue+\"\\\"\");\n"+
 "  postFormSetAnchor(anchorvalue);\n"+
 "}\n"+
 "\n"+
-"function SpecAddToken(anchorvalue)\n"+
+"function "+seqPrefix+"SpecAddToken(anchorvalue)\n"+
 "{\n"+
-"  if (editjob.spectoken.value == \"\")\n"+
+"  if (editjob."+seqPrefix+"spectoken.value == \"\")\n"+
 "  {\n"+
 "    alert(\"" + Messages.getBodyJavascriptString(locale,"JDBCConnector.TypeInAnAccessToken")
+ "\");\n"+
-"    editjob.spectoken.focus();\n"+
+"    editjob."+seqPrefix+"spectoken.focus();\n"+
 "    return;\n"+
 "  }\n"+
-"  SpecOp(\"accessop\",\"Add\",anchorvalue);\n"+
+"  "+seqPrefix+"SpecOp(\""+seqPrefix+"accessop\",\"Add\",anchorvalue);\n"+
 "}\n"+
 "\n"+
-"function checkSpecification()\n"+
+"function "+seqPrefix+"checkSpecification()\n"+
 "{\n"+
-"  if (editjob.idquery.value == \"\")\n"+
+"  if (editjob."+seqPrefix+"idquery.value == \"\")\n"+
 "  {\n"+
 "    alert(\"" + Messages.getBodyJavascriptString(locale,"JDBCConnector.EnterASeedingQuery")
+ "\");\n"+
-"    editjob.idquery.focus();\n"+
+"    editjob."+seqPrefix+"idquery.focus();\n"+
 "    return false;\n"+
 "  }\n"+
-"  if (editjob.idquery.value.indexOf(\"$(IDCOLUMN)\") == -1)\n"+
+"  if (editjob."+seqPrefix+"idquery.value.indexOf(\"$(IDCOLUMN)\") == -1)\n"+
 "  {\n"+
 "    alert(\"" + Messages.getBodyJavascriptString(locale,"JDBCConnector.MustReturnIDCOLUMNInTheResult")
+ "\");\n"+
-"    editjob.idquery.focus();\n"+
+"    editjob."+seqPrefix+"idquery.focus();\n"+
 "    return false;\n"+
 "  }\n"+
-"  if (editjob.versionquery.value != \"\")\n"+
+"  if (editjob."+seqPrefix+"versionquery.value != \"\")\n"+
 "  {\n"+
-"    if (editjob.versionquery.value.indexOf(\"$(IDCOLUMN)\") == -1)\n"+
+"    if (editjob."+seqPrefix+"versionquery.value.indexOf(\"$(IDCOLUMN)\") == -1)\n"+
 "    {\n"+
 "      alert(\"" + Messages.getBodyJavascriptString(locale,"JDBCConnector.MustReturnIDCOLUMNInTheResult")
+ "\");\n"+
-"      editjob.versionquery.focus();\n"+
+"      editjob."+seqPrefix+"versionquery.focus();\n"+
 "      return false;\n"+
 "    }\n"+
-"    if (editjob.versionquery.value.indexOf(\"$(VERSIONCOLUMN)\") == -1)\n"+
+"    if (editjob."+seqPrefix+"versionquery.value.indexOf(\"$(VERSIONCOLUMN)\") == -1)\n"+
 "    {\n"+
 "      alert(\"" + Messages.getBodyJavascriptString(locale,"JDBCConnector.MustReturnVERSIONCOLUMNInTheResult")
+ "\");\n"+
-"      editjob.versionquery.focus();\n"+
+"      editjob."+seqPrefix+"versionquery.focus();\n"+
 "      return false;\n"+
 "    }\n"+
-"    if (editjob.versionquery.value.indexOf(\"$(IDLIST)\") == -1)\n"+
+"    if (editjob."+seqPrefix+"versionquery.value.indexOf(\"$(IDLIST)\") == -1)\n"+
 "    {\n"+
 "      alert(\"" + Messages.getBodyJavascriptString(locale,"JDBCConnector.MustUseIDLISTInWHEREClause")
+ "\");\n"+
-"      editjob.versionquery.focus();\n"+
+"      editjob."+seqPrefix+"versionquery.focus();\n"+
 "      return false;\n"+
 "    }\n"+
 "  }\n"+
-"  if (editjob.dataquery.value == \"\")\n"+
+"  if (editjob."+seqPrefix+"dataquery.value == \"\")\n"+
 "  {\n"+
 "    alert(\"" + Messages.getBodyJavascriptString(locale,"JDBCConnector.EnterADataQuery")
+ "\");\n"+
-"    editjob.dataquery.focus();\n"+
+"    editjob."+seqPrefix+"dataquery.focus();\n"+
 "    return false;\n"+
 "  }\n"+
-"  if (editjob.dataquery.value.indexOf(\"$(IDCOLUMN)\") == -1)\n"+
+"  if (editjob."+seqPrefix+"dataquery.value.indexOf(\"$(IDCOLUMN)\") == -1)\n"+
 "  {\n"+
 "    alert(\"" + Messages.getBodyJavascriptString(locale,"JDBCConnector.MustReturnIDCOLUMNInTheResult2")
+ "\");\n"+
-"    editjob.dataquery.focus();\n"+
+"    editjob."+seqPrefix+"dataquery.focus();\n"+
 "    return false;\n"+
 "  }\n"+
-"  if (editjob.dataquery.value.indexOf(\"$(URLCOLUMN)\") == -1)\n"+
+"  if (editjob."+seqPrefix+"dataquery.value.indexOf(\"$(URLCOLUMN)\") == -1)\n"+
 "  {\n"+
 "    alert(\"" + Messages.getBodyJavascriptString(locale,"JDBCConnector.MustReturnURLCOLUMNInTheResult")
+ "\");\n"+
-"    editjob.dataquery.focus();\n"+
+"    editjob."+seqPrefix+"dataquery.focus();\n"+
 "    return false;\n"+
 "  }\n"+
-"  if (editjob.dataquery.value.indexOf(\"$(DATACOLUMN)\") == -1)\n"+
+"  if (editjob."+seqPrefix+"dataquery.value.indexOf(\"$(DATACOLUMN)\") == -1)\n"+
 "  {\n"+
 "    alert(\"" + Messages.getBodyJavascriptString(locale,"JDBCConnector.MustReturnDATACOLUMNInTheResult")
+ "\");\n"+
-"    editjob.dataquery.focus();\n"+
+"    editjob."+seqPrefix+"dataquery.focus();\n"+
 "    return false;\n"+
 "  }\n"+
-"  if (editjob.dataquery.value.indexOf(\"$(IDLIST)\") == -1)\n"+
+"  if (editjob."+seqPrefix+"dataquery.value.indexOf(\"$(IDLIST)\") == -1)\n"+
 "  {\n"+
 "    alert(\"" + Messages.getBodyJavascriptString(locale,"JDBCConnector.MustUseIDLISTInWHEREClause")
+ "\");\n"+
-"    editjob.dataquery.focus();\n"+
+"    editjob."+seqPrefix+"dataquery.focus();\n"+
 "    return false;\n"+
 "  }\n"+
 "\n"+
@@ -1159,6 +1161,8 @@ public class JDBCConnector extends org.a
     int connectionSequenceNumber, int actualSequenceNumber, String tabName)
     throws ManifoldCFException, IOException
   {
+    String seqPrefix = "s"+connectionSequenceNumber+"_";
+
     String idQuery = "SELECT idfield AS $(IDCOLUMN) FROM documenttable WHERE modifydatefield
> $(STARTTIME) AND modifydatefield <= $(ENDTIME)";
     String versionQuery = "SELECT idfield AS $(IDCOLUMN), versionfield AS $(VERSIONCOLUMN)
FROM documenttable WHERE idfield IN $(IDLIST)";
     String dataQuery = "SELECT idfield AS $(IDCOLUMN), urlfield AS $(URLCOLUMN), datafield
AS $(DATACOLUMN) FROM documenttable WHERE idfield IN $(IDLIST)";
@@ -1189,22 +1193,22 @@ public class JDBCConnector extends org.a
 
     // The Queries tab
 
-    if (tabName.equals(Messages.getString(locale,"JDBCConnector.Queries")))
+    if (tabName.equals(Messages.getString(locale,"JDBCConnector.Queries")) && connectionSequenceNumber
== actualSequenceNumber)
     {
       out.print(
 "<table class=\"displaytable\">\n"+
 "  <tr><td class=\"separator\" colspan=\"2\"><hr/></td></tr>\n"+
 "  <tr>\n"+
 "    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"JDBCConnector.SeedingQuery")
+ "</nobr><br/><nobr>" + Messages.getBodyString(locale,"JDBCConnector.returnIdsThatNeedToBeChecked")
+ "</nobr></td>\n"+
-"    <td class=\"value\"><textarea name=\"idquery\" cols=\"64\" rows=\"6\">"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(idQuery)+"</textarea></td>\n"+
+"    <td class=\"value\"><textarea name=\""+seqPrefix+"idquery\" cols=\"64\" rows=\"6\">"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(idQuery)+"</textarea></td>\n"+
 "  </tr>\n"+
 "  <tr>\n"+
 "    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"JDBCConnector.VersionCheckQuery")
+ "</nobr><br/><nobr>" + Messages.getBodyString(locale,"JDBCConnector.returnIdsAndVersionsForASetOfDocuments")
+ "</nobr><br/><nobr>" + Messages.getBodyString(locale,"JDBCConnector.leaveBlankIfNoVersioningCapability")
+ "</nobr></td>\n"+
-"    <td class=\"value\"><textarea name=\"versionquery\" cols=\"64\" rows=\"6\">"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(versionQuery)+"</textarea></td>\n"+
+"    <td class=\"value\"><textarea name=\""+seqPrefix+"versionquery\" cols=\"64\"
rows=\"6\">"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(versionQuery)+"</textarea></td>\n"+
 "  </tr>\n"+
 "  <tr>\n"+
 "    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"JDBCConnector.DataQuery")
+ "</nobr><br/><nobr>" + Messages.getBodyString(locale,"JDBCConnector.returnIdsUrlsAndDataForASetOfDocuments")
+ "</nobr></td>\n"+
-"    <td class=\"value\"><textarea name=\"dataquery\" cols=\"64\" rows=\"6\">"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(dataQuery)+"</textarea></td>\n"+
+"    <td class=\"value\"><textarea name=\""+seqPrefix+"dataquery\" cols=\"64\" rows=\"6\">"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(dataQuery)+"</textarea></td>\n"+
 "  </tr>\n"+
 "</table>\n"
       );
@@ -1212,9 +1216,9 @@ public class JDBCConnector extends org.a
     else
     {
       out.print(
-"<input type=\"hidden\" name=\"idquery\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(idQuery)+"\"/>\n"+
-"<input type=\"hidden\" name=\"versionquery\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(versionQuery)+"\"/>\n"+
-"<input type=\"hidden\" name=\"dataquery\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(dataQuery)+"\"/>\n"
+"<input type=\"hidden\" name=\""+seqPrefix+"idquery\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(idQuery)+"\"/>\n"+
+"<input type=\"hidden\" name=\""+seqPrefix+"versionquery\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(versionQuery)+"\"/>\n"+
+"<input type=\"hidden\" name=\""+seqPrefix+"dataquery\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(dataQuery)+"\"/>\n"
       );
     }
 	
@@ -1222,7 +1226,7 @@ public class JDBCConnector extends org.a
     // There is no native security, so all we care about are the tokens.
     i = 0;
 
-    if (tabName.equals(Messages.getString(locale,"JDBCConnector.Security")))
+    if (tabName.equals(Messages.getString(locale,"JDBCConnector.Security")) && connectionSequenceNumber
== actualSequenceNumber)
     {
       out.print(
 "<table class=\"displaytable\">\n"+
@@ -1237,15 +1241,15 @@ public class JDBCConnector extends org.a
         if (sn.getType().equals("access"))
         {
           String accessDescription = "_"+Integer.toString(k);
-          String accessOpName = "accessop"+accessDescription;
+          String accessOpName = seqPrefix+"accessop"+accessDescription;
           String token = sn.getAttributeValue("token");
           out.print(
 "  <tr>\n"+
 "    <td class=\"description\">\n"+
 "      <input type=\"hidden\" name=\""+accessOpName+"\" value=\"\"/>\n"+
-"      <input type=\"hidden\" name=\""+"spectoken"+accessDescription+"\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(token)+"\"/>\n"+
-"      <a name=\""+"token_"+Integer.toString(k)+"\">\n"+
-"        <input type=\"button\" value=\"Delete\" onClick='Javascript:SpecOp(\""+accessOpName+"\",\"Delete\",\"token_"+Integer.toString(k)+"\")'
alt=\"" + Messages.getAttributeString(locale,"JDBCConnector.DeleteToken") + "\""+Integer.toString(k)+"\"/>\n"+
+"      <input type=\"hidden\" name=\""+seqPrefix+"spectoken"+accessDescription+"\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(token)+"\"/>\n"+
+"      <a name=\""+seqPrefix+"token_"+Integer.toString(k)+"\">\n"+
+"        <input type=\"button\" value=\"Delete\" onClick='Javascript:"+seqPrefix+"SpecOp(\""+accessOpName+"\",\"Delete\",\""+seqPrefix+"token_"+Integer.toString(k)+"\")'
alt=\"" + Messages.getAttributeString(locale,"JDBCConnector.DeleteToken") + "\""+Integer.toString(k)+"\"/>\n"+
 "      </a>&nbsp;\n"+
 "    </td>\n"+
 "    <td class=\"value\">\n"+
@@ -1268,14 +1272,14 @@ public class JDBCConnector extends org.a
 "  <tr><td class=\"lightseparator\" colspan=\"2\"><hr/></td></tr>\n"+
 "  <tr>\n"+
 "    <td class=\"description\">\n"+
-"      <input type=\"hidden\" name=\"tokencount\" value=\""+Integer.toString(k)+"\"/>\n"+
-"      <input type=\"hidden\" name=\"accessop\" value=\"\"/>\n"+
-"      <a name=\""+"token_"+Integer.toString(k)+"\">\n"+
-"        <input type=\"button\" value=\"Add\" onClick='Javascript:SpecAddToken(\"token_"+Integer.toString(k+1)+"\")'
alt=\"" + Messages.getAttributeString(locale,"JDBCConnector.AddAccessToken") + "\"/>\n"+
+"      <input type=\"hidden\" name=\""+seqPrefix+"tokencount\" value=\""+Integer.toString(k)+"\"/>\n"+
+"      <input type=\"hidden\" name=\""+seqPrefix+"accessop\" value=\"\"/>\n"+
+"      <a name=\""+seqPrefix+"token_"+Integer.toString(k)+"\">\n"+
+"        <input type=\"button\" value=\"Add\" onClick='Javascript:"+seqPrefix+"SpecAddToken(\""+seqPrefix+"token_"+Integer.toString(k+1)+"\")'
alt=\"" + Messages.getAttributeString(locale,"JDBCConnector.AddAccessToken") + "\"/>\n"+
 "      </a>&nbsp;\n"+
 "    </td>\n"+
 "    <td class=\"value\">\n"+
-"      <input type=\"text\" size=\"30\" name=\"spectoken\" value=\"\"/>\n"+
+"      <input type=\"text\" size=\"30\" name=\""+seqPrefix+"spectoken\" value=\"\"/>\n"+
 "    </td>\n"+
 "  </tr>\n"+
 "</table>\n"
@@ -1294,13 +1298,13 @@ public class JDBCConnector extends org.a
           String accessDescription = "_"+Integer.toString(k);
           String token = sn.getAttributeValue("token");
           out.print(
-"<input type=\"hidden\" name=\""+"spectoken"+accessDescription+"\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(token)+"\"/>\n"
+"<input type=\"hidden\" name=\""+seqPrefix+"spectoken"+accessDescription+"\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(token)+"\"/>\n"
           );
           k++;
         }
       }
       out.print(
-"<input type=\"hidden\" name=\"tokencount\" value=\""+Integer.toString(k)+"\"/>\n"
+"<input type=\"hidden\" name=\""+seqPrefix+"tokencount\" value=\""+Integer.toString(k)+"\"/>\n"
       );
     }
   }
@@ -1322,9 +1326,11 @@ public class JDBCConnector extends org.a
     int connectionSequenceNumber)
     throws ManifoldCFException
   {
-    String idQuery = variableContext.getParameter("idquery");
-    String versionQuery = variableContext.getParameter("versionquery");
-    String dataQuery = variableContext.getParameter("dataquery");
+    String seqPrefix = "s"+connectionSequenceNumber+"_";
+
+    String idQuery = variableContext.getParameter(seqPrefix+"idquery");
+    String versionQuery = variableContext.getParameter(seqPrefix+"versionquery");
+    String dataQuery = variableContext.getParameter(seqPrefix+"dataquery");
 
     SpecificationNode sn;
     if (idQuery != null)
@@ -1370,7 +1376,7 @@ public class JDBCConnector extends org.a
       ds.addChild(ds.getChildCount(),sn);
     }
 	
-    String xc = variableContext.getParameter("tokencount");
+    String xc = variableContext.getParameter(seqPrefix+"tokencount");
     if (xc != null)
     {
       // Delete all tokens first
@@ -1389,7 +1395,7 @@ public class JDBCConnector extends org.a
       while (i < accessCount)
       {
         String accessDescription = "_"+Integer.toString(i);
-        String accessOpName = "accessop"+accessDescription;
+        String accessOpName = seqPrefix+"accessop"+accessDescription;
         xc = variableContext.getParameter(accessOpName);
         if (xc != null && xc.equals("Delete"))
         {
@@ -1398,17 +1404,17 @@ public class JDBCConnector extends org.a
           continue;
         }
         // Get the stuff we need
-        String accessSpec = variableContext.getParameter("spectoken"+accessDescription);
+        String accessSpec = variableContext.getParameter(seqPrefix+"spectoken"+accessDescription);
         SpecificationNode node = new SpecificationNode("access");
         node.setAttribute("token",accessSpec);
         ds.addChild(ds.getChildCount(),node);
         i++;
       }
 
-      String op = variableContext.getParameter("accessop");
+      String op = variableContext.getParameter(seqPrefix+"accessop");
       if (op != null && op.equals("Add"))
       {
-        String accessspec = variableContext.getParameter("spectoken");
+        String accessspec = variableContext.getParameter(seqPrefix+"spectoken");
         SpecificationNode node = new SpecificationNode("access");
         node.setAttribute("token",accessspec);
         ds.addChild(ds.getChildCount(),node);

Modified: manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jira/JiraRepositoryConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jira/JiraRepositoryConnector.java?rev=1622740&r1=1622739&r2=1622740&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jira/JiraRepositoryConnector.java
(original)
+++ manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jira/JiraRepositoryConnector.java
Fri Sep  5 16:48:06 2014
@@ -657,6 +657,7 @@ public class JiraRepositoryConnector ext
     throws ManifoldCFException, IOException {
 
     Map<String, Object> paramMap = new HashMap<String, Object>();
+    paramMap.put("SeqNum", Integer.toString(connectionSequenceNumber));
 
     // Fill in the map with data from all tabs
     fillInJIRAQuerySpecificationMap(paramMap, ds);
@@ -681,8 +682,9 @@ public class JiraRepositoryConnector ext
   public String processSpecificationPost(IPostParameters variableContext, Locale locale,
Specification ds,
     int connectionSequenceNumber)
     throws ManifoldCFException {
+    String seqPrefix = "s"+connectionSequenceNumber+"_";
 
-    String jiraDriveQuery = variableContext.getParameter("jiraquery");
+    String jiraDriveQuery = variableContext.getParameter(seqPrefix+"jiraquery");
     if (jiraDriveQuery != null) {
       int i = 0;
       while (i < ds.getChildCount()) {
@@ -698,7 +700,7 @@ public class JiraRepositoryConnector ext
       ds.addChild(ds.getChildCount(), node);
     }
     
-    String securityOn = variableContext.getParameter("specsecurity");
+    String securityOn = variableContext.getParameter(seqPrefix+"specsecurity");
     if (securityOn != null) {
       // Delete all security records first
       int i = 0;
@@ -714,7 +716,7 @@ public class JiraRepositoryConnector ext
       ds.addChild(ds.getChildCount(),node);
     }
     
-    String xc = variableContext.getParameter("tokencount");
+    String xc = variableContext.getParameter(seqPrefix+"tokencount");
     if (xc != null) {
       // Delete all tokens first
       int i = 0;
@@ -730,7 +732,7 @@ public class JiraRepositoryConnector ext
       i = 0;
       while (i < accessCount) {
         String accessDescription = "_"+Integer.toString(i);
-        String accessOpName = "accessop"+accessDescription;
+        String accessOpName = seqPrefix+"accessop"+accessDescription;
         xc = variableContext.getParameter(accessOpName);
         if (xc != null && xc.equals("Delete")) {
           // Next row
@@ -738,17 +740,17 @@ public class JiraRepositoryConnector ext
           continue;
         }
         // Get the stuff we need
-        String accessSpec = variableContext.getParameter("spectoken"+accessDescription);
+        String accessSpec = variableContext.getParameter(seqPrefix+"spectoken"+accessDescription);
         SpecificationNode node = new SpecificationNode(JOB_ACCESS_NODE_TYPE);
         node.setAttribute(JOB_TOKEN_ATTRIBUTE,accessSpec);
         ds.addChild(ds.getChildCount(),node);
         i++;
       }
 
-      String op = variableContext.getParameter("accessop");
+      String op = variableContext.getParameter(seqPrefix+"accessop");
       if (op != null && op.equals("Add"))
       {
-        String accessspec = variableContext.getParameter("spectoken");
+        String accessspec = variableContext.getParameter(seqPrefix+"spectoken");
         SpecificationNode node = new SpecificationNode(JOB_ACCESS_NODE_TYPE);
         node.setAttribute(JOB_TOKEN_ATTRIBUTE,accessspec);
         ds.addChild(ds.getChildCount(),node);
@@ -780,6 +782,9 @@ public class JiraRepositoryConnector ext
     // Output JIRAQuery tab
     Map<String, Object> paramMap = new HashMap<String, Object>();
     paramMap.put("TabName", tabName);
+    paramMap.put("SeqNum", Integer.toString(connectionSequenceNumber));
+    paramMap.put("SelectedNum", Integer.toString(actualSequenceNumber));
+
     fillInJIRAQuerySpecificationMap(paramMap, ds);
     fillInJIRASecuritySpecificationMap(paramMap, ds);
     Messages.outputResourceWithVelocity(out,locale,EDIT_SPEC_FORWARD_JIRAQUERY,paramMap);
@@ -806,6 +811,7 @@ public class JiraRepositoryConnector ext
     tabsArray.add(Messages.getString(locale, JIRA_SECURITY_TAB_PROPERTY));
 
     Map<String, Object> paramMap = new HashMap<String, Object>();
+    paramMap.put("SeqNum", Integer.toString(connectionSequenceNumber));
 
     // Fill in the specification header map, using data from all tabs.
     fillInJIRAQuerySpecificationMap(paramMap, ds);

Modified: manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/editSpecification_jira.js
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/editSpecification_jira.js?rev=1622740&r1=1622739&r2=1622740&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/editSpecification_jira.js
(original)
+++ manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/editSpecification_jira.js
Fri Sep  5 16:48:06 2014
@@ -17,37 +17,37 @@
 
 <script type="text/javascript">
 <!--
-function checkSpecificationForSave()
+function s${SeqNum}_checkSpecificationForSave()
 {
-  if (editjob.jiraquery.value == "") {
+  if (editjob.s${SeqNum}_jiraquery.value == "") {
     alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('JiraRepositoryConnector.SeedQueryCannotBeNull'))");
     SelectTab("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('JiraRepositoryConnector.JiraQuery'))");
-    editjob.jiraquery.focus();
+    editjob.s${SeqNum}_jiraquery.focus();
     return false;
   }
   return true;
 }
  
-function SpecOp(n, opValue, anchorvalue)
+function s${SeqNum}_SpecOp(n, opValue, anchorvalue)
 {
   eval("editjob."+n+".value = \""+opValue+"\"");
   postFormSetAnchor(anchorvalue);
 }
 
-function SpecDeleteToken(i)
+function s${SeqNum}_SpecDeleteToken(i)
 {
-  SpecOp("accessop_"+i,"Delete","token_"+i);
+  s${SeqNum}_SpecOp("s${SeqNum}_accessop_"+i,"Delete","s${SeqNum}_token_"+i);
 }
 
-function SpecAddToken(i)
+function s${SeqNum}_SpecAddToken(i)
 {
-  if (editjob.spectoken.value == "")
+  if (editjob.s${SeqNum}_spectoken.value == "")
   {
     alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('JiraRepositoryConnector.TypeInAnAccessToken'))");
-    editjob.spectoken.focus();
+    editjob.s${SeqNum}_spectoken.focus();
     return;
   }
-  SpecOp("accessop","Add","token_"+i);
+  s${SeqNum}_SpecOp("s${SeqNum}_accessop","Add","s${SeqNum}_token_"+i);
 }
 
 //-->

Modified: manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/editSpecification_jiraQuery.html
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/editSpecification_jiraQuery.html?rev=1622740&r1=1622739&r2=1622740&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/editSpecification_jiraQuery.html
(original)
+++ manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/editSpecification_jiraQuery.html
Fri Sep  5 16:48:06 2014
@@ -15,7 +15,7 @@
  limitations under the License.
 -->
 
-#if($TabName == $ResourceBundle.getString('JiraRepositoryConnector.JiraQuery'))
+#if($TabName == $ResourceBundle.getString('JiraRepositoryConnector.JiraQuery') &&
${SeqNum} == ${SelectedNum})
 
 <table class="displaytable">
   <tr><td class="separator" colspan="2"><hr/></td></tr>
@@ -27,7 +27,7 @@
     </td>
     <td class="value">
       <nobr>
-        <input type="text" size="120" name="jiraquery" value="$Encoder.attributeEscape($JIRAQUERY)"
/>
+        <input type="text" size="120" name="s${SeqNum}_jiraquery" value="$Encoder.attributeEscape($JIRAQUERY)"
/>
       </nobr>
     </td>
   </tr>
@@ -35,6 +35,6 @@
 
 #else
 
-<input type="hidden" name="jiraquery" value="$Encoder.attributeEscape($JIRAQUERY)" />
+<input type="hidden" name="s${SeqNum}_jiraquery" value="$Encoder.attributeEscape($JIRAQUERY)"
/>
 
 #end

Modified: manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/editSpecification_jiraSecurity.html
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/editSpecification_jiraSecurity.html?rev=1622740&r1=1622739&r2=1622740&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/editSpecification_jiraSecurity.html
(original)
+++ manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/editSpecification_jiraSecurity.html
Fri Sep  5 16:48:06 2014
@@ -15,7 +15,7 @@
  limitations under the License.
 -->
 
-#if($TabName == $ResourceBundle.getString('JiraRepositoryConnector.Security'))
+#if($TabName == $ResourceBundle.getString('JiraRepositoryConnector.Security') &&
${SeqNum} == ${SelectedNum})
 
 <table class="displaytable">
   <tr><td class="separator" colspan="2"><hr/></td></tr>
@@ -24,15 +24,15 @@
     <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('JiraRepositoryConnector.SecurityColon'))</nobr></td>
     <td class="value">
   #if($SECURITYON == 'on')
-      <input type="radio" name="specsecurity" value="on" checked="true"/>
+      <input type="radio" name="s${SeqNum}_specsecurity" value="on" checked="true"/>
   #else
-      <input type="radio" name="specsecurity" value="on"/>
+      <input type="radio" name="s${SeqNum}_specsecurity" value="on"/>
   #end
       $Encoder.bodyEscape($ResourceBundle.getString('JiraRepositoryConnector.Enabled'))
   #if($SECURITYON == 'off')
-      <input type="radio" name="specsecurity" value="off" checked="true"/>
+      <input type="radio" name="s${SeqNum}_specsecurity" value="off" checked="true"/>
   #else
-      <input type="radio" name="specsecurity" value="off"/>
+      <input type="radio" name="s${SeqNum}_specsecurity" value="off"/>
   #end
       $Encoder.bodyEscape($ResourceBundle.getString('JiraRepositoryConnector.Disabled'))
     </td>
@@ -45,10 +45,10 @@
 
   <tr>
     <td class="description">
-      <input type="hidden" name="accessop_$atcounter" value=""/>
-      <input type="hidden" name="spectoken_$atcounter" value="$Encoder.attributeEscape($atoken.get('TOKEN'))"/>
-      <a name="token_$atcounter">
-        <input type="button" value="$Encoder.attributeEscape($ResourceBundle.getString('JiraRepositoryConnector.Delete'))"
onClick='Javascript:SpecDeleteToken($atcounter)' alt="$Encoder.attributeEscape($ResourceBundle.getString('JiraRepositoryConnector.DeleteToken'))$atcounter"/>
+      <input type="hidden" name="s${SeqNum}_accessop_$atcounter" value=""/>
+      <input type="hidden" name="s${SeqNum}_spectoken_$atcounter" value="$Encoder.attributeEscape($atoken.get('TOKEN'))"/>
+      <a name="s${SeqNum}_token_$atcounter">
+        <input type="button" value="$Encoder.attributeEscape($ResourceBundle.getString('JiraRepositoryConnector.Delete'))"
onClick='Javascript:s${SeqNum}_SpecDeleteToken($atcounter)' alt="$Encoder.attributeEscape($ResourceBundle.getString('JiraRepositoryConnector.DeleteToken'))$atcounter"/>
       </a>
     </td>
     <td class="value">$Encoder.bodyEscape($atoken.get('TOKEN'))</td>
@@ -69,27 +69,27 @@
   
   <tr>
     <td class="description">
-      <input type="hidden" name="tokencount" value="$atcounter"/>
-      <input type="hidden" name="accessop" value=""/>
-      <a name="token_$atcounter">
-        <input type="button" value="$Encoder.attributeEscape($ResourceBundle.getString('JiraRepositoryConnector.Add'))"
onClick='Javascript:SpecAddToken($nexttoken)' alt="$Encoder.attributeEscape($ResourceBundle.getString('JiraRepositoryConnector.AddAccessToken'))"/>
+      <input type="hidden" name="s${SeqNum}_tokencount" value="$atcounter"/>
+      <input type="hidden" name="s${SeqNum}_accessop" value=""/>
+      <a name="s${SeqNum}_token_$atcounter">
+        <input type="button" value="$Encoder.attributeEscape($ResourceBundle.getString('JiraRepositoryConnector.Add'))"
onClick='Javascript:s${SeqNum}_SpecAddToken($nexttoken)' alt="$Encoder.attributeEscape($ResourceBundle.getString('JiraRepositoryConnector.AddAccessToken'))"/>
       </a>
     </td>
     <td class="value">
-      <input type="text" size="30" name="spectoken" value=""/>
+      <input type="text" size="30" name="s${SeqNum}_spectoken" value=""/>
     </td>
   </tr>
 </table>
 
 #else
 
-<input type="hidden" name="specsecurity" value="$SECURITYON"/>
+<input type="hidden" name="s${SeqNum}_specsecurity" value="$SECURITYON"/>
 
   #set($atcounter = 0)
   #foreach($atoken in $ACCESSTOKENS)
-<input type="hidden" name="spectoken_$atcounter" value="$Encoder.attributeEscape($atoken.get('TOKEN'))"/>
+<input type="hidden" name="s${SeqNum}_spectoken_$atcounter" value="$Encoder.attributeEscape($atoken.get('TOKEN'))"/>
     #set($atcounter = $atcounter + 1)
   #end
-<input type="hidden" name="tokencount" value="$atcounter"/>
+<input type="hidden" name="s${SeqNum}_tokencount" value="$atcounter"/>
 
 #end



Mime
View raw message