Modified: manifoldcf/trunk/connectors/meridio/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/meridio/MeridioConnector.java URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/meridio/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/meridio/MeridioConnector.java?rev=1622740&r1=1622739&r2=1622740&view=diff ============================================================================== --- manifoldcf/trunk/connectors/meridio/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/meridio/MeridioConnector.java (original) +++ manifoldcf/trunk/connectors/meridio/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/meridio/MeridioConnector.java Fri Sep 5 16:48:06 2014 @@ -2299,75 +2299,71 @@ public class MeridioConnector extends or tabsArray.add(Messages.getString(locale,"MeridioConnector.DataTypes")); tabsArray.add(Messages.getString(locale,"MeridioConnector.Security")); tabsArray.add(Messages.getString(locale,"MeridioConnector.Metadata")); + String seqPrefix = "s"+connectionSequenceNumber+"_"; + out.print( "<script type=\"text/javascript\">\n"+ "<!--\n"+ "\n"+ -"function checkSpecification()\n"+ -"{\n"+ -" // Does nothing right now.\n"+ -" return true;\n"+ -"}\n"+ -"\n"+ -"function SpecDeletePath(n)\n"+ +"function "+seqPrefix+"SpecDeletePath(n)\n"+ "{\n"+ " var anchor;\n"+ " if (n == 0)\n"+ -" anchor = \"SpecPathAdd\";\n"+ +" anchor = \""+seqPrefix+"SpecPathAdd\";\n"+ " else\n"+ -" anchor = \"SpecPath_\"+(n-1);\n"+ -" SpecOp(\"specpathop_\"+n,\"Delete\",anchor);\n"+ +" anchor = \""+seqPrefix+"SpecPath_\"+(n-1);\n"+ +" "+seqPrefix+"SpecOp(\""+seqPrefix+"specpathop_\"+n,\"Delete\",anchor);\n"+ "}\n"+ "\n"+ -"function SpecAddPath()\n"+ +"function "+seqPrefix+"SpecAddPath()\n"+ "{\n"+ -" SpecOp(\"specpathop\",\"Add\",\"SpecPathAdd\");\n"+ +" "+seqPrefix+"SpecOp(\""+seqPrefix+"specpathop\",\"Add\",\""+seqPrefix+"SpecPathAdd\");\n"+ "}\n"+ "\n"+ -"function SpecDeleteFromPath()\n"+ +"function "+seqPrefix+"SpecDeleteFromPath()\n"+ "{\n"+ -" SpecOp(\"specpathop\",\"DeleteFromPath\",\"SpecPathAdd\");\n"+ +" "+seqPrefix+"SpecOp(\""+seqPrefix+"specpathop\",\"DeleteFromPath\",\""+seqPrefix+"SpecPathAdd\");\n"+ "}\n"+ "\n"+ -"function SpecAddToPath()\n"+ +"function "+seqPrefix+"SpecAddToPath()\n"+ "{\n"+ -" if (editjob.specpath.value == \"\")\n"+ +" if (editjob."+seqPrefix+"specpath.value == \"\")\n"+ " {\n"+ " alert(\"" + Messages.getBodyJavascriptString(locale,"MeridioConnector.SelectAFolderOrClassFirst") + "\");\n"+ -" editjob.specpath.focus();\n"+ +" editjob."+seqPrefix+"specpath.focus();\n"+ " }\n"+ " else\n"+ -" SpecOp(\"specpathop\",\"AddToPath\",\"SpecPathAdd\");\n"+ +" "+seqPrefix+"SpecOp(\""+seqPrefix+"specpathop\",\"AddToPath\",\""+seqPrefix+"SpecPathAdd\");\n"+ "}\n"+ "\n"+ -"function SpecAddAccessToken(anchorvalue)\n"+ +"function "+seqPrefix+"SpecAddAccessToken(anchorvalue)\n"+ "{\n"+ -" if (editjob.spectoken.value == \"\")\n"+ +" if (editjob."+seqPrefix+"spectoken.value == \"\")\n"+ " {\n"+ " alert(\"" + Messages.getBodyJavascriptString(locale,"MeridioConnector.AccessTokenCannotBeNull") + "\");\n"+ -" editjob.spectoken.focus();\n"+ +" editjob."+seqPrefix+"spectoken.focus();\n"+ " }\n"+ " else\n"+ -" SpecOp(\"accessop\",\"Add\",anchorvalue);\n"+ +" "+seqPrefix+"SpecOp(\""+seqPrefix+"accessop\",\"Add\",anchorvalue);\n"+ "}\n"+ "\n"+ -"function SpecDeleteMapping(item, anchorvalue)\n"+ +"function "+seqPrefix+"SpecDeleteMapping(item, anchorvalue)\n"+ "{\n"+ -" SpecOp(\"specmappingop_\"+item,\"Delete\",anchorvalue);\n"+ +" "+seqPrefix+"SpecOp(\""+seqPrefix+"specmappingop_\"+item,\"Delete\",anchorvalue);\n"+ "}\n"+ "\n"+ -"function SpecAddMapping(anchorvalue)\n"+ +"function "+seqPrefix+"SpecAddMapping(anchorvalue)\n"+ "{\n"+ -" if (editjob.specmatch.value == \"\")\n"+ +" if (editjob."+seqPrefix+"specmatch.value == \"\")\n"+ " {\n"+ " alert(\"" + Messages.getBodyJavascriptString(locale,"MeridioConnector.MatchStringCannotBeEmpty") + "\");\n"+ -" editjob.specmatch.focus();\n"+ +" editjob."+seqPrefix+"specmatch.focus();\n"+ " return;\n"+ " }\n"+ -" SpecOp(\"specmappingop\",\"Add\",anchorvalue);\n"+ +" "+seqPrefix+"SpecOp(\""+seqPrefix+"specmappingop\",\"Add\",anchorvalue);\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"+ @@ -2396,11 +2392,13 @@ public class MeridioConnector extends or int connectionSequenceNumber, int actualSequenceNumber, String tabName) throws ManifoldCFException, IOException { + String seqPrefix = "s"+connectionSequenceNumber+"_"; + int i; int k; // Search Paths tab - if (tabName.equals(Messages.getString(locale,"MeridioConnector.SearchPaths"))) + if (tabName.equals(Messages.getString(locale,"MeridioConnector.SearchPaths")) && connectionSequenceNumber == actualSequenceNumber) { out.print( "<table class=\"displaytable\">\n"+ @@ -2419,10 +2417,10 @@ public class MeridioConnector extends or out.print( " <tr>\n"+ " <td class=\"description\">\n"+ -" <input type=\"hidden\" name=\""+"specpathop_"+Integer.toString(k)+"\" value=\"Continue\"/>\n"+ -" <input type=\"hidden\" name=\""+"specpath_"+Integer.toString(k)+"\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(pathString)+"\"/>\n"+ -" <a name=\""+"SpecPath_"+Integer.toString(k)+"\">\n"+ -" <input type=\"button\" value=\"Delete\" onclick='javascript:SpecDeletePath("+Integer.toString(k)+");' alt=\""+Messages.getAttributeString(locale,"MeridioConnector.DeletePath")+Integer.toString(k)+"\"/>\n"+ +" <input type=\"hidden\" name=\""+seqPrefix+"specpathop_"+Integer.toString(k)+"\" value=\"Continue\"/>\n"+ +" <input type=\"hidden\" name=\""+seqPrefix+"specpath_"+Integer.toString(k)+"\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(pathString)+"\"/>\n"+ +" <a name=\""+seqPrefix+"SpecPath_"+Integer.toString(k)+"\">\n"+ +" <input type=\"button\" value=\"Delete\" onclick='javascript:"+seqPrefix+"SpecDeletePath("+Integer.toString(k)+");' alt=\""+Messages.getAttributeString(locale,"MeridioConnector.DeletePath")+Integer.toString(k)+"\"/>\n"+ " </a>\n"+ " </td>\n"+ " <td class=\"value\"><nobr>"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(pathString)+"</nobr></td>\n"+ @@ -2439,16 +2437,16 @@ public class MeridioConnector extends or } out.print( " <tr>\n"+ -" <td class=\"lightseparator\" colspan=\"2\"><input type=\"hidden\" name=\"specpath_total\" value=\""+Integer.toString(k)+"\"/><hr/></td>\n"+ +" <td class=\"lightseparator\" colspan=\"2\"><input type=\"hidden\" name=\""+seqPrefix+"specpath_total\" value=\""+Integer.toString(k)+"\"/><hr/></td>\n"+ " </tr>\n"+ " <tr>\n" ); // The path, and the corresponding IDs - String pathSoFar = (String)currentContext.get("specpath"); - String idsSoFar = (String)currentContext.get("specpathids"); + String pathSoFar = (String)currentContext.get(seqPrefix+"specpath"); + String idsSoFar = (String)currentContext.get(seqPrefix+"specpathids"); // The type of the object described by the path - Integer containerType = (Integer)currentContext.get("specpathtype"); + Integer containerType = (Integer)currentContext.get(seqPrefix+"specpathtype"); if (pathSoFar == null) pathSoFar = "/"; @@ -2476,11 +2474,11 @@ public class MeridioConnector extends or childList = new org.apache.manifoldcf.crawler.connectors.meridio.MeridioClassContents[0]; out.print( " <td class=\"description\">\n"+ -" <input type=\"hidden\" name=\"specpathop\" value=\"Continue\"/>\n"+ -" <input type=\"hidden\" name=\"specpathbase\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(pathSoFar)+"\"/>\n"+ -" <input type=\"hidden\" name=\"specidsbase\" value=\""+idsSoFar+"\"/>\n"+ -" <input type=\"hidden\" name=\"spectype\" value=\""+containerType.toString()+"\"/>\n"+ -" <a name=\"SpecPathAdd\"><input type=\"button\" value=\"Add\" onclick=\"javascript:SpecAddPath();\" alt=\"" + Messages.getAttributeString(locale,"MeridioConnector.AddPath") + "\"/></a>\n"+ +" <input type=\"hidden\" name=\""+seqPrefix+"specpathop\" value=\"Continue\"/>\n"+ +" <input type=\"hidden\" name=\""+seqPrefix+"specpathbase\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(pathSoFar)+"\"/>\n"+ +" <input type=\"hidden\" name=\""+seqPrefix+"specidsbase\" value=\""+idsSoFar+"\"/>\n"+ +" <input type=\"hidden\" name=\""+seqPrefix+"spectype\" value=\""+containerType.toString()+"\"/>\n"+ +" <a name=\""+seqPrefix+"SpecPathAdd\"><input type=\"button\" value=\"Add\" onclick=\"javascript:"+seqPrefix+"SpecAddPath();\" alt=\"" + Messages.getAttributeString(locale,"MeridioConnector.AddPath") + "\"/></a>\n"+ " </td>\n"+ " <td class=\"value\">\n"+ " <nobr>\n"+ @@ -2489,14 +2487,14 @@ public class MeridioConnector extends or if (pathSoFar.length() > 1) { out.print( -" <input type=\"button\" value=\"-\" onclick=\"javascript:SpecDeleteFromPath();\" alt=\"" + Messages.getAttributeString(locale,"MeridioConnector.DeleteFromPath") + "\"/>\n" +" <input type=\"button\" value=\"-\" onclick=\"javascript:"+seqPrefix+"SpecDeleteFromPath();\" alt=\"" + Messages.getAttributeString(locale,"MeridioConnector.DeleteFromPath") + "\"/>\n" ); } if (childList.length > 0) { out.print( -" <input type=\"button\" value=\"+\" onclick=\"javascript:SpecAddToPath();\" alt=\"" + Messages.getAttributeString(locale,"MeridioConnector.AddToPath") + "\"/>\n"+ -" <select name=\"specpath\" size=\"10\">\n"+ +" <input type=\"button\" value=\"+\" onclick=\"javascript:"+seqPrefix+"SpecAddToPath();\" alt=\"" + Messages.getAttributeString(locale,"MeridioConnector.AddToPath") + "\"/>\n"+ +" <select name=\""+seqPrefix+"specpath\" size=\"10\">\n"+ " <option value=\"\" selected=\"\">" + Messages.getBodyString(locale,"MeridioConnector.PickAFolder") + "</option>\n" ); int j = 0; @@ -2554,13 +2552,13 @@ public class MeridioConnector extends or // body data, so I'm going to presume it's a value attribute. String pathString = sn.getAttributeValue("path"); out.print( -"<input type=\"hidden\" name=\""+"specpath_"+Integer.toString(k)+"\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(pathString)+"\"/>\n" +"<input type=\"hidden\" name=\""+seqPrefix+"specpath_"+Integer.toString(k)+"\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(pathString)+"\"/>\n" ); k++; } } out.print( -"<input type=\"hidden\" name=\"specpath_total\" value=\""+Integer.toString(k)+"\"/>\n" +"<input type=\"hidden\" name=\""+seqPrefix+"specpath_total\" value=\""+Integer.toString(k)+"\"/>\n" ); } @@ -2587,7 +2585,7 @@ public class MeridioConnector extends or } } - if (tabName.equals(Messages.getString(locale,"MeridioConnector.ContentTypes"))) + if (tabName.equals(Messages.getString(locale,"MeridioConnector.ContentTypes")) && connectionSequenceNumber == actualSequenceNumber) { out.print( "<table class=\"displaytable\">\n"+ @@ -2602,7 +2600,7 @@ public class MeridioConnector extends or String mimeType = allowedMimeTypes[i++]; out.print( " <nobr>\n"+ -" <input type=\"checkbox\" name=\"specmimetypes\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(mimeType)+"\" "+((mimeTypeMap.get(mimeType)!=null)?"checked=\"true\"":"")+">\n"+ +" <input type=\"checkbox\" name=\""+seqPrefix+"specmimetypes\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(mimeType)+"\" "+((mimeTypeMap.get(mimeType)!=null)?"checked=\"true\"":"")+">\n"+ " "+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(mimeType)+"\n"+ " </input>\n"+ " </nobr>\n"+ @@ -2624,7 +2622,7 @@ public class MeridioConnector extends or { String mimeType = (String)iter.next(); out.print( -"<input type=\"hidden\" name=\"specmimetypes\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(mimeType)+"\"/>\n" +"<input type=\"hidden\" name=\""+seqPrefix+"specmimetypes\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(mimeType)+"\"/>\n" ); } } @@ -2643,7 +2641,7 @@ public class MeridioConnector extends or } } - if (tabName.equals(Messages.getString(locale,"MeridioConnector.Categories"))) + if (tabName.equals(Messages.getString(locale,"MeridioConnector.Categories")) && connectionSequenceNumber == actualSequenceNumber) { out.print( "<table class=\"displaytable\">\n"+ @@ -2665,7 +2663,7 @@ public class MeridioConnector extends or String category = categoryList[k++]; out.print( " <nobr>\n"+ -" <input type=\"checkbox\" name=\"speccategories\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(category)+"\" "+((categoriesMap.get(category)!=null)?"checked=\"true\"":"")+">\n"+ +" <input type=\"checkbox\" name=\""+seqPrefix+"speccategories\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(category)+"\" "+((categoriesMap.get(category)!=null)?"checked=\"true\"":"")+">\n"+ " "+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(category)+"\n"+ " </input>\n"+ " </nobr>\n"+ @@ -2704,7 +2702,7 @@ public class MeridioConnector extends or { String category = (String)iter.next(); out.print( -"<input type=\"hidden\" name=\"speccategories\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(category)+"\"/>\n" +"<input type=\"hidden\" name=\""+seqPrefix+"speccategories\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(category)+"\"/>\n" ); } } @@ -2719,7 +2717,7 @@ public class MeridioConnector extends or mode = sn.getAttributeValue("value"); } - if (tabName.equals(Messages.getString(locale,"MeridioConnector.DataTypes"))) + if (tabName.equals(Messages.getString(locale,"MeridioConnector.DataTypes")) && connectionSequenceNumber == actualSequenceNumber) { out.print( "<table class=\"displaytable\">\n"+ @@ -2727,9 +2725,9 @@ public class MeridioConnector extends or " <tr>\n"+ " <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"MeridioConnector.DataTypesToIngest") + "</nobr></td>\n"+ " <td class=\"value\">\n"+ -" <nobr><input type=\"radio\" name=\"specsearchon\" value=\"DOCUMENTS\" "+(mode.equals("DOCUMENTS")?"checked=\"true\"":"")+"/>" + Messages.getBodyString(locale,"MeridioConnector.Documents") + "</nobr><br/>\n"+ -" <nobr><input type=\"radio\" name=\"specsearchon\" value=\"RECORDS\" "+(mode.equals("RECORDS")?"checked=\"true\"":"")+"/>" + Messages.getBodyString(locale,"MeridioConnector.Records") + "</nobr><br/>\n"+ -" <nobr><input type=\"radio\" name=\"specsearchon\" value=\"DOCUMENTS_AND_RECORDS\" "+(mode.equals("DOCUMENTS_AND_RECORDS")?"checked=\"true\"":"")+"/>" + Messages.getBodyString(locale,"MeridioConnector.DocumentsAndRecords") + "</nobr><br/>\n"+ +" <nobr><input type=\"radio\" name=\""+seqPrefix+"specsearchon\" value=\"DOCUMENTS\" "+(mode.equals("DOCUMENTS")?"checked=\"true\"":"")+"/>" + Messages.getBodyString(locale,"MeridioConnector.Documents") + "</nobr><br/>\n"+ +" <nobr><input type=\"radio\" name=\""+seqPrefix+"specsearchon\" value=\"RECORDS\" "+(mode.equals("RECORDS")?"checked=\"true\"":"")+"/>" + Messages.getBodyString(locale,"MeridioConnector.Records") + "</nobr><br/>\n"+ +" <nobr><input type=\"radio\" name=\""+seqPrefix+"specsearchon\" value=\"DOCUMENTS_AND_RECORDS\" "+(mode.equals("DOCUMENTS_AND_RECORDS")?"checked=\"true\"":"")+"/>" + Messages.getBodyString(locale,"MeridioConnector.DocumentsAndRecords") + "</nobr><br/>\n"+ " </td>\n"+ " </tr>\n"+ "</table>\n" @@ -2738,7 +2736,7 @@ public class MeridioConnector extends or else { out.print( -"<input type=\"hidden\" name=\"specsearchon\" value=\""+mode+"\"/>\n" +"<input type=\"hidden\" name=\""+seqPrefix+"specsearchon\" value=\""+mode+"\"/>\n" ); } @@ -2760,7 +2758,7 @@ public class MeridioConnector extends or } } - if (tabName.equals(Messages.getString(locale,"MeridioConnector.Security"))) + if (tabName.equals(Messages.getString(locale,"MeridioConnector.Security")) && connectionSequenceNumber == actualSequenceNumber) { out.print( "<table class=\"displaytable\">\n"+ @@ -2768,8 +2766,8 @@ public class MeridioConnector extends or " <tr>\n"+ " <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"MeridioConnector.Security2") + "</nobr></td>\n"+ " <td class=\"value\">\n"+ -" <input type=\"radio\" name=\"specsecurity\" value=\"on\" "+(securityOn?"checked=\"true\"":"")+" />" + Messages.getBodyString(locale,"MeridioConnector.Enabled") + " \n"+ -" <input type=\"radio\" name=\"specsecurity\" value=\"off\" "+((securityOn==false)?"checked=\"true\"":"")+" />" + Messages.getBodyString(locale,"MeridioConnector.Disabled") + "\n"+ +" <input type=\"radio\" name=\""+seqPrefix+"specsecurity\" value=\"on\" "+(securityOn?"checked=\"true\"":"")+" />" + Messages.getBodyString(locale,"MeridioConnector.Enabled") + " \n"+ +" <input type=\"radio\" name=\""+seqPrefix+"specsecurity\" value=\"off\" "+((securityOn==false)?"checked=\"true\"":"")+" />" + Messages.getBodyString(locale,"MeridioConnector.Disabled") + "\n"+ " </td>\n"+ " </tr>\n"+ " <tr><td class=\"separator\" colspan=\"2\"><hr/></td></tr>\n" @@ -2783,15 +2781,15 @@ public class MeridioConnector extends or 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,"MeridioConnector.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,"MeridioConnector.DeleteToken")+Integer.toString(k)+"\"/>\n"+ " </a> \n"+ " </td>\n"+ " <td class=\"value\">\n"+ @@ -2814,14 +2812,14 @@ public class MeridioConnector extends or " <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:SpecAddAccessToken(\"token_"+Integer.toString(k+1)+"\")' alt=\"" + Messages.getAttributeString(locale,"MeridioConnector.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+"SpecAddAccessToken(\""+seqPrefix+"token_"+Integer.toString(k+1)+"\")' alt=\"" + Messages.getAttributeString(locale,"MeridioConnector.AddAccessToken") + "\"/>\n"+ " </a> \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" @@ -2830,7 +2828,7 @@ public class MeridioConnector extends or else { out.print( -"<input type=\"hidden\" name=\"specsecurity\" value=\""+(securityOn?"on":"off")+"\"/>\n" +"<input type=\"hidden\" name=\""+seqPrefix+"specsecurity\" value=\""+(securityOn?"on":"off")+"\"/>\n" ); // Finally, go through forced ACL i = 0; @@ -2843,13 +2841,13 @@ public class MeridioConnector extends or 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" ); } @@ -2909,11 +2907,11 @@ public class MeridioConnector extends or allMetadata = false; } } - if (tabName.equals(Messages.getString(locale,"MeridioConnector.Metadata"))) + if (tabName.equals(Messages.getString(locale,"MeridioConnector.Metadata")) && connectionSequenceNumber == actualSequenceNumber) { out.print( -"<input type=\"hidden\" name=\"specmappingcount\" value=\""+Integer.toString(matchMap.getMatchCount())+"\"/>\n"+ -"<input type=\"hidden\" name=\"specmappingop\" value=\"\"/>\n"+ +"<input type=\"hidden\" name=\""+seqPrefix+"specmappingcount\" value=\""+Integer.toString(matchMap.getMatchCount())+"\"/>\n"+ +"<input type=\"hidden\" name=\""+seqPrefix+"specmappingop\" value=\"\"/>\n"+ "\n"+ "<table class=\"displaytable\">\n"+ " <tr><td class=\"separator\" colspan=\"4\"><hr/></td></tr>\n"+ @@ -2923,8 +2921,8 @@ public class MeridioConnector extends or " </td>\n"+ " <td class=\"value\" colspan=\"3\">\n"+ " <nobr>\n"+ -" <input type=\"radio\" name=\"allmetadata\" value=\"false\" "+((allMetadata==false)?"checked=\"true\"":"")+">" + Messages.getBodyString(locale,"MeridioConnector.IncludeSpecified") + "</input>\n"+ -" <input type=\"radio\" name=\"allmetadata\" value=\"true\" "+(allMetadata?"checked=\"true\"":"")+">" + Messages.getBodyString(locale,"MeridioConnector.IncludeAll") + "</input>\n"+ +" <input type=\"radio\" name=\""+seqPrefix+"allmetadata\" value=\"false\" "+((allMetadata==false)?"checked=\"true\"":"")+">" + Messages.getBodyString(locale,"MeridioConnector.IncludeSpecified") + "</input>\n"+ +" <input type=\"radio\" name=\""+seqPrefix+"allmetadata\" value=\"true\" "+(allMetadata?"checked=\"true\"":"")+">" + Messages.getBodyString(locale,"MeridioConnector.IncludeAll") + "</input>\n"+ " </nobr>\n"+ " </td>\n"+ " </tr>\n"+ @@ -2939,7 +2937,7 @@ public class MeridioConnector extends or out.print( " <td class=\"description\" colspan=\"1\"><nobr>" + Messages.getBodyString(locale,"MeridioConnector.Metadata") + "</nobr></td>\n"+ " <td class=\"value\" colspan=\"3\">\n"+ -" <input type=\"hidden\" name=\"specproperties_edit\" value=\"true\"/>\n" +" <input type=\"hidden\" name=\""+seqPrefix+"specproperties_edit\" value=\"true\"/>\n" ); k = 0; while (k < propertyList.length) @@ -2947,7 +2945,7 @@ public class MeridioConnector extends or String descriptor = propertyList[k++]; out.print( " <nobr>\n"+ -" <input type=\"checkbox\" name=\"specproperties\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(descriptor)+"\" "+((metadataSelected.get(descriptor)!=null)?"checked=\"true\"":"")+">\n"+ +" <input type=\"checkbox\" name=\""+seqPrefix+"specproperties\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(descriptor)+"\" "+((metadataSelected.get(descriptor)!=null)?"checked=\"true\"":"")+">\n"+ " "+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(descriptor)+"\n"+ " </input>\n"+ " </nobr>\n"+ @@ -2978,7 +2976,7 @@ public class MeridioConnector extends or " <tr>\n"+ " <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"MeridioConnector.PathAttributeMetadataName") + "</nobr></td>\n"+ " <td class=\"value\" colspan=\"3\"><nobr>\n"+ -" <input type=\"text\" size=\"16\" name=\"specpathnameattribute\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(pathNameAttribute)+"\"/></nobr>\n"+ +" <input type=\"text\" size=\"16\" name=\""+seqPrefix+"specpathnameattribute\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(pathNameAttribute)+"\"/></nobr>\n"+ " </td>\n"+ " </tr>\n"+ " <tr><td class=\"separator\" colspan=\"4\"><hr/></td></tr>\n" @@ -2990,14 +2988,14 @@ public class MeridioConnector extends or String replaceString = matchMap.getReplaceString(i); out.print( " <tr>\n"+ -" <td class=\"description\"><input type=\"hidden\" name=\""+"specmappingop_"+Integer.toString(i)+"\" value=\"\"/>\n"+ -" <a name=\""+"mapping_"+Integer.toString(i)+"\">\n"+ -" <input type=\"button\" onClick='Javascript:SpecDeleteMapping(Integer.toString(i),\"mapping_"+Integer.toString(i)+"\")' alt=\""+Messages.getAttributeString(locale,"MeridioConnector.DeleteMapping")+Integer.toString(i)+"\" value=\"Delete\"/>\n"+ +" <td class=\"description\"><input type=\"hidden\" name=\""+seqPrefix+"specmappingop_"+Integer.toString(i)+"\" value=\"\"/>\n"+ +" <a name=\""+seqPrefix+"mapping_"+Integer.toString(i)+"\">\n"+ +" <input type=\"button\" onClick='Javascript:"+seqPrefix+"SpecDeleteMapping(Integer.toString(i),\""+seqPrefix+"mapping_"+Integer.toString(i)+"\")' alt=\""+Messages.getAttributeString(locale,"MeridioConnector.DeleteMapping")+Integer.toString(i)+"\" value=\"Delete\"/>\n"+ " </a>\n"+ " </td>\n"+ -" <td class=\"value\"><input type=\"hidden\" name=\""+"specmatch_"+Integer.toString(i)+"\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(matchString)+"\"/>"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(matchString)+"</td>\n"+ +" <td class=\"value\"><input type=\"hidden\" name=\""+seqPrefix+"specmatch_"+Integer.toString(i)+"\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(matchString)+"\"/>"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(matchString)+"</td>\n"+ " <td class=\"value\">==></td>\n"+ -" <td class=\"value\"><input type=\"hidden\" name=\""+"specreplace_"+Integer.toString(i)+"\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(replaceString)+"\"/>"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(replaceString)+"</td>\n"+ +" <td class=\"value\"><input type=\"hidden\" name=\""+seqPrefix+"specreplace_"+Integer.toString(i)+"\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(replaceString)+"\"/>"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(replaceString)+"</td>\n"+ " </tr>\n" ); i++; @@ -3012,13 +3010,13 @@ public class MeridioConnector extends or " <tr><td class=\"lightseparator\" colspan=\"4\"><hr/></td></tr>\n"+ " <tr>\n"+ " <td class=\"description\">\n"+ -" <a name=\""+"mapping_"+Integer.toString(i)+"\">\n"+ -" <input type=\"button\" onClick='Javascript:SpecAddMapping(\"mapping_"+Integer.toString(i+1)+"\")' alt=\"" + Messages.getAttributeString(locale,"MeridioConnector.AddToMappings") + "\" value=\"Add\"/>\n"+ +" <a name=\""+seqPrefix+"mapping_"+Integer.toString(i)+"\">\n"+ +" <input type=\"button\" onClick='Javascript:"+seqPrefix+"SpecAddMapping(\""+seqPrefix+"mapping_"+Integer.toString(i+1)+"\")' alt=\"" + Messages.getAttributeString(locale,"MeridioConnector.AddToMappings") + "\" value=\"Add\"/>\n"+ " </a>\n"+ " </td>\n"+ -" <td class=\"value\">" + Messages.getBodyString(locale,"MeridioConnector.MatchRegexp") + " <input type=\"text\" name=\"specmatch\" size=\"32\" value=\"\"/></td>\n"+ +" <td class=\"value\">" + Messages.getBodyString(locale,"MeridioConnector.MatchRegexp") + " <input type=\"text\" name=\""+seqPrefix+"specmatch\" size=\"32\" value=\"\"/></td>\n"+ " <td class=\"value\">==></td>\n"+ -" <td class=\"value\">" + Messages.getBodyString(locale,"MeridioConnector.ReplaceString") + " <input type=\"text\" name=\"specreplace\" size=\"32\" value=\"\"/></td>\n"+ +" <td class=\"value\">" + Messages.getBodyString(locale,"MeridioConnector.ReplaceString") + " <input type=\"text\" name=\""+seqPrefix+"specreplace\" size=\"32\" value=\"\"/></td>\n"+ " </tr>\n"+ "</table>\n" ); @@ -3026,20 +3024,20 @@ public class MeridioConnector extends or else { out.print( -"<input type=\"hidden\" name=\"specproperties_edit\" value=\"true\"/>\n" +"<input type=\"hidden\" name=\""+seqPrefix+"specproperties_edit\" value=\"true\"/>\n" ); Iterator iter = metadataSelected.keySet().iterator(); while (iter.hasNext()) { String descriptor = (String)iter.next(); out.print( -"<input type=\"hidden\" name=\"specproperties\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(descriptor)+"\"/>\n" +"<input type=\"hidden\" name=\""+seqPrefix+"specproperties\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(descriptor)+"\"/>\n" ); } out.print( -"<input type=\"hidden\" name=\"allmetadata\" value=\""+(allMetadata?"true":"false")+"\"/>\n"+ -"<input type=\"hidden\" name=\"specpathnameattribute\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(pathNameAttribute)+"\"/>\n"+ -"<input type=\"hidden\" name=\"specmappingcount\" value=\""+Integer.toString(matchMap.getMatchCount())+"\"/>\n" +"<input type=\"hidden\" name=\""+seqPrefix+"allmetadata\" value=\""+(allMetadata?"true":"false")+"\"/>\n"+ +"<input type=\"hidden\" name=\""+seqPrefix+"specpathnameattribute\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(pathNameAttribute)+"\"/>\n"+ +"<input type=\"hidden\" name=\""+seqPrefix+"specmappingcount\" value=\""+Integer.toString(matchMap.getMatchCount())+"\"/>\n" ); i = 0; while (i < matchMap.getMatchCount()) @@ -3047,8 +3045,8 @@ public class MeridioConnector extends or String matchString = matchMap.getMatchString(i); String replaceString = matchMap.getReplaceString(i); out.print( -"<input type=\"hidden\" name=\""+"specmatch_"+Integer.toString(i)+"\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(matchString)+"\"/>\n"+ -"<input type=\"hidden\" name=\""+"specreplace_"+Integer.toString(i)+"\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(replaceString)+"\"/>\n" +"<input type=\"hidden\" name=\""+seqPrefix+"specmatch_"+Integer.toString(i)+"\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(matchString)+"\"/>\n"+ +"<input type=\"hidden\" name=\""+seqPrefix+"specreplace_"+Integer.toString(i)+"\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(replaceString)+"\"/>\n" ); i++; } @@ -3073,10 +3071,12 @@ public class MeridioConnector extends or int connectionSequenceNumber) throws ManifoldCFException { + String seqPrefix = "s"+connectionSequenceNumber+"_"; + int i; // Gather the path names - String x = variableContext.getParameter("specpath_total"); + String x = variableContext.getParameter(seqPrefix+"specpath_total"); if (x != null) { // Get rid of old specpath entries @@ -3095,8 +3095,8 @@ public class MeridioConnector extends or int count = Integer.parseInt(x); while (i < count) { - String path = variableContext.getParameter("specpath_"+Integer.toString(i)); - String pathOp = variableContext.getParameter("specpathop_"+Integer.toString(i)); + String path = variableContext.getParameter(seqPrefix+"specpath_"+Integer.toString(i)); + String pathOp = variableContext.getParameter(seqPrefix+"specpathop_"+Integer.toString(i)); if (pathOp == null || !pathOp.equals("Delete")) { SpecificationNode sn = new SpecificationNode("SearchPath"); @@ -3108,13 +3108,13 @@ public class MeridioConnector extends or // Do operation - x = variableContext.getParameter("specpathop"); + x = variableContext.getParameter(seqPrefix+"specpathop"); if (x != null) { // Retrieve current state information - String pathSoFar = variableContext.getParameter("specpathbase"); - String idsSoFar = variableContext.getParameter("specidsbase"); - Integer containerType = new Integer(variableContext.getParameter("spectype")); + String pathSoFar = variableContext.getParameter(seqPrefix+"specpathbase"); + String idsSoFar = variableContext.getParameter(seqPrefix+"specidsbase"); + Integer containerType = new Integer(variableContext.getParameter(seqPrefix+"spectype")); if (x.equals("Add")) { @@ -3128,7 +3128,7 @@ public class MeridioConnector extends or } else if (x.equals("AddToPath")) { - String pathField = variableContext.getParameter("specpath"); + String pathField = variableContext.getParameter(seqPrefix+"specpath"); int index = pathField.indexOf(";"); int secondIndex = pathField.indexOf(";",index+1); pathSoFar = pathSoFar + pathField.substring(secondIndex+1) + "/"; @@ -3143,15 +3143,15 @@ public class MeridioConnector extends or containerType = new Integer(org.apache.manifoldcf.crawler.connectors.meridio.MeridioClassContents.CLASS); } - currentContext.save("specpath",pathSoFar); - currentContext.save("specpathids",idsSoFar); - currentContext.save("specpathtype",containerType); + currentContext.save(seqPrefix+"specpath",pathSoFar); + currentContext.save(seqPrefix+"specpathids",idsSoFar); + currentContext.save(seqPrefix+"specpathtype",containerType); } } // Searchon parameter - x = variableContext.getParameter("specsearchon"); + x = variableContext.getParameter(seqPrefix+"specsearchon"); if (x != null) { i = 0; @@ -3170,7 +3170,7 @@ public class MeridioConnector extends or } // Categories parameter - String[] y = variableContext.getParameterValues("speccategories"); + String[] y = variableContext.getParameterValues(seqPrefix+"speccategories"); if (y != null) { i = 0; @@ -3194,7 +3194,7 @@ public class MeridioConnector extends or } // Properties parameter - x = variableContext.getParameter("specproperties_edit"); + x = variableContext.getParameter(seqPrefix+"specproperties_edit"); if (x != null && x.length() > 0) { i = 0; @@ -3207,7 +3207,7 @@ public class MeridioConnector extends or i++; } - y = variableContext.getParameterValues("specproperties"); + y = variableContext.getParameterValues(seqPrefix+"specproperties"); if (y != null) { i = 0; @@ -3238,7 +3238,7 @@ public class MeridioConnector extends or // Mime types parameter - y = variableContext.getParameterValues("specmimetypes"); + y = variableContext.getParameterValues(seqPrefix+"specmimetypes"); if (y != null) { i = 0; @@ -3261,7 +3261,7 @@ public class MeridioConnector extends or } } - x = variableContext.getParameter("specsecurity"); + x = variableContext.getParameter(seqPrefix+"specsecurity"); if (x != null) { // Delete all security entries first @@ -3281,7 +3281,7 @@ public class MeridioConnector extends or } - x = variableContext.getParameter("tokencount"); + x = variableContext.getParameter(seqPrefix+"tokencount"); if (x != null) { // Delete all file specs first @@ -3300,7 +3300,7 @@ public class MeridioConnector extends or while (i < accessCount) { String accessDescription = "_"+Integer.toString(i); - String accessOpName = "accessop"+accessDescription; + String accessOpName = seqPrefix+"accessop"+accessDescription; String xc = variableContext.getParameter(accessOpName); if (xc != null && xc.equals("Delete")) { @@ -3309,24 +3309,24 @@ public class MeridioConnector extends or 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); } } - x = variableContext.getParameter("specpathnameattribute"); + x = variableContext.getParameter(seqPrefix+"specpathnameattribute"); if (x != null && x.length() > 0) { i = 0; @@ -3343,7 +3343,7 @@ public class MeridioConnector extends or ds.addChild(ds.getChildCount(),node); } - x = variableContext.getParameter("specmappingcount"); + x = variableContext.getParameter(seqPrefix+"specmappingcount"); if (x != null && x.length() > 0) { // Delete old spec @@ -3365,7 +3365,7 @@ public class MeridioConnector extends or while (i < mappingCount) { String pathDescription = "_"+Integer.toString(i); - String pathOpName = "specmappingop"+pathDescription; + String pathOpName = seqPrefix+"specmappingop"+pathDescription; x = variableContext.getParameter(pathOpName); if (x != null && x.equals("Delete")) { @@ -3374,8 +3374,8 @@ public class MeridioConnector extends or continue; } // Inserts won't happen until the very end - String match = variableContext.getParameter("specmatch"+pathDescription); - String replace = variableContext.getParameter("specreplace"+pathDescription); + String match = variableContext.getParameter(seqPrefix+"specmatch"+pathDescription); + String replace = variableContext.getParameter(seqPrefix+"specreplace"+pathDescription); SpecificationNode node = new SpecificationNode("pathmap"); node.setAttribute("match",match); node.setAttribute("replace",replace); @@ -3384,11 +3384,11 @@ public class MeridioConnector extends or } // Check for add - x = variableContext.getParameter("specmappingop"); + x = variableContext.getParameter(seqPrefix+"specmappingop"); if (x != null && x.equals("Add")) { - String match = variableContext.getParameter("specmatch"); - String replace = variableContext.getParameter("specreplace"); + String match = variableContext.getParameter(seqPrefix+"specmatch"); + String replace = variableContext.getParameter(seqPrefix+"specreplace"); SpecificationNode node = new SpecificationNode("pathmap"); node.setAttribute("match",match); node.setAttribute("replace",replace); @@ -3396,7 +3396,7 @@ public class MeridioConnector extends or } } - x = variableContext.getParameter("allmetadata"); + x = variableContext.getParameter(seqPrefix+"allmetadata"); if (x != null) { i = 0;
Modified: manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/RSSConnector.java URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/RSSConnector.java?rev=1622740&r1=1622739&r2=1622740&view=diff ============================================================================== --- manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/RSSConnector.java (original) +++ manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/RSSConnector.java Fri Sep 5 16:48:06 2014 @@ -1896,79 +1896,81 @@ public class RSSConnector extends org.ap tabsArray.add(Messages.getString(locale,"RSSConnector.TimeValues")); tabsArray.add(Messages.getString(locale,"RSSConnector.Security")); tabsArray.add(Messages.getString(locale,"RSSConnector.DechromedContent")); + String seqPrefix = "s"+connectionSequenceNumber+"_"; + out.print( "<script type=\"text/javascript\">\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 AddRegexp(anchorvalue)\n"+ +"function "+seqPrefix+"AddRegexp(anchorvalue)\n"+ "{\n"+ -" if (editjob.rssmatch.value == \"\")\n"+ +" if (editjob."+seqPrefix+"rssmatch.value == \"\")\n"+ " {\n"+ " alert(\""+Messages.getBodyJavascriptString(locale,"RSSConnector.MatchMustHaveARegexpValue")+"\");\n"+ -" editjob.rssmatch.focus();\n"+ +" editjob."+seqPrefix+"rssmatch.focus();\n"+ " return;\n"+ " }\n"+ "\n"+ -" SpecOp(\"rssop\",\"Add\",anchorvalue);\n"+ +" "+seqPrefix+"SpecOp(\""+seqPrefix+"rssop\",\"Add\",anchorvalue);\n"+ "}\n"+ "\n"+ -"function RemoveRegexp(index, anchorvalue)\n"+ +"function "+seqPrefix+"RemoveRegexp(index, anchorvalue)\n"+ "{\n"+ -" editjob.rssindex.value = index;\n"+ -" SpecOp(\"rssop\",\"Delete\",anchorvalue);\n"+ +" editjob."+seqPrefix+"rssindex.value = index;\n"+ +" "+seqPrefix+"SpecOp(\""+seqPrefix+"rssop\",\"Delete\",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,"RSSConnector.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 URLRegexpDelete(index, anchorvalue)\n"+ +"function "+seqPrefix+"URLRegexpDelete(index, anchorvalue)\n"+ "{\n"+ -" editjob.urlregexpnumber.value = index;\n"+ -" SpecOp(\"urlregexpop\",\"Delete\",anchorvalue);\n"+ +" editjob."+seqPrefix+"urlregexpnumber.value = index;\n"+ +" "+seqPrefix+"SpecOp(\""+seqPrefix+"urlregexpop\",\"Delete\",anchorvalue);\n"+ "}\n"+ "\n"+ -"function URLRegexpAdd(anchorvalue)\n"+ +"function "+seqPrefix+"URLRegexpAdd(anchorvalue)\n"+ "{\n"+ -" SpecOp(\"urlregexpop\",\"Add\",anchorvalue);\n"+ +" "+seqPrefix+"SpecOp(\""+seqPrefix+"urlregexpop\",\"Add\",anchorvalue);\n"+ "}\n"+ "\n"+ -"function checkSpecification()\n"+ +"function "+seqPrefix+"checkSpecification()\n"+ "{\n"+ -" if (editjob.feedtimeout.value == \"\" || !isInteger(editjob.feedtimeout.value))\n"+ +" if (editjob."+seqPrefix+"feedtimeout.value == \"\" || !isInteger(editjob."+seqPrefix+"feedtimeout.value))\n"+ " {\n"+ " alert(\""+Messages.getBodyJavascriptString(locale,"RSSConnector.ATimeoutValueInSecondsIsRequired")+"\");\n"+ -" editjob.feedtimeout.focus();\n"+ +" editjob."+seqPrefix+"feedtimeout.focus();\n"+ " return false;\n"+ " }\n"+ -" if (editjob.feedrefetch.value == \"\" || !isInteger(editjob.feedrefetch.value))\n"+ +" if (editjob."+seqPrefix+"feedrefetch.value == \"\" || !isInteger(editjob."+seqPrefix+"feedrefetch.value))\n"+ " {\n"+ " alert(\""+Messages.getBodyJavascriptString(locale,"RSSConnector.ARefetchIntervalInMinutesIsRequired")+"\");\n"+ -" editjob.feedrefetch.focus();\n"+ +" editjob."+seqPrefix+"feedrefetch.focus();\n"+ " return false;\n"+ " }\n"+ -" if (editjob.minfeedrefetch.value == \"\" || !isInteger(editjob.minfeedrefetch.value))\n"+ +" if (editjob."+seqPrefix+"minfeedrefetch.value == \"\" || !isInteger(editjob."+seqPrefix+"minfeedrefetch.value))\n"+ " {\n"+ " alert(\""+Messages.getBodyJavascriptString(locale,"RSSConnector.AMinimumRefetchIntervalInMinutesIsRequire")+"\");\n"+ -" editjob.minfeedrefetch.focus();\n"+ +" editjob."+seqPrefix+"minfeedrefetch.focus();\n"+ " return false;\n"+ " }\n"+ -" if (editjob.badfeedrefetch.value != \"\" && !isInteger(editjob.badfeedrefetch.value))\n"+ +" if (editjob."+seqPrefix+"badfeedrefetch.value != \"\" && !isInteger(editjob."+seqPrefix+"badfeedrefetch.value))\n"+ " {\n"+ " alert(\""+Messages.getBodyJavascriptString(locale,"RSSConnector.ABadFeedRefetchIntervalInMinutesIsRequired")+"\");\n"+ -" editjob.badfeedrefetch.focus();\n"+ +" editjob."+seqPrefix+"badfeedrefetch.focus();\n"+ " return false;\n"+ " }\n"+ "\n"+ @@ -1999,6 +2001,8 @@ public class RSSConnector extends org.ap int connectionSequenceNumber, int actualSequenceNumber, String tabName) throws ManifoldCFException, IOException { + String seqPrefix = "s"+connectionSequenceNumber+"_"; + int i; int k; @@ -2068,14 +2072,14 @@ public class RSSConnector extends org.ap // URLs tab - if (tabName.equals(Messages.getString(locale,"RSSConnector.URLs"))) + if (tabName.equals(Messages.getString(locale,"RSSConnector.URLs")) && connectionSequenceNumber == actualSequenceNumber) { out.print( "<table class=\"displaytable\">\n"+ " <tr><td class=\"separator\" colspan=\"2\"><hr/></td></tr>\n"+ " <tr>\n"+ " <td class=\"value\" colspan=\"2\">\n"+ -" <textarea rows=\"25\" cols=\"80\" name=\"rssurls\">"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(sb.toString())+"</textarea>\n"+ +" <textarea rows=\"25\" cols=\"80\" name=\""+seqPrefix+"rssurls\">"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(sb.toString())+"</textarea>\n"+ " </td>\n"+ " </tr>\n"+ "</table>\n" @@ -2084,12 +2088,12 @@ public class RSSConnector extends org.ap else { out.print( -"<input type=\"hidden\" name=\"rssurls\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(sb.toString())+"\"/>\n" +"<input type=\"hidden\" name=\""+seqPrefix+"rssurls\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(sb.toString())+"\"/>\n" ); } // Exclusions tab - if (tabName.equals(Messages.getString(locale,"RSSConnector.Exclusions"))) + if (tabName.equals(Messages.getString(locale,"RSSConnector.Exclusions")) && connectionSequenceNumber == actualSequenceNumber) { out.print( "<table class=\"displaytable\">\n"+ @@ -2097,7 +2101,7 @@ public class RSSConnector extends org.ap " <tr>\n"+ " <td class=\"description\" colspan=\"1\"><nobr>" + Messages.getBodyString(locale,"RSSConnector.Exclude") + "</nobr></td>\n"+ " <td class=\"value\" colspan=\"1\">\n"+ -" <textarea rows=\"25\" cols=\"60\" name=\"exclusions\">"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(exclusions)+"</textarea>\n"+ +" <textarea rows=\"25\" cols=\"60\" name=\""+seqPrefix+"exclusions\">"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(exclusions)+"</textarea>\n"+ " </td>\n"+ " </tr>\n"+ "</table>\n" @@ -2106,20 +2110,20 @@ public class RSSConnector extends org.ap else { out.print( -"<input type=\"hidden\" name=\"exclusions\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(exclusions)+"\"/>\n" +"<input type=\"hidden\" name=\""+seqPrefix+"exclusions\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(exclusions)+"\"/>\n" ); } // Canonicalization tab - if (tabName.equals(Messages.getString(locale,"RSSConnector.Canonicalization"))) + if (tabName.equals(Messages.getString(locale,"RSSConnector.Canonicalization")) && connectionSequenceNumber == actualSequenceNumber) { out.print( "<table class=\"displaytable\">\n"+ " <tr><td class=\"separator\" colspan=\"2\"><hr/></td></tr>\n"+ " <tr>\n"+ " <td class=\"boxcell\" colspan=\"2\">\n"+ -" <input type=\"hidden\" name=\"urlregexpop\" value=\"Continue\"/>\n"+ -" <input type=\"hidden\" name=\"urlregexpnumber\" value=\"\"/>\n"+ +" <input type=\"hidden\" name=\""+seqPrefix+"urlregexpop\" value=\"Continue\"/>\n"+ +" <input type=\"hidden\" name=\""+seqPrefix+"urlregexpnumber\" value=\"\"/>\n"+ " <table class=\"formtable\">\n"+ " <tr class=\"formheaderrow\">\n"+ " <td class=\"formcolumnheader\"></td>\n"+ @@ -2162,18 +2166,18 @@ public class RSSConnector extends org.ap out.print( " <tr class=\""+(((l % 2)==0)?"evenformrow":"oddformrow")+"\">\n"+ " <td class=\"formcolumncell\">\n"+ -" <a name=\""+"urlregexp_"+Integer.toString(l)+"\">\n"+ -" <input type=\"button\" value=\"Delete\" alt=\""+Messages.getAttributeString(locale,"RSSConnector.DeleteUrlRegexp")+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(regexpString)+"\" onclick='javascript:URLRegexpDelete("+Integer.toString(l)+",\"urlregexp_"+Integer.toString(l)+"\");'/>\n"+ +" <a name=\""+seqPrefix+"urlregexp_"+Integer.toString(l)+"\">\n"+ +" <input type=\"button\" value=\"Delete\" alt=\""+Messages.getAttributeString(locale,"RSSConnector.DeleteUrlRegexp")+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(regexpString)+"\" onclick='javascript:"+seqPrefix+"URLRegexpDelete("+Integer.toString(l)+",\""+seqPrefix+"urlregexp_"+Integer.toString(l)+"\");'/>\n"+ " </a>\n"+ " </td>\n"+ " <td class=\"formcolumncell\">\n"+ -" <input type=\"hidden\" name=\""+"urlregexp_"+Integer.toString(l)+"\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(regexpString)+"\"/>\n"+ -" <input type=\"hidden\" name=\""+"urlregexpdesc_"+Integer.toString(l)+"\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(description)+"\"/>\n"+ -" <input type=\"hidden\" name=\""+"urlregexpreorder_"+Integer.toString(l)+"\" value=\""+allowReorder+"\"/>\n"+ -" <input type=\"hidden\" name=\""+"urlregexpjava_"+Integer.toString(l)+"\" value=\""+allowJavaSessionRemoval+"\"/>\n"+ -" <input type=\"hidden\" name=\""+"urlregexpasp_"+Integer.toString(l)+"\" value=\""+allowASPSessionRemoval+"\"/>\n"+ -" <input type=\"hidden\" name=\""+"urlregexpphp_"+Integer.toString(l)+"\" value=\""+allowPHPSessionRemoval+"\"/>\n"+ -" <input type=\"hidden\" name=\""+"urlregexpbv_"+Integer.toString(l)+"\" value=\""+allowBVSessionRemoval+"\"/>\n"+ +" <input type=\"hidden\" name=\""+seqPrefix+"urlregexp_"+Integer.toString(l)+"\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(regexpString)+"\"/>\n"+ +" <input type=\"hidden\" name=\""+seqPrefix+"urlregexpdesc_"+Integer.toString(l)+"\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(description)+"\"/>\n"+ +" <input type=\"hidden\" name=\""+seqPrefix+"urlregexpreorder_"+Integer.toString(l)+"\" value=\""+allowReorder+"\"/>\n"+ +" <input type=\"hidden\" name=\""+seqPrefix+"urlregexpjava_"+Integer.toString(l)+"\" value=\""+allowJavaSessionRemoval+"\"/>\n"+ +" <input type=\"hidden\" name=\""+seqPrefix+"urlregexpasp_"+Integer.toString(l)+"\" value=\""+allowASPSessionRemoval+"\"/>\n"+ +" <input type=\"hidden\" name=\""+seqPrefix+"urlregexpphp_"+Integer.toString(l)+"\" value=\""+allowPHPSessionRemoval+"\"/>\n"+ +" <input type=\"hidden\" name=\""+seqPrefix+"urlregexpbv_"+Integer.toString(l)+"\" value=\""+allowBVSessionRemoval+"\"/>\n"+ " <nobr>"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(regexpString)+"</nobr>\n"+ " </td>\n"+ " <td class=\"formcolumncell\">"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description)+"</td>\n"+ @@ -2198,18 +2202,18 @@ public class RSSConnector extends org.ap " <tr class=\"formrow\"><td colspan=\"8\" class=\"formseparator\"><hr/></td></tr>\n"+ " <tr class=\"formrow\">\n"+ " <td class=\"formcolumncell\">\n"+ -" <a name=\""+"urlregexp_"+Integer.toString(l)+"\">\n"+ -" <input type=\"button\" value=\"Add\" alt=\""+Messages.getAttributeString(locale,"RSSConnector.AddUlRegexp")+"\" onclick='javascript:URLRegexpAdd(\"urlregexp_"+Integer.toString(l+1)+"\");'/>\n"+ -" <input type=\"hidden\" name=\"urlregexpcount\" value=\""+Integer.toString(l)+"\"/>\n"+ +" <a name=\""+seqPrefix+"urlregexp_"+Integer.toString(l)+"\">\n"+ +" <input type=\"button\" value=\"Add\" alt=\""+Messages.getAttributeString(locale,"RSSConnector.AddUlRegexp")+"\" onclick='javascript:"+seqPrefix+"URLRegexpAdd(\""+seqPrefix+"urlregexp_"+Integer.toString(l+1)+"\");'/>\n"+ +" <input type=\"hidden\" name=\""+seqPrefix+"urlregexpcount\" value=\""+Integer.toString(l)+"\"/>\n"+ " </a>\n"+ " </td>\n"+ -" <td class=\"formcolumncell\"><input type=\"text\" name=\"urlregexp\" size=\"30\" value=\"\"/></td>\n"+ -" <td class=\"formcolumncell\"><input type=\"text\" name=\"urlregexpdesc\" size=\"30\" value=\"\"/></td>\n"+ -" <td class=\"formcolumncell\"><input type=\"checkbox\" name=\"urlregexpreorder\" value=\"yes\"/></td>\n"+ -" <td class=\"formcolumncell\"><input type=\"checkbox\" name=\"urlregexpjava\" value=\"yes\" checked=\"true\"/></td>\n"+ -" <td class=\"formcolumncell\"><input type=\"checkbox\" name=\"urlregexpasp\" value=\"yes\" checked=\"true\"/></td>\n"+ -" <td class=\"formcolumncell\"><input type=\"checkbox\" name=\"urlregexpphp\" value=\"yes\" checked=\"true\"/></td>\n"+ -" <td class=\"formcolumncell\"><input type=\"checkbox\" name=\"urlregexpbv\" value=\"yes\" checked=\"true\"/></td>\n"+ +" <td class=\"formcolumncell\"><input type=\"text\" name=\""+seqPrefix+"urlregexp\" size=\"30\" value=\"\"/></td>\n"+ +" <td class=\"formcolumncell\"><input type=\"text\" name=\""+seqPrefix+"urlregexpdesc\" size=\"30\" value=\"\"/></td>\n"+ +" <td class=\"formcolumncell\"><input type=\"checkbox\" name=\""+seqPrefix+"urlregexpreorder\" value=\"yes\"/></td>\n"+ +" <td class=\"formcolumncell\"><input type=\"checkbox\" name=\""+seqPrefix+"urlregexpjava\" value=\"yes\" checked=\"true\"/></td>\n"+ +" <td class=\"formcolumncell\"><input type=\"checkbox\" name=\""+seqPrefix+"urlregexpasp\" value=\"yes\" checked=\"true\"/></td>\n"+ +" <td class=\"formcolumncell\"><input type=\"checkbox\" name=\""+seqPrefix+"urlregexpphp\" value=\"yes\" checked=\"true\"/></td>\n"+ +" <td class=\"formcolumncell\"><input type=\"checkbox\" name=\""+seqPrefix+"urlregexpbv\" value=\"yes\" checked=\"true\"/></td>\n"+ " </tr>\n"+ " </table>\n"+ " </td>\n"+ @@ -2248,30 +2252,30 @@ public class RSSConnector extends org.ap if (allowBVSessionRemoval == null || allowBVSessionRemoval.length() == 0) allowBVSessionRemoval = RSSConfig.VALUE_NO; out.print( -"<input type=\"hidden\" name=\""+"urlregexp_"+Integer.toString(l)+"\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(regexpString)+"\"/>\n"+ -"<input type=\"hidden\" name=\""+"urlregexpdesc_"+Integer.toString(l)+"\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(description)+"\"/>\n"+ -"<input type=\"hidden\" name=\""+"urlregexpreorder_"+Integer.toString(l)+"\" value=\""+allowReorder+"\"/>\n"+ -"<input type=\"hidden\" name=\""+"urlregexpjava_"+Integer.toString(l)+"\" value=\""+allowJavaSessionRemoval+"\"/>\n"+ -"<input type=\"hidden\" name=\""+"urlregexpasp_"+Integer.toString(l)+"\" value=\""+allowASPSessionRemoval+"\"/>\n"+ -"<input type=\"hidden\" name=\""+"urlregexpphp_"+Integer.toString(l)+"\" value=\""+allowPHPSessionRemoval+"\"/>\n"+ -"<input type=\"hidden\" name=\""+"urlregexpbv_"+Integer.toString(l)+"\" value=\""+allowBVSessionRemoval+"\"/>\n" +"<input type=\"hidden\" name=\""+seqPrefix+"urlregexp_"+Integer.toString(l)+"\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(regexpString)+"\"/>\n"+ +"<input type=\"hidden\" name=\""+seqPrefix+"urlregexpdesc_"+Integer.toString(l)+"\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(description)+"\"/>\n"+ +"<input type=\"hidden\" name=\""+seqPrefix+"urlregexpreorder_"+Integer.toString(l)+"\" value=\""+allowReorder+"\"/>\n"+ +"<input type=\"hidden\" name=\""+seqPrefix+"urlregexpjava_"+Integer.toString(l)+"\" value=\""+allowJavaSessionRemoval+"\"/>\n"+ +"<input type=\"hidden\" name=\""+seqPrefix+"urlregexpasp_"+Integer.toString(l)+"\" value=\""+allowASPSessionRemoval+"\"/>\n"+ +"<input type=\"hidden\" name=\""+seqPrefix+"urlregexpphp_"+Integer.toString(l)+"\" value=\""+allowPHPSessionRemoval+"\"/>\n"+ +"<input type=\"hidden\" name=\""+seqPrefix+"urlregexpbv_"+Integer.toString(l)+"\" value=\""+allowBVSessionRemoval+"\"/>\n" ); l++; } } out.print( -"<input type=\"hidden\" name=\"urlregexpcount\" value=\""+Integer.toString(l)+"\"/>\n" +"<input type=\"hidden\" name=\""+seqPrefix+"urlregexpcount\" value=\""+Integer.toString(l)+"\"/>\n" ); } // Mappings tab - if (tabName.equals(Messages.getString(locale,"RSSConnector.URLMappings"))) + if (tabName.equals(Messages.getString(locale,"RSSConnector.URLMappings")) && connectionSequenceNumber == actualSequenceNumber) { out.print( -"<input type=\"hidden\" name=\"rssop\" value=\"\"/>\n"+ -"<input type=\"hidden\" name=\"rssindex\" value=\"\"/>\n"+ -"<input type=\"hidden\" name=\"rssmapcount\" value=\""+Integer.toString(regexp.size())+"\"/>\n"+ +"<input type=\"hidden\" name=\""+seqPrefix+"rssop\" value=\"\"/>\n"+ +"<input type=\"hidden\" name=\""+seqPrefix+"rssindex\" value=\"\"/>\n"+ +"<input type=\"hidden\" name=\""+seqPrefix+"rssmapcount\" value=\""+Integer.toString(regexp.size())+"\"/>\n"+ "\n"+ "<table class=\"displaytable\">\n"+ " <tr><td class=\"separator\" colspan=\"4\"><hr/></td></tr>\n" @@ -2280,12 +2284,12 @@ public class RSSConnector extends org.ap i = 0; while (i < regexp.size()) { - String prefix = "rssregexp_"+Integer.toString(i)+"_"; + String prefix = seqPrefix+"rssregexp_"+Integer.toString(i)+"_"; out.print( " <tr>\n"+ " <td class=\"value\">\n"+ -" <a name=\""+"regexp_"+Integer.toString(i)+"\">\n"+ -" <input type=\"button\" value=\"Remove\" onclick='javascript:RemoveRegexp("+Integer.toString(i)+",\"regexp_"+Integer.toString(i)+"\")' alt=\""+Messages.getAttributeString(locale,"RSSConnector.RemoveRegexp")+Integer.toString(i)+"\"/>\n"+ +" <a name=\""+seqPrefix+"regexp_"+Integer.toString(i)+"\">\n"+ +" <input type=\"button\" value=\"Remove\" onclick='javascript:"+seqPrefix+"RemoveRegexp("+Integer.toString(i)+",\""+seqPrefix+"regexp_"+Integer.toString(i)+"\")' alt=\""+Messages.getAttributeString(locale,"RSSConnector.RemoveRegexp")+Integer.toString(i)+"\"/>\n"+ " </a>\n"+ " </td>\n"+ " <td class=\"value\"><input type=\"hidden\" name=\""+prefix+"match"+"\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape((String)regexp.get(i))+"\"/>"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape((String)regexp.get(i))+"</td>\n"+ @@ -2316,10 +2320,10 @@ public class RSSConnector extends org.ap } out.print( " <tr>\n"+ -" <td class=\"value\"><a name=\""+"regexp_"+Integer.toString(i)+"\"><input type=\"button\" value=\"Add\" onclick='javascript:AddRegexp(\"regexp_"+Integer.toString(i+1)+"\")' alt=\""+Messages.getAttributeString(locale,"RSSConnector.AddRegexp")+"\"/></a></td>\n"+ -" <td class=\"value\"><input type=\"text\" name=\"rssmatch\" size=\"16\" value=\"\"/></td>\n"+ +" <td class=\"value\"><a name=\""+seqPrefix+"regexp_"+Integer.toString(i)+"\"><input type=\"button\" value=\"Add\" onclick='javascript:"+seqPrefix+"AddRegexp(\""+seqPrefix+"regexp_"+Integer.toString(i+1)+"\")' alt=\""+Messages.getAttributeString(locale,"RSSConnector.AddRegexp")+"\"/></a></td>\n"+ +" <td class=\"value\"><input type=\"text\" name=\""+seqPrefix+"rssmatch\" size=\"16\" value=\"\"/></td>\n"+ " <td class=\"value\">==></td>\n"+ -" <td class=\"value\"><input type=\"text\" name=\"rssmap\" size=\"16\" value=\"\"/></td>\n"+ +" <td class=\"value\"><input type=\"text\" name=\""+seqPrefix+"rssmap\" size=\"16\" value=\"\"/></td>\n"+ " </tr>\n"+ "</table>\n" ); @@ -2327,12 +2331,12 @@ public class RSSConnector extends org.ap else { out.print( -"<input type=\"hidden\" name=\"rssmapcount\" value=\""+Integer.toString(regexp.size())+"\"/>\n" +"<input type=\"hidden\" name=\""+seqPrefix+"rssmapcount\" value=\""+Integer.toString(regexp.size())+"\"/>\n" ); i = 0; while (i < regexp.size()) { - String prefix = "rssregexp_"+Integer.toString(i)+"_"; + String prefix = seqPrefix+"rssregexp_"+Integer.toString(i)+"_"; String match = (String)matchStrings.get(i); out.print( "<input type=\"hidden\" name=\""+prefix+"match"+"\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape((String)regexp.get(i))+"\"/>\n"+ @@ -2343,28 +2347,28 @@ public class RSSConnector extends org.ap } // Timeout Value tab - if (tabName.equals(Messages.getString(locale,"RSSConnector.TimeValues"))) + if (tabName.equals(Messages.getString(locale,"RSSConnector.TimeValues")) && 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,"RSSConnector.FeedConnectTimeout")+"</nobr></td>\n"+ -" <td class=\"value\"><input type=\"text\" size=\"5\" name=\"feedtimeout\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(Integer.toString(feedTimeoutValue))+"\"/></td>\n"+ +" <td class=\"value\"><input type=\"text\" size=\"5\" name=\""+seqPrefix+"feedtimeout\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(Integer.toString(feedTimeoutValue))+"\"/></td>\n"+ " </tr>\n"+ " <tr>\n"+ " <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"RSSConnector.DefaultFeedRefetchTime")+"</nobr></td>\n"+ -" <td class=\"value\"><input type=\"text\" size=\"5\" name=\"feedrefetch\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(Integer.toString(feedRefetchValue))+"\"/></td>\n"+ +" <td class=\"value\"><input type=\"text\" size=\"5\" name=\""+seqPrefix+"feedrefetch\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(Integer.toString(feedRefetchValue))+"\"/></td>\n"+ " </tr>\n"+ " <tr>\n"+ " <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"RSSConnector.MinimumFeedRefetchTime")+"</nobr></td>\n"+ -" <td class=\"value\"><input type=\"text\" size=\"5\" name=\"minfeedrefetch\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(Integer.toString(minFeedRefetchValue))+"\"/></td>\n"+ +" <td class=\"value\"><input type=\"text\" size=\"5\" name=\""+seqPrefix+"minfeedrefetch\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(Integer.toString(minFeedRefetchValue))+"\"/></td>\n"+ " </tr>\n"+ " <tr>\n"+ " <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"RSSConnector.BadFeedRefetchTime")+"</nobr></td>\n"+ " <td class=\"value\">\n"+ -" <input type=\"hidden\" name=\"badfeedrefetch_present\" value=\"true\"/>\n"+ -" <input type=\"text\" size=\"5\" name=\"badfeedrefetch\" value=\""+((badFeedRefetchValue==null)?"":org.apache.manifoldcf.ui.util.Encoder.attributeEscape(badFeedRefetchValue.toString()))+"\"/>\n"+ +" <input type=\"hidden\" name=\""+seqPrefix+"badfeedrefetch_present\" value=\"true\"/>\n"+ +" <input type=\"text\" size=\"5\" name=\""+seqPrefix+"badfeedrefetch\" value=\""+((badFeedRefetchValue==null)?"":org.apache.manifoldcf.ui.util.Encoder.attributeEscape(badFeedRefetchValue.toString()))+"\"/>\n"+ " </td>\n"+ " </tr>\n"+ "\n"+ @@ -2374,11 +2378,11 @@ public class RSSConnector extends org.ap else { out.print( -"<input type=\"hidden\" name=\"feedtimeout\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(Integer.toString(feedTimeoutValue))+"\"/>\n"+ -"<input type=\"hidden\" name=\"feedrefetch\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(Integer.toString(feedRefetchValue))+"\"/>\n"+ -"<input type=\"hidden\" name=\"minfeedrefetch\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(Integer.toString(minFeedRefetchValue))+"\"/>\n"+ -"<input type=\"hidden\" name=\"badfeedrefetch_present\" value=\"true\"/>\n"+ -"<input type=\"hidden\" name=\"badfeedrefetch\" value=\""+((badFeedRefetchValue==null)?"":org.apache.manifoldcf.ui.util.Encoder.attributeEscape(badFeedRefetchValue.toString()))+"\"/>\n" +"<input type=\"hidden\" name=\""+seqPrefix+"feedtimeout\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(Integer.toString(feedTimeoutValue))+"\"/>\n"+ +"<input type=\"hidden\" name=\""+seqPrefix+"feedrefetch\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(Integer.toString(feedRefetchValue))+"\"/>\n"+ +"<input type=\"hidden\" name=\""+seqPrefix+"minfeedrefetch\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(Integer.toString(minFeedRefetchValue))+"\"/>\n"+ +"<input type=\"hidden\" name=\""+seqPrefix+"badfeedrefetch_present\" value=\"true\"/>\n"+ +"<input type=\"hidden\" name=\""+seqPrefix+"badfeedrefetch\" value=\""+((badFeedRefetchValue==null)?"":org.apache.manifoldcf.ui.util.Encoder.attributeEscape(badFeedRefetchValue.toString()))+"\"/>\n" ); } @@ -2394,31 +2398,31 @@ public class RSSConnector extends org.ap else if (sn.getType().equals(RSSConfig.NODE_CHROMEDMODE)) chromedMode = sn.getAttributeValue(RSSConfig.ATTR_MODE); } - if (tabName.equals(Messages.getString(locale,"RSSConnector.DechromedContent"))) + if (tabName.equals(Messages.getString(locale,"RSSConnector.DechromedContent")) && connectionSequenceNumber == actualSequenceNumber) { out.print( "<table class=\"displaytable\">\n"+ " <tr><td class=\"separator\" colspan=\"1\"><hr/></td></tr>\n"+ " <tr>\n"+ -" <td class=\"value\"><nobr><input type=\"radio\" name=\"dechromedmode\" value=\"none\" "+(dechromedMode.equals(RSSConfig.VALUE_NONE)?"checked=\"true\"":"")+"/>"+Messages.getBodyString(locale,"RSSConnector.NoDechromedContent")+"</nobr></td>\n"+ +" <td class=\"value\"><nobr><input type=\"radio\" name=\""+seqPrefix+"dechromedmode\" value=\"none\" "+(dechromedMode.equals(RSSConfig.VALUE_NONE)?"checked=\"true\"":"")+"/>"+Messages.getBodyString(locale,"RSSConnector.NoDechromedContent")+"</nobr></td>\n"+ " </tr>\n"+ " <tr>\n"+ -" <td class=\"value\"><nobr><input type=\"radio\" name=\"dechromedmode\" value=\"description\" "+(dechromedMode.equals(RSSConfig.VALUE_DESCRIPTION)?"checked=\"true\"":"")+"/>"+Messages.getBodyString(locale,"RSSConnector.DechromedContentIfPresentInDescriptionField")+"</nobr></td>\n"+ +" <td class=\"value\"><nobr><input type=\"radio\" name=\""+seqPrefix+"dechromedmode\" value=\"description\" "+(dechromedMode.equals(RSSConfig.VALUE_DESCRIPTION)?"checked=\"true\"":"")+"/>"+Messages.getBodyString(locale,"RSSConnector.DechromedContentIfPresentInDescriptionField")+"</nobr></td>\n"+ " </tr>\n"+ " <tr>\n"+ -" <td class=\"value\"><nobr><input type=\"radio\" name=\"dechromedmode\" value=\"content\" "+(dechromedMode.equals(RSSConfig.VALUE_CONTENT)?"checked=\"true\"":"")+"/>"+Messages.getBodyString(locale,"RSSConnector.DechromedContentIfPresentInContentField")+"</nobr></td>\n"+ +" <td class=\"value\"><nobr><input type=\"radio\" name=\""+seqPrefix+"dechromedmode\" value=\"content\" "+(dechromedMode.equals(RSSConfig.VALUE_CONTENT)?"checked=\"true\"":"")+"/>"+Messages.getBodyString(locale,"RSSConnector.DechromedContentIfPresentInContentField")+"</nobr></td>\n"+ " </tr>\n"+ " <tr>\n"+ " <td class=\"separator\"><hr/></td>\n"+ " </tr>\n"+ " <tr>\n"+ -" <td class=\"value\"><nobr><input type=\"radio\" name=\"chromedmode\" value=\"use\" "+(chromedMode.equals(RSSConfig.VALUE_USE)?"checked=\"true\"":"")+"/>"+Messages.getBodyString(locale,"RSSConnector.UseChromedContentIfNoDechromedContentFound")+"</nobr></td>\n"+ +" <td class=\"value\"><nobr><input type=\"radio\" name=\""+seqPrefix+"chromedmode\" value=\"use\" "+(chromedMode.equals(RSSConfig.VALUE_USE)?"checked=\"true\"":"")+"/>"+Messages.getBodyString(locale,"RSSConnector.UseChromedContentIfNoDechromedContentFound")+"</nobr></td>\n"+ " </tr>\n"+ " <tr>\n"+ -" <td class=\"value\"><nobr><input type=\"radio\" name=\"chromedmode\" value=\"skip\" "+(chromedMode.equals(RSSConfig.VALUE_SKIP)?"checked=\"true\"":"")+"/>"+Messages.getBodyString(locale,"RSSConnector.NeverUseChromedContent")+"</nobr></td>\n"+ +" <td class=\"value\"><nobr><input type=\"radio\" name=\""+seqPrefix+"chromedmode\" value=\"skip\" "+(chromedMode.equals(RSSConfig.VALUE_SKIP)?"checked=\"true\"":"")+"/>"+Messages.getBodyString(locale,"RSSConnector.NeverUseChromedContent")+"</nobr></td>\n"+ " </tr>\n"+ " <tr>\n"+ -" <td class=\"value\"><nobr><input type=\"radio\" name=\"chromedmode\" value=\"metadata\" "+(chromedMode.equals(RSSConfig.VALUE_METADATA)?"checked=\"true\"":"")+"/>"+Messages.getBodyString(locale,"RSSConnector.NoContentMetadataOnly")+"</nobr></td>\n"+ +" <td class=\"value\"><nobr><input type=\"radio\" name=\""+seqPrefix+"chromedmode\" value=\"metadata\" "+(chromedMode.equals(RSSConfig.VALUE_METADATA)?"checked=\"true\"":"")+"/>"+Messages.getBodyString(locale,"RSSConnector.NoContentMetadataOnly")+"</nobr></td>\n"+ " </tr>\n"+ "</table>\n" ); @@ -2426,8 +2430,8 @@ public class RSSConnector extends org.ap else { out.print( -"<input type=\"hidden\" name=\"dechromedmode\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(dechromedMode)+"\"/>\n"+ -"<input type=\"hidden\" name=\"chromedmode\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(chromedMode)+"\"/>\n" +"<input type=\"hidden\" name=\""+seqPrefix+"dechromedmode\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(dechromedMode)+"\"/>\n"+ +"<input type=\"hidden\" name=\""+seqPrefix+"chromedmode\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(chromedMode)+"\"/>\n" ); } @@ -2435,7 +2439,7 @@ public class RSSConnector extends org.ap // There is no native security, so all we care about are the tokens. i = 0; - if (tabName.equals(Messages.getString(locale,"RSSConnector.Security"))) + if (tabName.equals(Messages.getString(locale,"RSSConnector.Security")) && connectionSequenceNumber == actualSequenceNumber) { out.print( "<table class=\"displaytable\">\n"+ @@ -2450,15 +2454,15 @@ public class RSSConnector extends org.ap if (sn.getType().equals(RSSConfig.NODE_ACCESS)) { String accessDescription = "_"+Integer.toString(k); - String accessOpName = "accessop"+accessDescription; + String accessOpName = seqPrefix+"accessop"+accessDescription; String token = sn.getAttributeValue(RSSConfig.ATTR_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,"RSSConnector.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,"RSSConnector.DeleteToken")+Integer.toString(k)+"\"/>\n"+ " </a> \n"+ " </td>\n"+ " <td class=\"value\">\n"+ @@ -2481,14 +2485,14 @@ public class RSSConnector extends org.ap " <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,"RSSConnector.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,"RSSConnector.AddAccessToken")+"\"/>\n"+ " </a> \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" @@ -2507,13 +2511,13 @@ public class RSSConnector extends org.ap String accessDescription = "_"+Integer.toString(k); String token = sn.getAttributeValue(RSSConfig.ATTR_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" ); } @@ -2536,8 +2540,10 @@ public class RSSConnector extends org.ap int connectionSequenceNumber) throws ManifoldCFException { + String seqPrefix = "s"+connectionSequenceNumber+"_"; + // Get the map - String value = variableContext.getParameter("rssmapcount"); + String value = variableContext.getParameter(seqPrefix+"rssmapcount"); if (value != null) { int mapsize = Integer.parseInt(value); @@ -2557,7 +2563,7 @@ public class RSSConnector extends org.ap j = 0; while (j < mapsize) { - String prefix = "rssregexp_"+Integer.toString(j)+"_"; + String prefix = seqPrefix+"rssregexp_"+Integer.toString(j)+"_"; String match = variableContext.getParameter(prefix+"match"); String map = variableContext.getParameter(prefix+"map"); if (map == null) @@ -2573,7 +2579,7 @@ public class RSSConnector extends org.ap } // Get the cgiPath - String rssURLSequence = variableContext.getParameter("rssurls"); + String rssURLSequence = variableContext.getParameter(seqPrefix+"rssurls"); if (rssURLSequence != null) { // Delete all url specs first @@ -2619,12 +2625,12 @@ public class RSSConnector extends org.ap } catch (java.io.IOException e) { - throw new ManifoldCFException("IO error",e); + throw new ManifoldCFException("IO error: "+e.getMessage(),e); } } // Read the url specs - String urlRegexpCount = variableContext.getParameter("urlregexpcount"); + String urlRegexpCount = variableContext.getParameter(seqPrefix+"urlregexpcount"); if (urlRegexpCount != null && urlRegexpCount.length() > 0) { int regexpCount = Integer.parseInt(urlRegexpCount); @@ -2639,12 +2645,12 @@ public class RSSConnector extends org.ap } // Grab the operation and the index (if any) - String operation = variableContext.getParameter("urlregexpop"); + String operation = variableContext.getParameter(seqPrefix+"urlregexpop"); if (operation == null) operation = "Continue"; int opIndex = -1; if (operation.equals("Delete")) - opIndex = Integer.parseInt(variableContext.getParameter("urlregexpnumber")); + opIndex = Integer.parseInt(variableContext.getParameter(seqPrefix+"urlregexpnumber")); // Reconstruct urlspec nodes j = 0; @@ -2654,13 +2660,13 @@ public class RSSConnector extends org.ap if (!operation.equals("Delete") || j != opIndex) { // Add the jth node - String regexp = variableContext.getParameter("urlregexp_"+Integer.toString(j)); - String regexpDescription = variableContext.getParameter("urlregexpdesc_"+Integer.toString(j)); - String reorder = variableContext.getParameter("urlregexpreorder_"+Integer.toString(j)); - String javaSession = variableContext.getParameter("urlregexpjava_"+Integer.toString(j)); - String aspSession = variableContext.getParameter("urlregexpasp_"+Integer.toString(j)); - String phpSession = variableContext.getParameter("urlregexpphp_"+Integer.toString(j)); - String bvSession = variableContext.getParameter("urlregexpbv_"+Integer.toString(j)); + String regexp = variableContext.getParameter(seqPrefix+"urlregexp_"+Integer.toString(j)); + String regexpDescription = variableContext.getParameter(seqPrefix+"urlregexpdesc_"+Integer.toString(j)); + String reorder = variableContext.getParameter(seqPrefix+"urlregexpreorder_"+Integer.toString(j)); + String javaSession = variableContext.getParameter(seqPrefix+"urlregexpjava_"+Integer.toString(j)); + String aspSession = variableContext.getParameter(seqPrefix+"urlregexpasp_"+Integer.toString(j)); + String phpSession = variableContext.getParameter(seqPrefix+"urlregexpphp_"+Integer.toString(j)); + String bvSession = variableContext.getParameter(seqPrefix+"urlregexpbv_"+Integer.toString(j)); SpecificationNode newSn = new SpecificationNode(RSSConfig.NODE_URLSPEC); newSn.setAttribute(RSSConfig.ATTR_REGEXP,regexp); if (regexpDescription != null && regexpDescription.length() > 0) @@ -2681,13 +2687,13 @@ public class RSSConnector extends org.ap } if (operation.equals("Add")) { - String regexp = variableContext.getParameter("urlregexp"); - String regexpDescription = variableContext.getParameter("urlregexpdesc"); - String reorder = variableContext.getParameter("urlregexpreorder"); - String javaSession = variableContext.getParameter("urlregexpjava"); - String aspSession = variableContext.getParameter("urlregexpasp"); - String phpSession = variableContext.getParameter("urlregexpphp"); - String bvSession = variableContext.getParameter("urlregexpbv"); + String regexp = variableContext.getParameter(seqPrefix+"urlregexp"); + String regexpDescription = variableContext.getParameter(seqPrefix+"urlregexpdesc"); + String reorder = variableContext.getParameter(seqPrefix+"urlregexpreorder"); + String javaSession = variableContext.getParameter(seqPrefix+"urlregexpjava"); + String aspSession = variableContext.getParameter(seqPrefix+"urlregexpasp"); + String phpSession = variableContext.getParameter(seqPrefix+"urlregexpphp"); + String bvSession = variableContext.getParameter(seqPrefix+"urlregexpbv"); // Add a new node at the end SpecificationNode newSn = new SpecificationNode(RSSConfig.NODE_URLSPEC); @@ -2709,7 +2715,7 @@ public class RSSConnector extends org.ap } // Get the exclusions - String exclusions = variableContext.getParameter("exclusions"); + String exclusions = variableContext.getParameter(seqPrefix+"exclusions"); if (exclusions != null) { // Delete existing exclusions record first @@ -2729,7 +2735,7 @@ public class RSSConnector extends org.ap } // Read the feed timeout, if present - String feedTimeoutValue = variableContext.getParameter("feedtimeout"); + String feedTimeoutValue = variableContext.getParameter(seqPrefix+"feedtimeout"); if (feedTimeoutValue != null && feedTimeoutValue.length() > 0) { int j = 0; @@ -2747,7 +2753,7 @@ public class RSSConnector extends org.ap } // Read the feed refetch interval, if present - String feedRefetchValue = variableContext.getParameter("feedrefetch"); + String feedRefetchValue = variableContext.getParameter(seqPrefix+"feedrefetch"); if (feedRefetchValue != null && feedRefetchValue.length() > 0) { int j = 0; @@ -2765,7 +2771,7 @@ public class RSSConnector extends org.ap } // Read the minimum feed refetch interval, if present - String minFeedRefetchValue = variableContext.getParameter("minfeedrefetch"); + String minFeedRefetchValue = variableContext.getParameter(seqPrefix+"minfeedrefetch"); if (minFeedRefetchValue != null && minFeedRefetchValue.length() > 0) { int j = 0; @@ -2783,10 +2789,10 @@ public class RSSConnector extends org.ap } // Read the bad feed refetch interval (which is allowed to be null) - String badFeedRefetchValuePresent = variableContext.getParameter("badfeedrefetch_present"); + String badFeedRefetchValuePresent = variableContext.getParameter(seqPrefix+"badfeedrefetch_present"); if (badFeedRefetchValuePresent != null && badFeedRefetchValuePresent.length() > 0) { - String badFeedRefetchValue = variableContext.getParameter("badfeedrefetch"); + String badFeedRefetchValue = variableContext.getParameter(seqPrefix+"badfeedrefetch"); int k = 0; while (k < ds.getChildCount()) { @@ -2805,7 +2811,7 @@ public class RSSConnector extends org.ap } // Read the dechromed mode - String dechromedMode = variableContext.getParameter("dechromedmode"); + String dechromedMode = variableContext.getParameter(seqPrefix+"dechromedmode"); if (dechromedMode != null && dechromedMode.length() > 0) { int j = 0; @@ -2823,7 +2829,7 @@ public class RSSConnector extends org.ap } // Read the chromed mode - String chromedMode = variableContext.getParameter("chromedmode"); + String chromedMode = variableContext.getParameter(seqPrefix+"chromedmode"); if (chromedMode != null && chromedMode.length() > 0) { int j = 0; @@ -2841,12 +2847,12 @@ public class RSSConnector extends org.ap } // Now, do whatever action we were told to do. - String rssop = variableContext.getParameter("rssop"); + String rssop = variableContext.getParameter(seqPrefix+"rssop"); if (rssop != null && rssop.equals("Add")) { // Add a match to the end - String match = variableContext.getParameter("rssmatch"); - String map = variableContext.getParameter("rssmap"); + String match = variableContext.getParameter(seqPrefix+"rssmatch"); + String map = variableContext.getParameter(seqPrefix+"rssmap"); SpecificationNode node = new SpecificationNode(RSSConfig.NODE_MAP); node.setAttribute(RSSConfig.ATTR_MATCH,match); node.setAttribute(RSSConfig.ATTR_MAP,map); @@ -2854,7 +2860,7 @@ public class RSSConnector extends org.ap } else if (rssop != null && rssop.equals("Delete")) { - int index = Integer.parseInt(variableContext.getParameter("rssindex")); + int index = Integer.parseInt(variableContext.getParameter(seqPrefix+"rssindex")); int j = 0; while (j < ds.getChildCount()) { @@ -2872,7 +2878,7 @@ public class RSSConnector extends org.ap } } - String xc = variableContext.getParameter("tokencount"); + String xc = variableContext.getParameter(seqPrefix+"tokencount"); if (xc != null) { // Delete all tokens first @@ -2891,7 +2897,7 @@ public class RSSConnector extends org.ap 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")) { @@ -2900,17 +2906,17 @@ public class RSSConnector extends org.ap continue; } // Get the stuff we need - String accessSpec = variableContext.getParameter("spectoken"+accessDescription); + String accessSpec = variableContext.getParameter(seqPrefix+"spectoken"+accessDescription); SpecificationNode node = new SpecificationNode(RSSConfig.NODE_ACCESS); node.setAttribute(RSSConfig.ATTR_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(RSSConfig.NODE_ACCESS); node.setAttribute(RSSConfig.ATTR_TOKEN,accessspec); ds.addChild(ds.getChildCount(),node); Modified: manifoldcf/trunk/connectors/rss/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/rss/tests/NavigationDerbyUI.java URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/rss/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/rss/tests/NavigationDerbyUI.java?rev=1622740&r1=1622739&r2=1622740&view=diff ============================================================================== --- manifoldcf/trunk/connectors/rss/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/rss/tests/NavigationDerbyUI.java (original) +++ manifoldcf/trunk/connectors/rss/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/rss/tests/NavigationDerbyUI.java Fri Sep 5 16:48:06 2014 @@ -207,7 +207,7 @@ public class NavigationDerbyUI extends B link.click(); window = testerInstance.findWindow(null); form = window.findForm(testerInstance.createStringDescription("editjob")); - textarea = form.findTextarea(testerInstance.createStringDescription("rssurls")); + textarea = form.findTextarea(testerInstance.createStringDescription("s0_rssurls")); textarea.setValue(testerInstance.createStringDescription("http://www.cnn.com")); // Canonicalization tab link = window.findLink(testerInstance.createStringDescription("Canonicalization tab"));
