manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1497307 - in /manifoldcf/branches/CONNECTORS-703/framework: crawler-ui/src/main/webapp/ ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/
Date Thu, 27 Jun 2013 11:35:23 GMT
Author: kwright
Date: Thu Jun 27 11:35:22 2013
New Revision: 1497307

URL: http://svn.apache.org/r1497307
Log:
Add UI support for prerequisites to mapper editing.

Modified:
    manifoldcf/branches/CONNECTORS-703/framework/crawler-ui/src/main/webapp/editauthority.jsp
    manifoldcf/branches/CONNECTORS-703/framework/crawler-ui/src/main/webapp/editmapper.jsp
    manifoldcf/branches/CONNECTORS-703/framework/crawler-ui/src/main/webapp/execute.jsp
    manifoldcf/branches/CONNECTORS-703/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_en_US.properties
    manifoldcf/branches/CONNECTORS-703/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_ja_JP.properties

Modified: manifoldcf/branches/CONNECTORS-703/framework/crawler-ui/src/main/webapp/editauthority.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-703/framework/crawler-ui/src/main/webapp/editauthority.jsp?rev=1497307&r1=1497306&r2=1497307&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-703/framework/crawler-ui/src/main/webapp/editauthority.jsp
(original)
+++ manifoldcf/branches/CONNECTORS-703/framework/crawler-ui/src/main/webapp/editauthority.jsp
Thu Jun 27 11:35:22 2013
@@ -85,6 +85,7 @@
 	// Set up the predefined tabs
 	tabsArray.add(Messages.getString(pageContext.getRequest().getLocale(),"editauthority.Name"));
 	tabsArray.add(Messages.getString(pageContext.getRequest().getLocale(),"editauthority.Type"));
+	tabsArray.add(Messages.getString(pageContext.getRequest().getLocale(),"editauthority.Prerequisites"));
 	if (className.length() > 0)
 		tabsArray.add(Messages.getString(pageContext.getRequest().getLocale(),"editauthority.Throttling"));
 

Modified: manifoldcf/branches/CONNECTORS-703/framework/crawler-ui/src/main/webapp/editmapper.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-703/framework/crawler-ui/src/main/webapp/editmapper.jsp?rev=1497307&r1=1497306&r2=1497307&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-703/framework/crawler-ui/src/main/webapp/editmapper.jsp
(original)
+++ manifoldcf/branches/CONNECTORS-703/framework/crawler-ui/src/main/webapp/editmapper.jsp
Thu Jun 27 11:35:22 2013
@@ -58,6 +58,7 @@
 	String className = "";
 	int maxConnections = 10;
 	ConfigParams parameters = new ConfigParams();
+	Set<String> prereqs = new HashSet<String>();
 
 	if (connection != null)
 	{
@@ -68,6 +69,7 @@
 		className = connection.getClassName();
 		parameters = connection.getConfigParams();
 		maxConnections = connection.getMaxConnections();
+		prereqs = connection.getPrerequisites();
 	}
 	else
 		connectionName = null;
@@ -81,6 +83,7 @@
 	// Set up the predefined tabs
 	tabsArray.add(Messages.getString(pageContext.getRequest().getLocale(),"editmapper.Name"));
 	tabsArray.add(Messages.getString(pageContext.getRequest().getLocale(),"editmapper.Type"));
+	tabsArray.add(Messages.getString(pageContext.getRequest().getLocale(),"editmapper.Prerequisites"));
 	if (className.length() > 0)
 		tabsArray.add(Messages.getString(pageContext.getRequest().getLocale(),"editmapper.Throttling"));
 
@@ -395,6 +398,56 @@
 <%
 	  }
 
+	  // The "Prerequisites" tab
+	  IMappingConnection[] mappingConnections = connMgr.getAllNonLoopingConnections((connection==null)?null:connection.getName());
+	  if (tabName.equals(Messages.getString(pageContext.getRequest().getLocale(),"editmapper.Prerequisites")))
+	  {
+%>
+		    <table class="displaytable">
+			<tr><td class="separator" colspan="5"><hr/></td></tr>
+			<tr>
+				<td class="description"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editmapper.PrerequisiteUserMappingsColon")%></nobr></td>
+				<td class="value" colspan="4">
+					<input type="hidden" name="prerequisites_present" value="true"/>
+<%
+	    for (IMappingConnection mappingConnection : mappingConnections)
+	    {
+		String mappingName = mappingConnection.getName();
+		String mappingDescription = mappingName;
+		if (mappingConnection.getDescription() != null && mappingConnection.getDescription().length()
> 0)
+			mappingDescription += " (" + mappingConnection.getDescription()+")";
+		if (prereqs.contains(mappingName))
+		{
+%>
+					<input type="checkbox" name="prerequisites" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(mappingName)%>'
checked="true"/>&nbsp;<%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(mappingDescription)%><br/>
+<%
+		}
+		else
+		{
+%>
+					<input type="checkbox" name="prerequisites" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(mappingName)%>'/>&nbsp;<%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(mappingDescription)%><br/>
+<%
+		}
+	    }
+%>
+				</td>
+			</tr>
+		    </table>
+<%
+	  }
+	  else
+	  {
+		// Hiddens for Prerequisites tab
+%>
+		    <input type="hidden" name="prerequisites_present" value="true"/>
+<%
+		for (String prereq : prereqs)
+		{
+%>
+		    <input type="hidden" name="prerequisites" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(prereq)%>'/>
+<%
+		}
+	  }
 
 	  // The "Throttling" tab
 	  if (tabName.equals(Messages.getString(pageContext.getRequest().getLocale(),"editmapper.Throttling")))

Modified: manifoldcf/branches/CONNECTORS-703/framework/crawler-ui/src/main/webapp/execute.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-703/framework/crawler-ui/src/main/webapp/execute.jsp?rev=1497307&r1=1497306&r2=1497307&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-703/framework/crawler-ui/src/main/webapp/execute.jsp (original)
+++ manifoldcf/branches/CONNECTORS-703/framework/crawler-ui/src/main/webapp/execute.jsp Thu
Jun 27 11:35:22 2013
@@ -376,6 +376,16 @@
 					x = variableContext.getParameter("maxconnections");
 					if (x != null && x.length() > 0)
 						connection.setMaxConnections(Integer.parseInt(x));
+					x = variableContext.getParameter("prerequisites_present");
+					if (x != null && x.equals("true"))
+					{
+						connection.getPrerequisites().clear();
+						String[] y = variableContext.getParameterValues("prerequisites");
+						for (String s : y)
+						{
+							connection.getPrerequisites().add(s);
+						}
+					}
 
 					String error = MappingConnectorFactory.processConfigurationPost(threadContext,connection.getClassName(),variableContext,pageContext.getRequest().getLocale(),connection.getConfigParams());
 					

Modified: manifoldcf/branches/CONNECTORS-703/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_en_US.properties
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-703/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_en_US.properties?rev=1497307&r1=1497306&r2=1497307&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-703/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_en_US.properties
(original)
+++ manifoldcf/branches/CONNECTORS-703/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_en_US.properties
Thu Jun 27 11:35:22 2013
@@ -205,6 +205,8 @@ editmapper.Name=Name
 editmapper.Type=Type
 editmapper.Throttling=Throttling
 editmapper.EditMappingConnection=Edit Mapping Connection
+editmapper.Prerequisites=Prerequisites
+editmapper.PrerequisiteUserMappingsColon=Prerequisite user mappings:
 
 listconnections.ApacheManifoldCFListConnections=Apache ManifoldCF: List Connections
 listconnections.ListOfRepositoryConnections=List of Repository Connections

Modified: manifoldcf/branches/CONNECTORS-703/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_ja_JP.properties
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-703/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_ja_JP.properties?rev=1497307&r1=1497306&r2=1497307&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-703/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_ja_JP.properties
(original)
+++ manifoldcf/branches/CONNECTORS-703/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_ja_JP.properties
Thu Jun 27 11:35:22 2013
@@ -205,6 +205,8 @@ editmapper.Name=Name
 editmapper.Type=Type
 editmapper.Throttling=Throttling
 editmapper.EditMappingConnection=Edit Mapping Connection
+editmapper.Prerequisites=Prerequisites
+editmapper.PrerequisiteUserMappingsColon=Prerequisite user mappings:
 
 listconnections.ApacheManifoldCFListConnections=Apache ManifoldCF:コネクション一覧
 listconnections.ListOfRepositoryConnections=リポジトリコネクション一覧



Mime
View raw message