You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2015/07/02 09:59:41 UTC
svn commit: r1688776 - in
/manifoldcf/branches/CONNECTORS-1131/framework/crawler-ui/src/main/webapp:
editconnection.jsp editgroup.jsp editmapper.jsp
Author: kwright
Date: Thu Jul 2 07:59:40 2015
New Revision: 1688776
URL: http://svn.apache.org/r1688776
Log:
Two more connection editors
Modified:
manifoldcf/branches/CONNECTORS-1131/framework/crawler-ui/src/main/webapp/editconnection.jsp
manifoldcf/branches/CONNECTORS-1131/framework/crawler-ui/src/main/webapp/editgroup.jsp
manifoldcf/branches/CONNECTORS-1131/framework/crawler-ui/src/main/webapp/editmapper.jsp
Modified: manifoldcf/branches/CONNECTORS-1131/framework/crawler-ui/src/main/webapp/editconnection.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1131/framework/crawler-ui/src/main/webapp/editconnection.jsp?rev=1688776&r1=1688775&r2=1688776&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-1131/framework/crawler-ui/src/main/webapp/editconnection.jsp (original)
+++ manifoldcf/branches/CONNECTORS-1131/framework/crawler-ui/src/main/webapp/editconnection.jsp Thu Jul 2 07:59:40 2015
@@ -31,7 +31,7 @@ try
// Check if authorized
if (!adminprofile.checkAllowed(threadContext,IAuthorizer.CAPABILITY_EDIT_CONNECTIONS))
{
- variableContext.setParameter("target","listauthorities.jsp");
+ variableContext.setParameter("target","listconnections.jsp");
%>
<jsp:forward page="unauthorized.jsp"/>
<%
Modified: manifoldcf/branches/CONNECTORS-1131/framework/crawler-ui/src/main/webapp/editgroup.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1131/framework/crawler-ui/src/main/webapp/editgroup.jsp?rev=1688776&r1=1688775&r2=1688776&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-1131/framework/crawler-ui/src/main/webapp/editgroup.jsp (original)
+++ manifoldcf/branches/CONNECTORS-1131/framework/crawler-ui/src/main/webapp/editgroup.jsp Thu Jul 2 07:59:40 2015
@@ -19,12 +19,22 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+%>
- // The contract of this edit page is as follows. It is either called directly, in which case it is expected to be creating
- // a connection or beginning the process of editing an existing connection, or it is called via redirection from execute.jsp, in which case
- // the connection object being edited will be placed in the thread context under the name "GroupObject".
- try
- {
+<%
+// The contract of this edit page is as follows. It is either called directly, in which case it is expected to be creating
+// a connection or beginning the process of editing an existing connection, or it is called via redirection from execute.jsp, in which case
+// the connection object being edited will be placed in the thread context under the name "GroupObject".
+try
+{
+ // Check if authorized
+ if (!adminprofile.checkAllowed(threadContext,IAuthorizer.CAPABILITY_EDIT_CONNECTIONS))
+ {
+ variableContext.setParameter("target","listgroups.jsp");
+%>
+ <jsp:forward page="unauthorized.jsp"/>
+<%
+ }
// Get the group manager
IAuthorityGroupManager authGroupManager = AuthorityGroupManagerFactory.make(threadContext);
@@ -85,79 +95,79 @@
<script type="text/javascript">
<!--
- // Use this method to repost the form and pick a new tab
- function SelectTab(newtab)
+// Use this method to repost the form and pick a new tab
+function SelectTab(newtab)
+{
+ if (checkForm())
{
- if (checkForm())
- {
- document.editgroup.tabname.value = newtab;
- document.editgroup.submit();
- }
+ document.editgroup.tabname.value = newtab;
+ document.editgroup.submit();
}
+}
- // Use this method to repost the form,
- // and set the anchor request.
- function postFormSetAnchor(anchorValue)
+// Use this method to repost the form,
+// and set the anchor request.
+function postFormSetAnchor(anchorValue)
+{
+ if (checkForm())
{
- if (checkForm())
- {
- if (anchorValue != "")
- document.group.action = document.editgroup.action + "#" + anchorValue;
- document.editgroup.submit();
- }
+ if (anchorValue != "")
+ document.group.action = document.editgroup.action + "#" + anchorValue;
+ document.editgroup.submit();
}
+}
- // Use this method to repost the form
- function postForm()
+// Use this method to repost the form
+function postForm()
+{
+ if (checkForm())
{
- if (checkForm())
- {
- document.editgroup.submit();
- }
+ document.editgroup.submit();
}
+}
- function Save()
- {
- if (checkForm())
+function Save()
+{
+ if (checkForm())
+ {
+ // Can't submit until all required fields have been set.
+ // Some of these don't live on the current tab, so don't set
+ // focus.
+
+ // Check our part of the form, for save
+ if (editgroup.groupname.value == "")
+ {
+ alert("<%=Messages.getBodyJavascriptString(pageContext.getRequest().getLocale(),"editgroup.AuthorityGroupMustHaveAName")%>");
+ SelectTab("<%=Messages.getBodyJavascriptString(pageContext.getRequest().getLocale(),"editgroup.Name")%>");
+ document.editgroup.groupname.focus();
+ return;
+ }
+ if (window.checkConfigForSave)
{
- // Can't submit until all required fields have been set.
- // Some of these don't live on the current tab, so don't set
- // focus.
-
- // Check our part of the form, for save
- if (editgroup.groupname.value == "")
- {
- alert("<%=Messages.getBodyJavascriptString(pageContext.getRequest().getLocale(),"editgroup.AuthorityGroupMustHaveAName")%>");
- SelectTab("<%=Messages.getBodyJavascriptString(pageContext.getRequest().getLocale(),"editgroup.Name")%>");
- document.editgroup.groupname.focus();
+ if (!checkConfigForSave())
return;
- }
- if (window.checkConfigForSave)
- {
- if (!checkConfigForSave())
- return;
- }
- document.editgroup.op.value="Save";
- document.editgroup.submit();
}
- }
-
- function Continue()
- {
- document.editgroup.op.value="Continue";
- postForm();
- }
-
- function Cancel()
- {
- document.editgroup.op.value="Cancel";
+ document.editgroup.op.value="Save";
document.editgroup.submit();
}
+}
- function checkForm()
- {
- return true;
- }
+function Continue()
+{
+ document.editgroup.op.value="Continue";
+ postForm();
+}
+
+function Cancel()
+{
+ document.editgroup.op.value="Cancel";
+ document.editgroup.submit();
+}
+
+function checkForm()
+{
+ return true;
+}
//-->
</script>
@@ -165,41 +175,41 @@
<body class="standardbody">
- <table class="page">
- <tr><td colspan="2" class="banner"><jsp:include page="banner.jsp" flush="true"/></td></tr>
- <tr><td class="navigation"><jsp:include page="navigation.jsp" flush="true"/></td>
- <td class="darkwindow">
-
-
- <form class="standardform" name="editgroup" action="execute.jsp" method="POST" enctype="multipart/form-data">
- <input type="hidden" name="op" value="Continue"/>
- <input type="hidden" name="type" value="group"/>
- <input type="hidden" name="tabname" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(tabName)%>'/>
- <input type="hidden" name="isnewconnection" value='<%=(isNew?"true":"false")%>'/>
- <table class="tabtable">
- <tr class="tabspacerrow">
- <td class="spacertab" colspan="<%=tabsArray.size()%>"></td>
- <td class="remaindertab" rowspan="3">
+ <table class="page">
+ <tr><td colspan="2" class="banner"><jsp:include page="banner.jsp" flush="true"/></td></tr>
+ <tr>
+ <td class="navigation"><jsp:include page="navigation.jsp" flush="true"/></td>
+ <td class="darkwindow">
+
+ <form class="standardform" name="editgroup" action="execute.jsp" method="POST" enctype="multipart/form-data">
+ <input type="hidden" name="op" value="Continue"/>
+ <input type="hidden" name="type" value="group"/>
+ <input type="hidden" name="tabname" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(tabName)%>'/>
+ <input type="hidden" name="isnewconnection" value='<%=(isNew?"true":"false")%>'/>
+ <table class="tabtable">
+ <tr class="tabspacerrow">
+ <td class="spacertab" colspan="<%=tabsArray.size()%>"></td>
+ <td class="remaindertab" rowspan="3">
<%
if (description.length() > 0)
{
%>
- <nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editgroup.EditGroup")%> '<%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description)%>'</nobr>
+ <nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editgroup.EditGroup")%> '<%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description)%>'</nobr>
<%
}
else
{
%>
- <nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editgroup.EditAGroup")%></nobr>
+ <nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editgroup.EditAGroup")%></nobr>
<%
}
%>
- </td>
- </tr>
- <tr class="tabsequencerow">
- <td class="blanksequencetab" colspan="<%=tabsArray.size()%>"></td>
- </tr>
- <tr class="tabrow">
+ </td>
+ </tr>
+ <tr class="tabsequencerow">
+ <td class="blanksequencetab" colspan="<%=tabsArray.size()%>"></td>
+ </tr>
+ <tr class="tabrow">
<%
int tabNum = 0;
while (tabNum < tabsArray.size())
@@ -208,20 +218,20 @@
if (tab.equals(tabName))
{
%>
- <td class="activetab"><nobr><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(tab)%></nobr></td>
+ <td class="activetab"><nobr><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(tab)%></nobr></td>
<%
}
else
{
%>
- <td class="passivetab"><nobr><a href="javascript:void(0);" alt='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(tab)+" "+Messages.getAttributeString(pageContext.getRequest().getLocale(),"editgroup.tab")%>' onclick='<%="javascript:SelectTab(\""+tab+"\");return false;"%>'><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(tab)%></a></nobr></td>
+ <td class="passivetab"><nobr><a href="javascript:void(0);" alt='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(tab)+" "+Messages.getAttributeString(pageContext.getRequest().getLocale(),"editgroup.tab")%>' onclick='<%="javascript:SelectTab(\""+tab+"\");return false;"%>'><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(tab)%></a></nobr></td>
<%
}
}
%>
- </tr>
- <tr class="tabbodyrow">
- <td class="tabbody" colspan='<%=Integer.toString(tabsArray.size()+1)%>'>
+ </tr>
+ <tr class="tabbodyrow">
+ <td class="tabbody" colspan='<%=Integer.toString(tabsArray.size()+1)%>'>
<%
@@ -229,76 +239,80 @@
if (tabName.equals(Messages.getString(pageContext.getRequest().getLocale(),"editgroup.Name")))
{
%>
- <table class="displaytable">
- <tr><td class="separator" colspan="5"><hr/></td></tr>
- <tr>
- <td class="description"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editgroup.NameColon")%></nobr></td>
- <td class="value" colspan="4">
-<%
- // If the group doesn't exist yet, we are allowed to change the name.
- if (isNew)
- {
-%>
- <input type="text" size="32" name="groupname" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(groupName)%>'/>
-<%
- }
- else
- {
-%>
- <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(groupName)%>
- <input type="hidden" name="groupname" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(groupName)%>'/>
-<%
- }
-%>
- </td>
- </tr>
- <tr>
- <td class="description"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editgroup.DescriptionColon")%></nobr></td>
- <td class="value" colspan="4">
- <input type="text" size="50" name="description" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(description)%>'/>
- </td>
- </tr>
- </table>
+ <table class="displaytable">
+ <tr><td class="separator" colspan="5"><hr/></td></tr>
+ <tr>
+ <td class="description"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editgroup.NameColon")%></nobr></td>
+ <td class="value" colspan="4">
+<%
+ // If the group doesn't exist yet, we are allowed to change the name.
+ if (isNew)
+ {
+%>
+ <input type="text" size="32" name="groupname" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(groupName)%>'/>
+<%
+ }
+ else
+ {
+%>
+ <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(groupName)%>
+ <input type="hidden" name="groupname" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(groupName)%>'/>
+<%
+ }
+%>
+ </td>
+ </tr>
+ <tr>
+ <td class="description"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editgroup.DescriptionColon")%></nobr></td>
+ <td class="value" colspan="4">
+ <input type="text" size="50" name="description" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(description)%>'/>
+ </td>
+ </tr>
+ </table>
<%
}
else
{
// Hiddens for the Name tab
%>
- <input type="hidden" name="groupname" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(groupName)%>'/>
- <input type="hidden" name="description" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(description)%>'/>
+ <input type="hidden" name="groupname" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(groupName)%>'/>
+ <input type="hidden" name="description" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(description)%>'/>
<%
}
%>
- <table class="displaytable">
- <tr><td class="separator" colspan="4"><hr/></td></tr>
- <tr><td class="message" colspan="4"><nobr>
- <input type="button" value="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"editgroup.Save")%>" onClick="javascript:Save()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"editgroup.SaveThisAuthorityGroup")%>"/>
- <input type="button" value="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"editgroup.Cancel")%>" onClick="javascript:Cancel()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"editgroup.CancelAuthorityGroupEditing")%>"/></nobr></td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </form>
- </td>
- </tr>
- </table>
+ <table class="displaytable">
+ <tr><td class="separator" colspan="4"><hr/></td></tr>
+ <tr>
+ <td class="message" colspan="4">
+ <nobr>
+ <input type="button" value="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"editgroup.Save")%>" onClick="javascript:Save()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"editgroup.SaveThisAuthorityGroup")%>"/>
+ <input type="button" value="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"editgroup.Cancel")%>" onClick="javascript:Cancel()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"editgroup.CancelAuthorityGroupEditing")%>"/>
+ </nobr>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </form>
+ </td>
+ </tr>
+ </table>
</body>
</html>
<%
- }
- catch (ManifoldCFException e)
- {
+}
+catch (ManifoldCFException e)
+{
e.printStackTrace();
variableContext.setParameter("text",e.getMessage());
variableContext.setParameter("target","listauthorities.jsp");
%>
<jsp:forward page="error.jsp"/>
<%
- }
+}
%>
Modified: manifoldcf/branches/CONNECTORS-1131/framework/crawler-ui/src/main/webapp/editmapper.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1131/framework/crawler-ui/src/main/webapp/editmapper.jsp?rev=1688776&r1=1688775&r2=1688776&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-1131/framework/crawler-ui/src/main/webapp/editmapper.jsp (original)
+++ manifoldcf/branches/CONNECTORS-1131/framework/crawler-ui/src/main/webapp/editmapper.jsp Thu Jul 2 07:59:40 2015
@@ -23,16 +23,28 @@
%>
<%
- // The contract of this edit page is as follows. It is either called directly, in which case it is expected to be creating
- // a connection or beginning the process of editing an existing connection, or it is called via redirection from execute.jsp, in which case
- // the connection object being edited will be placed in the thread context under the name "ConnectionObject".
- try
- {
+// The contract of this edit page is as follows. It is either called directly, in which case it is expected to be creating
+// a connection or beginning the process of editing an existing connection, or it is called via redirection from execute.jsp, in which case
+// the connection object being edited will be placed in the thread context under the name "ConnectionObject".
+try
+{
+ // Check if authorized
+ if (!adminprofile.checkAllowed(threadContext,IAuthorizer.CAPABILITY_EDIT_CONNECTIONS))
+ {
+ variableContext.setParameter("target","listmappers.jsp");
+%>
+ <jsp:forward page="unauthorized.jsp"/>
+<%
+ }
+
// Get the connection manager handle
IMappingConnectionManager connMgr = MappingConnectionManagerFactory.make(threadContext);
// Also get the list of available connectors
IMappingConnectorManager connectorManager = MappingConnectorManagerFactory.make(threadContext);
+ // Get connectors, since this will be needed to determine what to display.
+ IResultSet set = connectorManager.getConnectors();
+
// Figure out what the current tab name is.
String tabName = variableContext.getParameter("tabname");
if (tabName == null || tabName.length() == 0)
@@ -52,6 +64,9 @@
}
}
+ // Mapping connections
+ IMappingConnection[] mappingConnections = connMgr.getAllNonLoopingConnections((connection==null)?null:connection.getName());
+
// Setup default fields
boolean isNew = true;
String description = "";
@@ -105,198 +120,195 @@
<script type="text/javascript">
<!--
- // Use this method to repost the form and pick a new tab
- function SelectTab(newtab)
+// Use this method to repost the form and pick a new tab
+function SelectTab(newtab)
+{
+ if (checkForm())
{
- if (checkForm())
- {
- document.editconnection.tabname.value = newtab;
- document.editconnection.submit();
- }
+ document.editconnection.tabname.value = newtab;
+ document.editconnection.submit();
}
+}
- // Use this method to repost the form,
- // and set the anchor request.
- function postFormSetAnchor(anchorValue)
+// Use this method to repost the form,
+// and set the anchor request.
+function postFormSetAnchor(anchorValue)
+{
+ if (checkForm())
{
- if (checkForm())
- {
- if (anchorValue != "")
- document.editconnection.action = document.editconnection.action + "#" + anchorValue;
- document.editconnection.submit();
- }
+ if (anchorValue != "")
+ document.editconnection.action = document.editconnection.action + "#" + anchorValue;
+ document.editconnection.submit();
}
+}
- // Use this method to repost the form
- function postForm()
+// Use this method to repost the form
+function postForm()
+{
+ if (checkForm())
{
- if (checkForm())
- {
- document.editconnection.submit();
- }
+ document.editconnection.submit();
}
+}
- function Save()
+function Save()
+{
+ if (checkForm())
{
- if (checkForm())
- {
- // Can't submit until all required fields have been set.
- // Some of these don't live on the current tab, so don't set
- // focus.
+ // Can't submit until all required fields have been set.
+ // Some of these don't live on the current tab, so don't set
+ // focus.
- // Check our part of the form, for save
- if (editconnection.connname.value == "")
- {
- alert("<%=Messages.getBodyJavascriptString(pageContext.getRequest().getLocale(),"editmapper.ConnectionMustHaveAName")%>");
- SelectTab("<%=Messages.getBodyJavascriptString(pageContext.getRequest().getLocale(),"editmapper.Name")%>");
- document.editconnection.connname.focus();
+ // Check our part of the form, for save
+ if (editconnection.connname.value == "")
+ {
+ alert("<%=Messages.getBodyJavascriptString(pageContext.getRequest().getLocale(),"editmapper.ConnectionMustHaveAName")%>");
+ SelectTab("<%=Messages.getBodyJavascriptString(pageContext.getRequest().getLocale(),"editmapper.Name")%>");
+ document.editconnection.connname.focus();
+ return;
+ }
+ if (window.checkConfigForSave)
+ {
+ if (!checkConfigForSave())
return;
- }
- if (window.checkConfigForSave)
- {
- if (!checkConfigForSave())
- return;
- }
- document.editconnection.op.value="Save";
- document.editconnection.submit();
}
- }
-
- function Continue()
- {
- document.editconnection.op.value="Continue";
- postForm();
- }
-
- function Cancel()
- {
- document.editconnection.op.value="Cancel";
+ document.editconnection.op.value="Save";
document.editconnection.submit();
}
+}
- function checkForm()
+function Continue()
+{
+ document.editconnection.op.value="Continue";
+ postForm();
+}
+
+function Cancel()
+{
+ document.editconnection.op.value="Cancel";
+ document.editconnection.submit();
+}
+
+function checkForm()
+{
+ if (!checkConnectionCount())
+ return false;
+ if (window.checkConfig)
+ return checkConfig();
+ return true;
+}
+
+function checkConnectionCount()
+{
+ if (!isInteger(editconnection.maxconnections.value))
+ {
+ alert("<%=Messages.getBodyJavascriptString(pageContext.getRequest().getLocale(),"editmapper.TheMaximumNumberOfConnectionsMustBeAValidInteger")%>");
+ editconnection.maxconnections.focus();
+ return false;
+ }
+ return true;
+}
+
+function isRegularExpression(value)
+{
+ try
{
- if (!checkConnectionCount())
- return false;
- if (window.checkConfig)
- return checkConfig();
+ var foo = "teststring";
+ foo.search(value.replace(/\(\?i\)/,""));
return true;
}
-
- function checkConnectionCount()
+ catch (e)
{
- if (!isInteger(editconnection.maxconnections.value))
- {
- alert("<%=Messages.getBodyJavascriptString(pageContext.getRequest().getLocale(),"editmapper.TheMaximumNumberOfConnectionsMustBeAValidInteger")%>");
- editconnection.maxconnections.focus();
- return false;
- }
- return true;
+ return false;
}
- function isRegularExpression(value)
- {
- try
- {
- var foo = "teststring";
- foo.search(value.replace(/\(\?i\)/,""));
- return true;
- }
- catch (e)
- {
- return false;
- }
-
- }
+}
- function isInteger(value)
- {
- var anum=/(^\d+$)/;
- return anum.test(value);
- }
+function isInteger(value)
+{
+ var anum=/(^\d+$)/;
+ return anum.test(value);
+}
//-->
</script>
<%
MappingConnectorFactory.outputConfigurationHeader(threadContext,className,new org.apache.manifoldcf.ui.jsp.JspWrapper(out,adminprofile),pageContext.getRequest().getLocale(),parameters,tabsArray);
-
- // Get connectors, since this will be needed to determine what to display.
- IResultSet set = connectorManager.getConnectors();
-
%>
</head>
<body class="standardbody">
- <table class="page">
- <tr><td colspan="2" class="banner"><jsp:include page="banner.jsp" flush="true"/></td></tr>
- <tr><td class="navigation"><jsp:include page="navigation.jsp" flush="true"/></td>
- <td class="darkwindow">
+ <table class="page">
+ <tr><td colspan="2" class="banner"><jsp:include page="banner.jsp" flush="true"/></td></tr>
+ <tr>
+ <td class="navigation"><jsp:include page="navigation.jsp" flush="true"/></td>
+ <td class="darkwindow">
<%
if (set.getRowCount() == 0)
{
%>
- <p class="windowtitle"><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editmapper.EditMappingConnection")%></p>
- <table class="displaytable"><tr><td class="message"><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editmapper.NoMappingConnectorsRegistered")%></td></tr></table>
+ <p class="windowtitle"><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editmapper.EditMappingConnection")%></p>
+ <table class="displaytable"><tr><td class="message"><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editmapper.NoMappingConnectorsRegistered")%></td></tr></table>
<%
}
else
{
%>
- <form class="standardform" name="editconnection" action="execute.jsp" method="POST" enctype="multipart/form-data">
- <input type="hidden" name="op" value="Continue"/>
- <input type="hidden" name="type" value="mapper"/>
- <input type="hidden" name="tabname" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(tabName)%>'/>
- <input type="hidden" name="isnewconnection" value='<%=(isNew?"true":"false")%>'/>
- <table class="tabtable">
- <tr class="tabspacerrow">
- <td class="spacertab" colspan="<%=tabsArray.size()%>"></td>
- <td class="remaindertab" rowspan="3">
+ <form class="standardform" name="editconnection" action="execute.jsp" method="POST" enctype="multipart/form-data">
+ <input type="hidden" name="op" value="Continue"/>
+ <input type="hidden" name="type" value="mapper"/>
+ <input type="hidden" name="tabname" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(tabName)%>'/>
+ <input type="hidden" name="isnewconnection" value='<%=(isNew?"true":"false")%>'/>
+ <table class="tabtable">
+ <tr class="tabspacerrow">
+ <td class="spacertab" colspan="<%=tabsArray.size()%>"></td>
+ <td class="remaindertab" rowspan="3">
<%
if (description.length() > 0)
{
%>
- <nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editmapper.EditMapping")%> '<%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description)%>'</nobr>
+ <nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editmapper.EditMapping")%> '<%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description)%>'</nobr>
<%
}
else
{
%>
- <nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editmapper.EditAMapping")%></nobr>
+ <nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editmapper.EditAMapping")%></nobr>
<%
}
%>
- </td>
- </tr>
- <tr class="tabsequencerow">
- <td class="blanksequencetab" colspan="<%=tabsArray.size()%>"></td>
- </tr>
- <tr class="tabrow">
+ </td>
+ </tr>
+ <tr class="tabsequencerow">
+ <td class="blanksequencetab" colspan="<%=tabsArray.size()%>"></td>
+ </tr>
+ <tr class="tabrow">
<%
int tabNum = 0;
while (tabNum < tabsArray.size())
{
- String tab = (String)tabsArray.get(tabNum++);
- if (tab.equals(tabName))
- {
+ String tab = (String)tabsArray.get(tabNum++);
+ if (tab.equals(tabName))
+ {
%>
- <td class="activetab"><nobr><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(tab)%></nobr></td>
+ <td class="activetab"><nobr><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(tab)%></nobr></td>
<%
- }
- else
- {
+ }
+ else
+ {
%>
- <td class="passivetab"><nobr><a href="javascript:void(0);" alt='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(tab)+" "+Messages.getAttributeString(pageContext.getRequest().getLocale(),"editmapper.tab")%>' onclick='<%="javascript:SelectTab(\""+tab+"\");return false;"%>'><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(tab)%></a></nobr></td>
+ <td class="passivetab"><nobr><a href="javascript:void(0);" alt='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(tab)+" "+Messages.getAttributeString(pageContext.getRequest().getLocale(),"editmapper.tab")%>' onclick='<%="javascript:SelectTab(\""+tab+"\");return false;"%>'><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(tab)%></a></nobr></td>
<%
- }
+ }
}
%>
- </tr>
- <tr class="tabbodyrow">
- <td class="tabbody" colspan='<%=Integer.toString(tabsArray.size()+1)%>'>
+ </tr>
+ <tr class="tabbodyrow">
+ <td class="tabbody" colspan='<%=Integer.toString(tabsArray.size()+1)%>'>
<%
@@ -304,44 +316,44 @@
if (tabName.equals(Messages.getString(pageContext.getRequest().getLocale(),"editmapper.Name")))
{
%>
- <table class="displaytable">
- <tr><td class="separator" colspan="5"><hr/></td></tr>
- <tr>
- <td class="description"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editmapper.NameColon")%></nobr></td>
- <td class="value" colspan="4">
+ <table class="displaytable">
+ <tr><td class="separator" colspan="5"><hr/></td></tr>
+ <tr>
+ <td class="description"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editmapper.NameColon")%></nobr></td>
+ <td class="value" colspan="4">
<%
// If the connection doesn't exist yet, we are allowed to change the name.
if (isNew)
{
%>
- <input type="text" size="32" name="connname" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(connectionName)%>'/>
+ <input type="text" size="32" name="connname" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(connectionName)%>'/>
<%
}
else
{
%>
- <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(connectionName)%>
- <input type="hidden" name="connname" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(connectionName)%>'/>
+ <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(connectionName)%>
+ <input type="hidden" name="connname" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(connectionName)%>'/>
<%
}
%>
- </td>
- </tr>
- <tr>
- <td class="description"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editmapper.DescriptionColon")%></nobr></td>
- <td class="value" colspan="4">
- <input type="text" size="50" name="description" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(description)%>'/>
- </td>
- </tr>
- </table>
+ </td>
+ </tr>
+ <tr>
+ <td class="description"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editmapper.DescriptionColon")%></nobr></td>
+ <td class="value" colspan="4">
+ <input type="text" size="50" name="description" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(description)%>'/>
+ </td>
+ </tr>
+ </table>
<%
}
else
{
- // Hiddens for the Name tab
+ // Hiddens for the Name tab
%>
- <input type="hidden" name="connname" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(connectionName)%>'/>
- <input type="hidden" name="description" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(description)%>'/>
+ <input type="hidden" name="connname" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(connectionName)%>'/>
+ <input type="hidden" name="description" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(description)%>'/>
<%
}
@@ -350,200 +362,205 @@
if (tabName.equals(Messages.getString(pageContext.getRequest().getLocale(),"editmapper.Type")))
{
%>
- <table class="displaytable">
- <tr><td class="separator" colspan="5"><hr/></td></tr>
- <tr>
- <td class="description"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editmapper.ConnectionTypeColon")%></nobr></td><td class="value" colspan="4">
+ <table class="displaytable">
+ <tr><td class="separator" colspan="5"><hr/></td></tr>
+ <tr>
+ <td class="description">
+ <nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editmapper.ConnectionTypeColon")%></nobr></td><td class="value" colspan="4">
<%
if (className.length() > 0)
{
- String value = connectorManager.getDescription(className);
- if (value == null)
- {
+ String value = connectorManager.getDescription(className);
+ if (value == null)
+ {
%>
- <nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editmapper.UNREGISTERED")%> <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(className)%></nobr>
+ <nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editmapper.UNREGISTERED")%> <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(className)%></nobr>
<%
- }
- else
- {
+ }
+ else
+ {
%>
- <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(value)%>
+ <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(value)%>
<%
- }
+ }
%>
- <input type="hidden" name="classname" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(className)%>'/>
+ <input type="hidden" name="classname" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(className)%>'/>
<%
}
else
{
- int i = 0;
+ int i = 0;
%>
- <select name="classname" size="1">
+ <select name="classname" size="1">
<%
- while (i < set.getRowCount())
- {
- IResultRow row = set.getRow(i++);
- String thisClassName = row.getValue("classname").toString();
- String thisDescription = row.getValue("description").toString();
+ while (i < set.getRowCount())
+ {
+ IResultRow row = set.getRow(i++);
+ String thisClassName = row.getValue("classname").toString();
+ String thisDescription = row.getValue("description").toString();
%>
- <option value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(thisClassName)%>'
- <%=className.equals(thisClassName)?"selected=\"selected\"":""%>><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(thisDescription)%></option>
+ <option value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(thisClassName)%>'
+ <%=className.equals(thisClassName)?"selected=\"selected\"":""%>><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(thisDescription)%>
+ </option>
<%
- }
+ }
%>
- </select>
+ </select>
<%
}
%>
- </td>
- </tr>
- </table>
+ </td>
+ </tr>
+ </table>
<%
}
else
{
- // Hiddens for the "Type" tab
+ // Hiddens for the "Type" tab
%>
- <input type="hidden" name="classname" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(className)%>'/>
+ <input type="hidden" name="classname" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(className)%>'/>
<%
}
// 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.PrerequisiteUserMappingColon")%></nobr></td>
- <td class="value" colspan="4">
- <input type="hidden" name="prerequisites_present" value="true"/>
+ <table class="displaytable">
+ <tr><td class="separator" colspan="5"><hr/></td></tr>
+ <tr>
+ <td class="description"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editmapper.PrerequisiteUserMappingColon")%></nobr></td>
+ <td class="value" colspan="4">
+ <input type="hidden" name="prerequisites_present" value="true"/>
<%
if (prereq == null)
{
%>
- <input type="radio" name="prerequisites" value="" checked="true"/> <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editmapper.NoPrerequisites")%><br/>
+ <input type="radio" name="prerequisites" value="" checked="true"/> <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editmapper.NoPrerequisites")%><br/>
<%
}
else
{
%>
- <input type="radio" name="prerequisites" value=""/> <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editmapper.NoPrerequisites")%><br/>
+ <input type="radio" name="prerequisites" value=""/> <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editmapper.NoPrerequisites")%><br/>
<%
}
for (IMappingConnection mappingConnection : mappingConnections)
{
- String mappingName = mappingConnection.getName();
- String mappingDescription = mappingName;
- if (mappingConnection.getDescription() != null && mappingConnection.getDescription().length() > 0)
- mappingDescription += " (" + mappingConnection.getDescription()+")";
- if (prereq != null && prereq.equals(mappingName))
- {
+ String mappingName = mappingConnection.getName();
+ String mappingDescription = mappingName;
+ if (mappingConnection.getDescription() != null && mappingConnection.getDescription().length() > 0)
+ mappingDescription += " (" + mappingConnection.getDescription()+")";
+ if (prereq != null && prereq.equals(mappingName))
+ {
+%>
+ <input type="radio" name="prerequisites" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(mappingName)%>' checked="true"/> <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(mappingDescription)%><br/>
+<%
+ }
+ else
+ {
%>
- <input type="radio" name="prerequisites" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(mappingName)%>' checked="true"/> <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(mappingDescription)%><br/>
+ <input type="radio" name="prerequisites" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(mappingName)%>'/> <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(mappingDescription)%><br/>
<%
- }
- else
- {
-%>
- <input type="radio" name="prerequisites" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(mappingName)%>'/> <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(mappingDescription)%><br/>
-<%
- }
+ }
}
%>
- </td>
- </tr>
- </table>
+ </td>
+ </tr>
+ </table>
<%
}
else
{
- // Hiddens for Prerequisites tab
+ // Hiddens for Prerequisites tab
%>
- <input type="hidden" name="prerequisites_present" value="true"/>
+ <input type="hidden" name="prerequisites_present" value="true"/>
<%
- if (prereq != null)
- {
+ if (prereq != null)
+ {
%>
- <input type="hidden" name="prerequisites" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(prereq)%>'/>
+ <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")))
{
%>
- <table class="displaytable">
- <tr><td class="separator" colspan="5"><hr/></td></tr>
- <tr>
- <td class="description"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editmapper.MaxConnectionsColon")%></nobr></td>
- <td class="value" colspan="4"><input type="text" size="6" name="maxconnections" value='<%=Integer.toString(maxConnections)%>'/></td>
- </tr>
- </table>
+ <table class="displaytable">
+ <tr><td class="separator" colspan="5"><hr/></td></tr>
+ <tr>
+ <td class="description"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"editmapper.MaxConnectionsColon")%></nobr></td>
+ <td class="value" colspan="4"><input type="text" size="6" name="maxconnections" value='<%=Integer.toString(maxConnections)%>'/></td>
+ </tr>
+ </table>
<%
}
else
{
- // Hiddens for "Throttling" tab
+ // Hiddens for "Throttling" tab
%>
- <input type="hidden" name="maxconnections" value='<%=Integer.toString(maxConnections)%>'/>
+ <input type="hidden" name="maxconnections" value='<%=Integer.toString(maxConnections)%>'/>
<%
}
if (className.length() > 0)
- MappingConnectorFactory.outputConfigurationBody(threadContext,className,new org.apache.manifoldcf.ui.jsp.JspWrapper(out,adminprofile),pageContext.getRequest().getLocale(),parameters,tabName);
+ MappingConnectorFactory.outputConfigurationBody(threadContext,className,new org.apache.manifoldcf.ui.jsp.JspWrapper(out,adminprofile),pageContext.getRequest().getLocale(),parameters,tabName);
%>
- <table class="displaytable">
- <tr><td class="separator" colspan="4"><hr/></td></tr>
- <tr><td class="message" colspan="4"><nobr>
+ <table class="displaytable">
+ <tr><td class="separator" colspan="4"><hr/></td></tr>
+ <tr>
+ <td class="message" colspan="4">
+ <nobr>
<%
if (className.length() > 0)
{
%>
- <input type="button" value="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"editmapper.Save")%>" onClick="javascript:Save()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"editmapper.SaveThisMappingConnection")%>"/>
+ <input type="button" value="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"editmapper.Save")%>" onClick="javascript:Save()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"editmapper.SaveThisMappingConnection")%>"/>
<%
}
else
{
- if (tabName.equals(Messages.getString(pageContext.getRequest().getLocale(),"editmapper.Type")))
- {
+ if (tabName.equals(Messages.getString(pageContext.getRequest().getLocale(),"editmapper.Type")))
+ {
%>
- <input type="button" value="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"editmapper.Continue")%>" onClick="javascript:Continue()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"editmapper.ContinueToNextPage")%>"/>
+ <input type="button" value="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"editmapper.Continue")%>" onClick="javascript:Continue()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"editmapper.ContinueToNextPage")%>"/>
<%
- }
+ }
}
%>
- <input type="button" value="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"editmapper.Cancel")%>" onClick="javascript:Cancel()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"editmapper.CancelMappingEditing")%>"/></nobr></td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </form>
+ <input type="button" value="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"editmapper.Cancel")%>" onClick="javascript:Cancel()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"editmapper.CancelMappingEditing")%>"/>
+ </nobr>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </form>
<%
}
%>
- </td>
- </tr>
- </table>
+ </td>
+ </tr>
+ </table>
</body>
</html>
<%
- }
- catch (ManifoldCFException e)
- {
+}
+catch (ManifoldCFException e)
+{
e.printStackTrace();
variableContext.setParameter("text",e.getMessage());
variableContext.setParameter("target","listmappers.jsp");
%>
<jsp:forward page="error.jsp"/>
<%
- }
+}
%>