manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1535550 - in /manifoldcf/branches/CONNECTORS-792/framework: crawler-ui/src/main/webapp/ ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/
Date Thu, 24 Oct 2013 21:08:46 GMT
Author: kwright
Date: Thu Oct 24 21:08:46 2013
New Revision: 1535550

URL: http://svn.apache.org/r1535550
Log:
Add UI for selecting groups in Authority

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

Modified: manifoldcf/branches/CONNECTORS-792/framework/crawler-ui/src/main/webapp/editauthority.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-792/framework/crawler-ui/src/main/webapp/editauthority.jsp?rev=1535550&r1=1535549&r2=1535550&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-792/framework/crawler-ui/src/main/webapp/editauthority.jsp
(original)
+++ manifoldcf/branches/CONNECTORS-792/framework/crawler-ui/src/main/webapp/editauthority.jsp
Thu Oct 24 21:08:46 2013
@@ -34,7 +34,9 @@
 	IAuthorityConnectorManager connectorManager = AuthorityConnectorManagerFactory.make(threadContext);
 	// Get the mapping connection manager
 	IMappingConnectionManager mappingConnMgr = MappingConnectionManagerFactory.make(threadContext);
-
+	// Get the group manager
+	IAuthorityGroupManager authGroupManager = AuthorityGroupManagerFactory.make(threadContext);
+	
 	// Figure out what the current tab name is.
 	String tabName = variableContext.getParameter("tabname");
 	if (tabName == null || tabName.length() == 0)
@@ -62,7 +64,8 @@
 	ConfigParams parameters = new ConfigParams();
 	String prereq = null;
 	String authDomain = "";
-
+	String groupName = "";
+	
 	if (connection != null)
 	{
 		// Set up values
@@ -76,6 +79,9 @@
 		authDomain = connection.getAuthDomain();
 		if (authDomain == null)
 			authDomain = "";
+		groupName = connection.getAuthGroup();
+		if (groupName == null)
+			groupName = "";
 	}
 	else
 		connectionName = null;
@@ -156,6 +162,13 @@
 				document.editconnection.connname.focus();
 				return;
 			}
+			if (editconnection.authoritygroup.value == "")
+			{
+				alert("<%=Messages.getBodyJavascriptString(pageContext.getRequest().getLocale(),"editauthority.ConnectionMustHaveAGroup")%>");
+				SelectTab("<%=Messages.getBodyJavascriptString(pageContext.getRequest().getLocale(),"editauthority.Type")%>");
+				document.editconnection.authoritygroup.focus();
+				return;
+			}
 			if (window.checkConfigForSave)
 			{
 				if (!checkConfigForSave())
@@ -394,10 +407,37 @@
 %>
 				</td>
 			</tr>
+			<tr><td class="separator" colspan="5"><hr/></td></tr>
 			<tr>
 				<td class="description"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editauthority.AuthorizationDomainColon")%></nobr></td>
 				<td class="value" colspan="4"><nobr><input type="text" name="authdomain"
size="40" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(authDomain)%>'/></nobr></td>
 			</tr>
+			<tr>
+				<td class="description"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editauthority.AuthorityGroupColon")%></nobr></td>
+				<td class="value" colspan="4">
+<%
+	    IAuthorityGroup[] set2 = authGroupManager.getAllGroups();
+	    int i = 0;
+%>
+					<select name="authoritygroup" size="1">
+						<option value=""><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editauthority.SelectAGroup")%></option>
+<%
+	    while (i < set2.length)
+	    {
+		IAuthorityGroup row = set2[i++];
+		String thisAuthorityName = row.getName();
+		String thisDescription = row.getDescription();
+		if (thisDescription == null || thisDescription.length() == 0)
+			thisDescription = thisAuthorityName;
+%>
+						<option value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(thisAuthorityName)%>'
+							<%=(groupName.equals(thisAuthorityName))?"selected=\"selected\"":""%>><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(thisDescription)%></option>
+<%
+	    }
+%>
+					</select>
+				</td>
+			</tr>
 		    </table>
 <%
 	  }
@@ -407,6 +447,7 @@
 %>
 		    <input type="hidden" name="classname" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(className)%>'/>
 		    <input type="hidden" name="authdomain" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(authDomain)%>'/>
+		    <input type="hidden" name="authoritygroup" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(groupName)%>'/>
 <%
 	  }
 

Modified: manifoldcf/branches/CONNECTORS-792/framework/crawler-ui/src/main/webapp/execute.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-792/framework/crawler-ui/src/main/webapp/execute.jsp?rev=1535550&r1=1535549&r2=1535550&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-792/framework/crawler-ui/src/main/webapp/execute.jsp (original)
+++ manifoldcf/branches/CONNECTORS-792/framework/crawler-ui/src/main/webapp/execute.jsp Thu
Oct 24 21:08:46 2013
@@ -262,6 +262,9 @@
 					x = variableContext.getParameter("authdomain");
 					if (x != null)
 						connection.setAuthDomain(x);
+					x = variableContext.getParameter("authoritygroup");
+					if (x != null)
+						connection.setAuthGroup(x);
 
 					String error = AuthorityConnectorFactory.processConfigurationPost(threadContext,connection.getClassName(),variableContext,pageContext.getRequest().getLocale(),connection.getConfigParams());
 					

Modified: manifoldcf/branches/CONNECTORS-792/framework/crawler-ui/src/main/webapp/viewauthority.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-792/framework/crawler-ui/src/main/webapp/viewauthority.jsp?rev=1535550&r1=1535549&r2=1535550&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-792/framework/crawler-ui/src/main/webapp/viewauthority.jsp
(original)
+++ manifoldcf/branches/CONNECTORS-792/framework/crawler-ui/src/main/webapp/viewauthority.jsp
Thu Oct 24 21:08:46 2013
@@ -87,7 +87,10 @@
 		String authDomain = connection.getAuthDomain();
 		if (authDomain == null)
 			authDomain = "";
-		
+		String groupName = connection.getAuthGroup();
+		if (groupName == null)
+			groupName = "";
+
 		ConfigParams parameters = connection.getConfigParams();
 
 		// Do stuff so we can call out to display the parameters
@@ -144,7 +147,7 @@
 			</tr>
 			<tr>
 				<td class="description" colspan="1"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.PrerequisiteUserMappingColon")%></nobr></td>
-				<td class="value" colspan="1">
+				<td class="value" colspan="3">
 <%
 		if (prereq != null)
 		{
@@ -160,8 +163,15 @@
 		}
 %>
 				</td>
+			</tr>
+			<tr>
+				<td class="separator" colspan="4"><hr/></td>
+			</tr>
+			<tr>
 				<td class="description" colspan="1"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.AuthorizationDomainColon")%></nobr></td>
 				<td class="value" colspan="1"><nobr><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(authDomain)%></nobr></td>
+				<td class="description" colspan="1"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.AuthorityGroupColon")%></nobr></td>
+				<td class="value" colspan="1"><nobr><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(groupName)%></nobr></td>
 			</tr>
 			<tr>
 				<td class="separator" colspan="4"><hr/></td>

Modified: manifoldcf/branches/CONNECTORS-792/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_en_US.properties
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-792/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_en_US.properties?rev=1535550&r1=1535549&r2=1535550&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-792/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_en_US.properties
(original)
+++ manifoldcf/branches/CONNECTORS-792/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_en_US.properties
Thu Oct 24 21:08:46 2013
@@ -190,6 +190,9 @@ editauthority.Prerequisites=Prerequisite
 editauthority.PrerequisiteUserMappingColon=Prerequisite user mapping:
 editauthority.NoPrerequisites=(No Prerequisites)
 editauthority.AuthorizationDomainColon=Authorization domain:
+editauthority.AuthorityGroupColon=Authority group:
+editauthority.SelectAGroup=-- Select a group --
+editauthority.ConnectionMustHaveAGroup=Authority connection must have a group
 
 editmapper.ApacheManifoldCFEditMapping=Apache ManifoldCF: Edit Mapping
 editmapper.EditAMapping=Edit A Mapping
@@ -841,6 +844,7 @@ viewauthority.qmark=?
 viewauthority.PrerequisiteUserMappingColon=Prerequisite user mapping:
 viewauthority.NoPrerequisites=No prerequisites
 viewauthority.AuthorizationDomainColon=Authorization domain:
+viewauthority.AuthorityGroupColon=Authority group:
 
 viewmapper.ApacheManifoldCFViewMappingConnectionStatus=Apache ManifoldCF: View Mapping Connection
Status
 viewmapper.DeleteConnection=Delete connection

Modified: manifoldcf/branches/CONNECTORS-792/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_ja_JP.properties
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-792/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_ja_JP.properties?rev=1535550&r1=1535549&r2=1535550&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-792/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_ja_JP.properties
(original)
+++ manifoldcf/branches/CONNECTORS-792/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_ja_JP.properties
Thu Oct 24 21:08:46 2013
@@ -190,6 +190,9 @@ editauthority.Prerequisites=条件
 editauthority.PrerequisiteUserMappingColon=前提ユーザーマッピング:
 editauthority.NoPrerequisites=(条件無し)
 editauthority.AuthorizationDomainColon=Authorization domain:
+editauthority.AuthorityGroupColon=Authority group:
+editauthority.SelectAGroup=-- Select a group --
+editauthority.ConnectionMustHaveAGroup=Authority connection must have a group
 
 editmapper.ApacheManifoldCFEditMapping=Apache ManifoldCF: マッピングの編集
 editmapper.EditAMapping=マッピングを編集
@@ -842,6 +845,7 @@ viewauthority.qmark=?
 viewauthority.PrerequisiteUserMappingColon=前提ユーザーマッピング:
 viewauthority.NoPrerequisites=条件無し
 viewauthority.AuthorizationDomainColon=Authorization domain:
+viewauthority.AuthorityGroupColon=Authority group:
 
 viewmapper.ApacheManifoldCFViewMappingConnectionStatus=Apache ManifoldCF: マッピングコネクション状態の表示
 viewmapper.DeleteConnection=コネクションを削除



Mime
View raw message