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 2014/06/01 14:36:40 UTC
svn commit: r1598980 [1/2] - in
/manifoldcf/branches/CONNECTORS-946/framework: crawler-ui/src/main/webapp/
pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/
pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/
pull-agent/src/ma...
Author: kwright
Date: Sun Jun 1 12:36:39 2014
New Revision: 1598980
URL: http://svn.apache.org/r1598980
Log:
More development
Added:
manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/edittransformation.jsp (with props)
manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/listtransformations.jsp (with props)
manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/viewtransformation.jsp (with props)
manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/PipelineManager.java (with props)
Modified:
manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/execute.jsp
manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/navigation.jsp
manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IJobDescription.java
manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/HopFilterManager.java
manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobDescription.java
manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java
manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/Jobs.java
manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/ScheduleManager.java
manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
manifoldcf/branches/CONNECTORS-946/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_en_US.properties
manifoldcf/branches/CONNECTORS-946/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_ja_JP.properties
manifoldcf/branches/CONNECTORS-946/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_zh_CN.properties
Added: manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/edittransformation.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/edittransformation.jsp?rev=1598980&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/edittransformation.jsp (added)
+++ manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/edittransformation.jsp Sun Jun 1 12:36:39 2014
@@ -0,0 +1,473 @@
+<%@ include file="adminHeaders.jsp" %>
+
+<%
+
+/* $Id$ */
+
+/**
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* 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 "ConnectionObject".
+ try
+ {
+ // Get the connection manager handle
+ ITransformationConnectionManager connMgr = TransformationConnectionManagerFactory.make(threadContext);
+ // Also get the list of available connectors
+ ITransformationConnectorManager connectorManager = TransformationConnectorManagerFactory.make(threadContext);
+
+ // Figure out what the current tab name is.
+ String tabName = variableContext.getParameter("tabname");
+ if (tabName == null || tabName.length() == 0)
+ tabName = Messages.getString(pageContext.getRequest().getLocale(),"edittransformation.Name");
+ String connectionName = null;
+ ITransformationConnection connection = (ITransformationConnection)threadContext.get("ConnectionObject");
+ if (connection == null)
+ {
+ // We did not go through execute.jsp
+ // We might have received an argument specifying the connection name.
+ connectionName = variableContext.getParameter("connname");
+ // If the connectionname is not null, load the connection description and prepopulate everything with what comes from it.
+ if (connectionName != null && connectionName.length() > 0)
+ {
+ connection = connMgr.load(connectionName);
+ }
+ }
+
+ // Set up default fields.
+ boolean isNew = true;
+ String description = "";
+ String className = "";
+ int maxConnections = 10;
+ ConfigParams parameters = new ConfigParams();
+
+ // If there's a connection object, set up all our parameters from it.
+ if (connection != null)
+ {
+ // Set up values
+ isNew = connection.getIsNew();
+ connectionName = connection.getName();
+ description = connection.getDescription();
+ className = connection.getClassName();
+ parameters = connection.getConfigParams();
+ maxConnections = connection.getMaxConnections();
+ }
+ else
+ connectionName = null;
+
+ if (connectionName == null)
+ connectionName = "";
+
+ // Initialize tabs array.
+ ArrayList tabsArray = new ArrayList();
+
+ // Set up the predefined tabs
+ tabsArray.add(Messages.getString(pageContext.getRequest().getLocale(),"edittransformation.Name"));
+ tabsArray.add(Messages.getString(pageContext.getRequest().getLocale(),"edittransformation.Type"));
+ if (className.length() > 0)
+ tabsArray.add(Messages.getString(pageContext.getRequest().getLocale(),"edittransformation.Throttling"));
+
+%>
+
+<?xml version="1.0" encoding="utf-8"?>
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="StyleSheet" href="style.css" type="text/css" media="screen"/>
+ <title>
+ <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"edittransformation.ApacheManifoldCFEditTransformationConnection")%>
+ </title>
+
+ <script type="text/javascript">
+ <!--
+
+ // Use this method to repost the form and pick a new tab
+ function SelectTab(newtab)
+ {
+ if (checkForm())
+ {
+ document.editconnection.tabname.value = newtab;
+ document.editconnection.submit();
+ }
+ }
+
+ // Use this method to repost the form,
+ // and set the anchor request.
+ function postFormSetAnchor(anchorValue)
+ {
+ if (checkForm())
+ {
+ if (anchorValue != "")
+ document.editconnection.action = document.editconnection.action + "#" + anchorValue;
+ document.editconnection.submit();
+ }
+ }
+
+ // Use this method to repost the form
+ function postForm()
+ {
+ if (checkForm())
+ {
+ document.editconnection.submit();
+ }
+ }
+
+ 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 (editconnection.connname.value == "")
+ {
+ alert("<%=Messages.getBodyJavascriptString(pageContext.getRequest().getLocale(),"edittransformation.ConnectionMustHaveAName")%>");
+ SelectTab("<%=Messages.getBodyJavascriptString(pageContext.getRequest().getLocale(),"edittransformation.Name")%>");
+ document.editconnection.connname.focus();
+ 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.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(),"edittransformation.TheMaximumNumberOfConnectionsMustBeAValidInteger")%>");
+ editconnection.maxconnections.focus();
+ return false;
+ }
+ return true;
+ }
+
+ 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);
+ }
+
+ //-->
+ </script>
+<%
+ TransformationConnectorFactory.outputConfigurationHeader(threadContext,className,new org.apache.manifoldcf.ui.jsp.JspWrapper(out,adminprofile),pageContext.getRequest().getLocale(),parameters,tabsArray);
+%>
+
+</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">
+<%
+ // Get connector list; need this to decide what to do
+ IResultSet set = connectorManager.getConnectors();
+ if (set.getRowCount() == 0)
+ {
+%>
+ <p class="windowtitle"><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"edittransformation.EditTransformationConnection")%></p>
+ <table class="displaytable"><tr><td class="message">No transformation connectors registered</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="transformation"/>
+ <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="tabrow">
+<%
+ int tabNum = 0;
+ while (tabNum < tabsArray.size())
+ {
+ String tab = (String)tabsArray.get(tabNum++);
+ if (tab.equals(tabName))
+ {
+%>
+ <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(),"edittransformation.tab")%>' onclick='<%="javascript:SelectTab(\""+tab+"\");return false;"%>'><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(tab)%></a></nobr></td>
+<%
+ }
+ }
+%>
+ <td class="remaindertab">
+<%
+ if (description.length() > 0)
+ {
+%>
+ <nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"edittransformation.EditTransformationConnection")%> '<%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description)%>'</nobr>
+<%
+ }
+ else
+ {
+%>
+
+ <nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"edittransformation.EditATransformationConnection")%></nobr>
+<%
+ }
+%>
+ </td>
+ </tr>
+ <tr class="tabbodyrow">
+ <td class="tabbody" colspan='<%=Integer.toString(tabsArray.size()+1)%>'>
+<%
+
+
+ // Name tab
+ if (tabName.equals(Messages.getString(pageContext.getRequest().getLocale(),"edittransformation.Name")))
+ {
+%>
+ <table class="displaytable">
+ <tr><td class="separator" colspan="5"><hr/></td></tr>
+ <tr>
+ <td class="description"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"edittransformation.NameColon")%></nobr></td><td class="value" colspan="4">
+<%
+ // If the connection doesn't exist yet, we are allowed to change the name.
+ if (connection == null || connectionName.length() < 1)
+ {
+%>
+ <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)%>'/>
+<%
+ }
+%>
+ </td>
+ </tr>
+ <tr>
+ <td class="description"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"edittransformation.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="connname" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(connectionName)%>'/>
+ <input type="hidden" name="description" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(description)%>'/>
+<%
+ }
+
+
+ // "Type" tab
+ if (tabName.equals(Messages.getString(pageContext.getRequest().getLocale(),"edittransformation.Type")))
+ {
+%>
+ <table class="displaytable">
+ <tr><td class="separator" colspan="5"><hr/></td></tr>
+ <tr>
+ <td class="description"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"edittransformation.ConnectionTypeColon")%></nobr></td><td class="value" colspan="4">
+<%
+ if (className.length() > 0)
+ {
+ String value = connectorManager.getDescription(className);
+ if (value == null)
+ {
+%>
+ <nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"edittransformation.UNREGISTERED")%> <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(className)%></nobr>
+<%
+ }
+ else
+ {
+%>
+ <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(value)%>
+<%
+ }
+%>
+ <input type="hidden" name="classname" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(className)%>'/>
+<%
+ }
+ else
+ {
+ int i = 0;
+%>
+ <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();
+%>
+ <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>
+<%
+ }
+%>
+ </td>
+ </tr>
+ </table>
+<%
+ }
+ else
+ {
+ // Hiddens for the "Type" tab
+%>
+ <input type="hidden" name="classname" value='<%=org.apache.manifoldcf.ui.util.Encoder.attributeEscape(className)%>'/>
+<%
+ }
+
+
+ // The "Throttling" tab
+ if (tabName.equals(Messages.getString(pageContext.getRequest().getLocale(),"edittransformation.Throttling")))
+ {
+%>
+ <table class="displaytable">
+ <tr><td class="separator" colspan="2"><hr/></td></tr>
+ <tr>
+ <td class="description"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"edittransformation.MaxConnectionsColon")%></nobr></td>
+ <td class="value"><input type="text" size="6" name="maxconnections" value='<%=Integer.toString(maxConnections)%>'/></td>
+ </tr>
+ </table>
+<%
+ }
+ else
+ {
+ // Hiddens for "Throttling" tab
+%>
+ <input type="hidden" name="maxconnections" value='<%=Integer.toString(maxConnections)%>'/>
+<%
+ }
+
+ if (className.length() > 0)
+ TransformationConnectorFactory.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>
+<%
+ if (className.length() > 0)
+ {
+%>
+ <input type="button" value="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"edittransformation.Save")%>" onClick="javascript:Save()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"edittransformation.SaveThisTransformationConnection")%>"/>
+<%
+ }
+ else
+ {
+ if (tabName.equals(Messages.getString(pageContext.getRequest().getLocale(),"edittransformation.Type")))
+ {
+%>
+ <input type="button" value="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"edittransformation.Continue")%>" onClick="javascript:Continue()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"edittransformation.ContinueToNextPage")%>"/>
+<%
+ }
+ }
+%>
+ <input type="button" value="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"edittransformation.Cancel")%>" onClick="javascript:Cancel()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"edittransformation.CancelTransformationConnectionEditing")%>"/></nobr></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </form>
+
+<%
+ }
+%>
+
+ </td>
+ </tr>
+ </table>
+
+</body>
+
+</html>
+
+<%
+ }
+ catch (ManifoldCFException e)
+ {
+ e.printStackTrace();
+ variableContext.setParameter("text",e.getMessage());
+ variableContext.setParameter("target","listtransformations.jsp");
+%>
+ <jsp:forward page="error.jsp"/>
+<%
+ }
+%>
+
Propchange: manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/edittransformation.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/edittransformation.jsp
------------------------------------------------------------------------------
svn:keywords = Id
Modified: manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/execute.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/execute.jsp?rev=1598980&r1=1598979&r2=1598980&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/execute.jsp (original)
+++ manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/execute.jsp Sun Jun 1 12:36:39 2014
@@ -50,8 +50,10 @@
IAuthorityConnectionManager authConnManager = AuthorityConnectionManagerFactory.make(threadContext);
IMappingConnectionManager mappingConnManager = MappingConnectionManagerFactory.make(threadContext);
IOutputConnectionManager outputManager = OutputConnectionManagerFactory.make(threadContext);
+ ITransformationConnectionManager transformationManager = TransformationConnectionManagerFactory.make(threadContext);
IOutputConnectorPool outputConnectorPool = OutputConnectorPoolFactory.make(threadContext);
+ ITransformationConnectorPool transformationConnectorPool = TransformationConnectorPoolFactory.make(threadContext);
IRepositoryConnectorPool repositoryConnectorPool = RepositoryConnectorPoolFactory.make(threadContext);
String type = variableContext.getParameter("type");
@@ -748,6 +750,121 @@
<%
}
}
+ else if (type != null && op != null && type.equals("output"))
+ {
+ // -- Output connection editing operations --
+ if (op.equals("Save") || op.equals("Continue"))
+ {
+ try
+ {
+ // Set up a connection object that is a merge of an existing connection object plus what was posted.
+ ITransformationConnection connection = null;
+ boolean isNew = true;
+ String x = variableContext.getParameter("isnewconnection");
+ if (x != null)
+ isNew = x.equals("true");
+
+ String connectionName = variableContext.getParameter("connname");
+ // If the connectionname is not null, load the connection description and prepopulate everything with what comes from it.
+ if (connectionName != null && connectionName.length() > 0 && !isNew)
+ {
+ connection = transformationManager.load(connectionName);
+ }
+
+ if (connection == null)
+ {
+ connection = transformationManager.create();
+ if (connectionName != null && connectionName.length() > 0)
+ connection.setName(connectionName);
+ }
+
+ // Gather all the data from the form.
+ connection.setIsNew(isNew);
+ x = variableContext.getParameter("description");
+ if (x != null)
+ connection.setDescription(x);
+ x = variableContext.getParameter("classname");
+ if (x != null)
+ connection.setClassName(x);
+ x = variableContext.getParameter("maxconnections");
+ if (x != null && x.length() > 0)
+ connection.setMaxConnections(Integer.parseInt(x));
+
+ String error = TransformationConnectorFactory.processConfigurationPost(threadContext,connection.getClassName(),variableContext,pageContext.getRequest().getLocale(),connection.getConfigParams());
+
+ if (error != null)
+ {
+ variableContext.setParameter("text",error);
+ variableContext.setParameter("target","listtransformations.jsp");
+%>
+ <jsp:forward page="error.jsp"/>
+<%
+ }
+
+ if (op.equals("Continue"))
+ {
+ threadContext.save("ConnectionObject",connection);
+%>
+ <jsp:forward page="edittransformation.jsp"/>
+<%
+ }
+ else if (op.equals("Save"))
+ {
+ transformationManager.save(connection);
+ variableContext.setParameter("connname",connectionName);
+%>
+ <jsp:forward page="viewtransformation.jsp"/>
+<%
+ }
+ }
+ catch (ManifoldCFException e)
+ {
+ e.printStackTrace();
+ variableContext.setParameter("text",e.getMessage());
+ variableContext.setParameter("target","listtransformations.jsp");
+%>
+ <jsp:forward page="error.jsp"/>
+<%
+ }
+ }
+ else if (op.equals("Delete"))
+ {
+ try
+ {
+ String connectionName = variableContext.getParameter("connname");
+ if (connectionName == null)
+ throw new ManifoldCFException("Missing connection parameter");
+ transformationManager.delete(connectionName);
+%>
+ <jsp:forward page="listtransformations.jsp"/>
+<%
+ }
+ catch (ManifoldCFException e)
+ {
+ e.printStackTrace();
+ variableContext.setParameter("text",e.getMessage());
+ variableContext.setParameter("target","listtransformations.jsp");
+%>
+ <jsp:forward page="error.jsp"/>
+<%
+ }
+ }
+ else if (op.equals("Cancel"))
+ {
+%>
+ <jsp:forward page="listtransformations.jsp"/>
+<%
+ }
+ else
+ {
+ // Error
+ variableContext.setParameter("text","Illegal parameter to transformation connection execution page");
+ variableContext.setParameter("target","listtransformations.jsp");
+%>
+ <jsp:forward page="error.jsp"/>
+<%
+ }
+ }
else if (type != null && op != null && type.equals("job"))
{
// -- Job editing operations --
Added: manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/listtransformations.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/listtransformations.jsp?rev=1598980&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/listtransformations.jsp (added)
+++ manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/listtransformations.jsp Sun Jun 1 12:36:39 2014
@@ -0,0 +1,142 @@
+<%@ include file="adminHeaders.jsp" %>
+
+<%
+
+/* $Id$ */
+
+/**
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+%>
+
+<?xml version="1.0" encoding="utf-8"?>
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="StyleSheet" href="style.css" type="text/css" media="screen"/>
+ <title>
+ <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listtransformations.ApacheManifoldCFListTransformationConnections")%>
+ </title>
+
+ <script type="text/javascript">
+ <!--
+
+ function Delete(connectionName)
+ {
+ if (confirm("<%=Messages.getBodyJavascriptString(pageContext.getRequest().getLocale(),"listtransformations.DeleteTransformationConnection")%> '"+connectionName+"'?"))
+ {
+ document.listconnections.op.value="Delete";
+ document.listconnections.connname.value=connectionName;
+ document.listconnections.submit();
+ }
+ }
+
+ //-->
+ </script>
+
+</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="window">
+ <p class="windowtitle"><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listtransformations.ListOfTransformationConnections")%></p>
+ <form class="standardform" name="listconnections" action="execute.jsp" method="POST">
+ <input type="hidden" name="op" value="Continue"/>
+ <input type="hidden" name="type" value="transformattion"/>
+ <input type="hidden" name="connname" value=""/>
+
+<%
+ try
+ {
+ // Get the transformation connection manager handle
+ ITransformationConnectionManager manager = TransformationConnectionManagerFactory.make(threadContext);
+ ITransformationConnectorManager connectorManager = TransformationConnectorManagerFactory.make(threadContext);
+ ITransformationConnection[] connections = manager.getAllConnections();
+%>
+ <table class="datatable">
+ <tr>
+ <td class="separator" colspan="5"><hr/></td>
+ </tr>
+ <tr class="headerrow">
+ <td class="columnheader"></td>
+ <td class="columnheader"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listtransformations.Name")%></nobr></td>
+ <td class="columnheader"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listtransformations.Description")%></nobr></td>
+ <td class="columnheader"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listtransformations.ConnectionType")%></nobr></td>
+ <td class="columnheader"><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listtransformations.Max")%></td>
+ </tr>
+<%
+ int i = 0;
+ while (i < connections.length)
+ {
+ ITransformationConnection connection = connections[i++];
+
+ String name = connection.getName();
+ String description = connection.getDescription();
+ if (description == null)
+ description = "";
+ String className = connection.getClassName();
+ String connectorName = connectorManager.getDescription(className);
+ if (connectorName == null)
+ connectorName = className + Messages.getString(pageContext.getRequest().getLocale(),"listtransformations.uninstalled");;
+ int maxCount = connection.getMaxConnections();
+
+%>
+ <tr <%="class=\""+((i%2==0)?"evendatarow":"odddatarow")+"\""%>>
+ <td class="columncell">
+ <nobr>
+ <a href='<%="viewtransformation.jsp?connname="+org.apache.manifoldcf.core.util.URLEncoder.encode(name)%>' alt='<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"listtransformations.View")+" "+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(name)%>'><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listtransformations.View")%></a>
+ <a href='<%="edittransformation.jsp?connname="+org.apache.manifoldcf.core.util.URLEncoder.encode(name)%>' alt='<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"listtransformations.Edit")+" "+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(name)%>'><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listtransformations.Edit")%></a>
+ <a href="javascript:void()" onclick='<%="javascript:Delete(\""+org.apache.manifoldcf.ui.util.Encoder.attributeJavascriptEscape(name)+"\")"%>' alt='<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"listtransformations.Delete")+" "+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(name)%>'><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listtransformations.Delete")%></a>
+ </nobr>
+ </td>
+ <td class="columncell"><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(name)%></td>
+ <td class="columncell"><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description)%></td>
+ <td class="columncell"><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(connectorName)%></td>
+ <td class="columncell"><%=Integer.toString(maxCount)%></td>
+ </tr>
+<%
+ }
+%>
+ <tr>
+ <td class="separator" colspan="5"><hr/></td>
+ </tr>
+ <tr><td class="message" colspan="5"><a href="edittransformation.jsp" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"listtransformations.AddATransformationConnection")%>"><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listtransformations.AddaNewTransformationConnection")%></a></td></tr>
+ </table>
+
+<%
+ }
+ catch (ManifoldCFException e)
+ {
+ e.printStackTrace();
+ variableContext.setParameter("text",e.getMessage());
+ variableContext.setParameter("target","index.jsp");
+%>
+ <jsp:forward page="error.jsp"/>
+<%
+ }
+%>
+ </form>
+ </td>
+ </tr>
+ </table>
+
+</body>
+
+</html>
Propchange: manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/listtransformations.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/listtransformations.jsp
------------------------------------------------------------------------------
svn:keywords = Id
Modified: manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/navigation.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/navigation.jsp?rev=1598980&r1=1598979&r2=1598980&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/navigation.jsp (original)
+++ manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/navigation.jsp Sun Jun 1 12:36:39 2014
@@ -31,6 +31,9 @@
<p class="menumain"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"navigation.Outputs")%></nobr></p>
<ul class="menusecond">
<li class="menuitem">
+ <nobr><a class="menulink" href="listtransformations.jsp" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"navigation.Listtransformationconnections")%>"><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"navigation.ListTransformationConnections")%></a></nobr>
+ </li>
+ <li class="menuitem">
<nobr><a class="menulink" href="listoutputs.jsp" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"navigation.Listoutputconnections")%>"><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"navigation.ListOutputConnections")%></a></nobr>
</li>
</ul>
Added: manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/viewtransformation.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/viewtransformation.jsp?rev=1598980&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/viewtransformation.jsp (added)
+++ manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/viewtransformation.jsp Sun Jun 1 12:36:39 2014
@@ -0,0 +1,182 @@
+<%@ include file="adminHeaders.jsp" %>
+
+<%
+
+/* $Id$ */
+
+/**
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+%>
+
+<?xml version="1.0" encoding="utf-8"?>
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="StyleSheet" href="style.css" type="text/css" media="screen"/>
+ <title>
+ <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewtransformation.ApacheManifoldCFViewTransformationConnectionStatus")%>
+ </title>
+
+ <script type="text/javascript">
+ <!--
+
+ function Delete(connectionName)
+ {
+ if (confirm("<%=Messages.getBodyJavascriptString(pageContext.getRequest().getLocale(),"viewtransformation.Deletetransformationconnection")%> '"+connectionName+"'<%=Messages.getBodyJavascriptString(pageContext.getRequest().getLocale(),"viewtransformation.qmark")%>"))
+ {
+ document.viewconnection.op.value="Delete";
+ document.viewconnection.connname.value=connectionName;
+ document.viewconnection.submit();
+ }
+ }
+
+ //-->
+ </script>
+
+</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="window">
+ <p class="windowtitle"><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewtransformation.ViewTransformationConnectionStatus")%></p>
+ <form class="standardform" name="viewconnection" action="execute.jsp" method="POST">
+ <input type="hidden" name="op" value="Continue"/>
+ <input type="hidden" name="type" value="transformation"/>
+ <input type="hidden" name="connname" value=""/>
+
+<%
+ try
+ {
+ ITransformationConnectorManager connectorManager = TransformationConnectorManagerFactory.make(threadContext);
+ // Get the connection manager handle
+ ITransformationConnectionManager connManager = TransformationConnectionManagerFactory.make(threadContext);
+ ITransformationConnectorPool transformationConnectorPool = TransformationConnectorPoolFactory.make(threadContext);
+ String connectionName = variableContext.getParameter("connname");
+ ITransformationConnection connection = connManager.load(connectionName);
+ if (connection == null)
+ {
+ throw new ManifoldCFException("No such connection: '"+connectionName+"'");
+ }
+ else
+ {
+ String description = connection.getDescription();
+ if (description == null)
+ description = "";
+ String className = connection.getClassName();
+ String connectorName = connectorManager.getDescription(className);
+ if (connectorName == null)
+ connectorName = className + Messages.getString(pageContext.getRequest().getLocale(),"viewtransformation.uninstalled");
+ int maxCount = connection.getMaxConnections();
+ ConfigParams parameters = connection.getConfigParams();
+
+ // Do stuff so we can call out to display the parameters
+ //String JSPFolder = TransformationConnectorFactory.getJSPFolder(threadContext,className);
+ //threadContext.save("Parameters",parameters);
+
+ // Now, test the connection.
+ String connectionStatus;
+ try
+ {
+ ITransformationConnector c = transformationConnectorPool.grab(connection);
+ if (c == null)
+ connectionStatus = Messages.getString(pageContext.getRequest().getLocale(),"viewtransformation.Connectorisnotinstalled");
+ else
+ {
+ try
+ {
+ connectionStatus = c.check();
+ }
+ finally
+ {
+ transformationConnectorPool.release(connection,c);
+ }
+ }
+ }
+ catch (ManifoldCFException e)
+ {
+ e.printStackTrace();
+ connectionStatus = Messages.getString(pageContext.getRequest().getLocale(),"viewtransformation.Threwexception")+" '"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(e.getMessage())+"'";
+ }
+%>
+ <table class="displaytable">
+ <tr>
+ <td class="separator" colspan="4"><hr/></td>
+ </tr>
+ <tr>
+ <td class="description" colspan="1"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewtransformation.NameColon")%></nobr></td><td class="value" colspan="1"><%="<!--connection="+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(connectionName)+"-->"%><nobr><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(connectionName)%></nobr></td>
+ <td class="description" colspan="1"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewtransformation.DescriptionColon")%></nobr></td><td class="value" colspan="1"><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description)%></td>
+ </tr>
+ <tr>
+ <td class="separator" colspan="4"><hr/></td>
+ </tr>
+ <tr>
+ <td class="description" colspan="1"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewtransformation.ConnectionTypeColon")%></nobr></td><td class="value" colspan="1"><nobr><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(connectorName)%></nobr></td>
+ <td class="description" colspan="1"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewtransformation.MaxConnectionsColon")%></nobr></td><td class="value" colspan="1"><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(Integer.toString(maxCount))%></td>
+ </tr>
+ <tr>
+ <td class="separator" colspan="4"><hr/></td>
+ </tr>
+ <tr>
+ <td colspan="4">
+<%
+ TransformationConnectorFactory.viewConfiguration(threadContext,className,new org.apache.manifoldcf.ui.jsp.JspWrapper(out,adminprofile),pageContext.getRequest().getLocale(),parameters);
+%>
+ </td>
+ </tr>
+ <tr>
+ <td class="separator" colspan="4"><hr/></td>
+ </tr>
+ <tr>
+ <td class="description" colspan="1"><nobr><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewtransformation.ConnectionStatusColon")%></nobr></td><td class="value" colspan="3"><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(connectionStatus)%></td>
+ </tr>
+ <tr>
+ <td class="separator" colspan="4"><hr/></td>
+ </tr>
+ <tr>
+ <td class="message" colspan="4">
+ <nobr><a href='<%="viewtransformation.jsp?connname="+org.apache.manifoldcf.core.util.URLEncoder.encode(connectionName)%>' alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"viewtransformation.Refresh")%>"><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewtransformation.Refresh")%></a></nobr>
+ <nobr><a href='<%="edittransformation.jsp?connname="+org.apache.manifoldcf.core.util.URLEncoder.encode(connectionName)%>' alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"viewtransformation.EditThisTransformationConnection")%>"><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewtransformation.Edit")%></a></nobr>
+ <nobr><a href="javascript:void()" onclick='<%="javascript:Delete(\""+org.apache.manifoldcf.ui.util.Encoder.attributeJavascriptEscape(connectionName)+"\")"%>' alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"viewtransformation.DeleteThisTransformationConnection")%>"><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewtransformation.Delete")%></a></nobr>
+ </td>
+ </tr>
+ </table>
+
+<%
+ }
+ }
+ catch (ManifoldCFException e)
+ {
+ e.printStackTrace();
+ variableContext.setParameter("text",e.getMessage());
+ variableContext.setParameter("target","listtransformations.jsp");
+%>
+ <jsp:forward page="error.jsp"/>
+<%
+ }
+%>
+ </form>
+ </td>
+ </tr>
+ </table>
+
+</body>
+
+</html>
Propchange: manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/viewtransformation.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/viewtransformation.jsp
------------------------------------------------------------------------------
svn:keywords = Id
Modified: manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IJobDescription.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IJobDescription.java?rev=1598980&r1=1598979&r2=1598980&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IJobDescription.java (original)
+++ manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IJobDescription.java Sun Jun 1 12:36:39 2014
@@ -91,6 +91,32 @@ public interface IJobDescription
*/
public String getOutputConnectionName();
+ /** Clear pipeline connections.
+ */
+ public void clearPipeline();
+
+ /** Add a pipeline connection.
+ *@param pipelineConnectionName is the name of the pipeline connection to add.
+ */
+ public void addPipelineConnection(String pipelineConnectionName);
+
+ /** Get a count of pipeline connections.
+ *@return the current number of pipeline connections.
+ */
+ public int countPipelineConnections();
+
+ /** Get a specific pipeline connection name.
+ *@param index is the index of the pipeline whose connection name to get.
+ *@return the name of the connection.
+ */
+ public String getPipelineConnectionName(int index);
+
+ /** Get a specific pipeline connection specification.
+ *@param index is the index of the pipeline whose specification is needed.
+ *@return the specification for the connection.
+ */
+ public OutputSpecification getPipelineSpecification(int index);
+
/** Set the job type.
*@param type is the type (as an integer).
*/
Modified: manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/HopFilterManager.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/HopFilterManager.java?rev=1598980&r1=1598979&r2=1598980&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/HopFilterManager.java (original)
+++ manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/HopFilterManager.java Sun Jun 1 12:36:39 2014
@@ -147,7 +147,7 @@ public class HopFilterManager extends or
*@param ownerIDList is the list of owner id's.
*@param ownerIDParams is the corresponding set of owner id parameters.
*/
- public void getRows(Map returnValues, String ownerIDList, ArrayList ownerIDParams)
+ public void getRows(Map<Long,JobDescription> returnValues, String ownerIDList, ArrayList ownerIDParams)
throws ManifoldCFException
{
IResultSet set = performQuery("SELECT * FROM "+getTableName()+" WHERE "+ownerIDField+" IN ("+ownerIDList+")",ownerIDParams,
@@ -159,7 +159,7 @@ public class HopFilterManager extends or
Long ownerID = (Long)row.getValue(ownerIDField);
String linkType = (String)row.getValue(linkTypeField);
Long maxHops = (Long)row.getValue(maxHopsField);
- ((JobDescription)returnValues.get(ownerID)).addHopCountFilter(linkType,maxHops);
+ returnValues.get(ownerID).addHopCountFilter(linkType,maxHops);
i++;
}
}
Modified: manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobDescription.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobDescription.java?rev=1598980&r1=1598979&r2=1598980&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobDescription.java (original)
+++ manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobDescription.java Sun Jun 1 12:36:39 2014
@@ -44,6 +44,7 @@ public class JobDescription implements I
protected String description = null;
protected String outputConnectionName = null;
protected String connectionName = null;
+ protected final List<String> pipelineConnectionNames = new ArrayList<String>();
protected int type = TYPE_CONTINUOUS;
protected int startMethod = START_WINDOWBEGIN;
protected int priority = 5;
@@ -72,6 +73,9 @@ public class JobDescription implements I
// Document specification
protected DocumentSpecification documentSpecification = new DocumentSpecification();
+ // Transformation specifications
+ protected final List<OutputSpecification> pipelineSpecifications = new ArrayList<OutputSpecification>();
+
// Hop count filters.
protected HashMap hopCountFilters = new HashMap();
@@ -97,6 +101,10 @@ public class JobDescription implements I
rval.isNew = isNew;
rval.outputConnectionName = outputConnectionName;
rval.connectionName = connectionName;
+ for (String pipelineConnectionName : pipelineConnectionNames)
+ {
+ rval.pipelineConnectionNames.add(pipelineConnectionName);
+ }
rval.description = description;
rval.type = type;
// No direct modification of this object is possible
@@ -128,6 +136,11 @@ public class JobDescription implements I
rval.outputSpecification = outputSpecification.duplicate(readOnly);
// Direct modification of this object is possible - so it also has to know if it is read-only!!
rval.documentSpecification = documentSpecification.duplicate(readOnly);
+ // Duplicate the pipeline specifications
+ for (OutputSpecification pipelineSpecification : pipelineSpecifications)
+ {
+ rval.pipelineSpecifications.add(pipelineSpecification.duplicate(readOnly));
+ }
rval.readOnly = readOnly;
return rval;
}
@@ -242,6 +255,47 @@ public class JobDescription implements I
return connectionName;
}
+ /** Clear pipeline connections */
+ @Override
+ public void clearPipeline()
+ {
+ if (readOnly)
+ throw new IllegalStateException("Attempt to change read-only object");
+ pipelineConnectionNames.clear();
+ pipelineSpecifications.clear();
+ }
+
+ /** Add a pipeline connection */
+ @Override
+ public void addPipelineConnection(String pipelineConnectionName)
+ {
+ if (readOnly)
+ throw new IllegalStateException("Attempt to change read-only object");
+ pipelineConnectionNames.add(pipelineConnectionName);
+ pipelineSpecifications.add(new OutputSpecification());
+ }
+
+ /** Get a count of pipeline connections */
+ @Override
+ public int countPipelineConnections()
+ {
+ return pipelineConnectionNames.size();
+ }
+
+ /** Get a specific pipeline connection name */
+ @Override
+ public String getPipelineConnectionName(int index)
+ {
+ return pipelineConnectionNames.get(index);
+ }
+
+ /** Get a specific pipeline connection specification */
+ @Override
+ public OutputSpecification getPipelineSpecification(int index)
+ {
+ return pipelineSpecifications.get(index);
+ }
+
/** Set the job type.
*@param type is the type (as an integer).
*/
Modified: manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java?rev=1598980&r1=1598979&r2=1598980&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java (original)
+++ manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java Sun Jun 1 12:36:39 2014
@@ -45,6 +45,7 @@ public class JobManager implements IJobM
protected final IDBInterface database;
protected final IOutputConnectionManager outputMgr;
protected final IRepositoryConnectionManager connectionMgr;
+ protected final ITransformationConnectionManager transformationMgr;
protected final IRepositoryConnectorPool repositoryConnectorPool;
protected final ILockManager lockManager;
protected final IThreadContext threadContext;
@@ -73,6 +74,7 @@ public class JobManager implements IJobM
eventManager = new EventManager(database);
outputMgr = OutputConnectionManagerFactory.make(threadContext);
connectionMgr = RepositoryConnectionManagerFactory.make(threadContext);
+ transformationMgr = TransformationConnectionManagerFactory.make(threadContext);
repositoryConnectorPool = RepositoryConnectorPoolFactory.make(threadContext);
lockManager = LockManagerFactory.make(threadContext);
}
@@ -83,7 +85,9 @@ public class JobManager implements IJobM
public void install()
throws ManifoldCFException
{
- jobs.install(outputMgr.getTableName(),outputMgr.getConnectionNameColumn(),connectionMgr.getTableName(),connectionMgr.getConnectionNameColumn());
+ jobs.install(transformationMgr.getTableName(),transformationMgr.getConnectionNameColumn(),
+ outputMgr.getTableName(),outputMgr.getConnectionNameColumn(),
+ connectionMgr.getTableName(),connectionMgr.getConnectionNameColumn());
jobQueue.install(jobs.getTableName(),jobs.idField);
hopCount.install(jobs.getTableName(),jobs.idField);
carryDown.install(jobs.getTableName(),jobs.idField);
Modified: manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/Jobs.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/Jobs.java?rev=1598980&r1=1598979&r2=1598980&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/Jobs.java (original)
+++ manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/Jobs.java Sun Jun 1 12:36:39 2014
@@ -321,15 +321,17 @@ public class Jobs extends org.apache.man
*/
// Local variables
- protected ICacheManager cacheManager;
- protected ScheduleManager scheduleManager;
- protected HopFilterManager hopFilterManager;
- protected ForcedParamManager forcedParamManager;
-
- protected IOutputConnectionManager outputMgr;
- protected IRepositoryConnectionManager connectionMgr;
-
- protected IThreadContext threadContext;
+ protected final ICacheManager cacheManager;
+ protected final ScheduleManager scheduleManager;
+ protected final HopFilterManager hopFilterManager;
+ protected final ForcedParamManager forcedParamManager;
+ protected final PipelineManager pipelineManager;
+
+ protected final IOutputConnectionManager outputMgr;
+ protected final IRepositoryConnectionManager connectionMgr;
+ protected final ITransformationConnectionManager transMgr;
+
+ protected final IThreadContext threadContext;
/** Constructor.
*@param database is the database handle.
@@ -342,16 +344,20 @@ public class Jobs extends org.apache.man
scheduleManager = new ScheduleManager(threadContext,database);
hopFilterManager = new HopFilterManager(threadContext,database);
forcedParamManager = new ForcedParamManager(threadContext,database);
+ pipelineManager = new PipelineManager(threadContext,database);
cacheManager = CacheManagerFactory.make(threadContext);
outputMgr = OutputConnectionManagerFactory.make(threadContext);
connectionMgr = RepositoryConnectionManagerFactory.make(threadContext);
+ transMgr = TransformationConnectionManagerFactory.make(threadContext);
}
/** Install or upgrade this table.
*/
- public void install(String outputTableName, String outputNameField, String connectionTableName, String connectionNameField)
+ public void install(String transTableName, String transNameField,
+ String outputTableName, String outputNameField,
+ String connectionTableName, String connectionNameField)
throws ManifoldCFException
{
// Standard practice: Have a loop around everything, in case upgrade needs it.
@@ -418,6 +424,7 @@ public class Jobs extends org.apache.man
}
// Handle related tables
+ pipelineManager.install(getTableName(),idField,transTableName,transNameField);
scheduleManager.install(getTableName(),idField);
hopFilterManager.install(getTableName(),idField);
forcedParamManager.install(getTableName(),idField);
@@ -480,6 +487,7 @@ public class Jobs extends org.apache.man
forcedParamManager.deinstall();
hopFilterManager.deinstall();
scheduleManager.deinstall();
+ pipelineManager.deinstall();
performDrop(null);
}
catch (ManifoldCFException e)
@@ -891,6 +899,7 @@ public class Jobs extends org.apache.man
query = buildConjunctionClause(params,new ClauseDescription[]{
new UnitaryClause(idField,id)});
performUpdate(values," WHERE "+query,params,null);
+ pipelineManager.deleteRows(id);
scheduleManager.deleteRows(id);
hopFilterManager.deleteRows(id);
forcedParamManager.deleteRows(id);
@@ -907,6 +916,8 @@ public class Jobs extends org.apache.man
performInsert(values,null);
}
+ // Write pipeline rows
+ pipelineManager.writeRows(id,jobDescription);
// Write schedule records
scheduleManager.writeRows(id,jobDescription);
// Write hop filter rows
@@ -3214,14 +3225,12 @@ public class Jobs extends org.apache.man
throws ManifoldCFException
{
// Fetch all the jobs, but only once for each ID. Then, assign each one by id into the final array.
- HashMap uniqueIDs = new HashMap();
- int i = 0;
- while (i < ids.length)
+ Set<Long> uniqueIDs = new HashSet<Long>();
+ for (Long id : ids)
{
- uniqueIDs.put(ids[i],ids[i]);
- i++;
+ uniqueIDs.add(id);
}
- HashMap returnValues = new HashMap();
+ Map<Long,JobDescription> returnValues = new HashMap<Long,JobDescription>();
beginTransaction();
try
{
@@ -3229,8 +3238,7 @@ public class Jobs extends org.apache.man
ArrayList params = new ArrayList();
int j = 0;
int maxIn = getMaxInClause();
- Iterator iter = uniqueIDs.keySet().iterator();
- while (iter.hasNext())
+ for (Long uniqueID : uniqueIDs)
{
if (j == maxIn)
{
@@ -3242,7 +3250,7 @@ public class Jobs extends org.apache.man
if (j > 0)
sb.append(',');
sb.append('?');
- params.add((Long)iter.next());
+ params.add(uniqueID);
j++;
}
if (j > 0)
@@ -3265,15 +3273,13 @@ public class Jobs extends org.apache.man
// Build the return array
JobDescription[] rval = new JobDescription[ids.length];
- i = 0;
- while (i < rval.length)
+ for (int i = 0; i < rval.length; i++)
{
Long id = ids[i];
- JobDescription jd = (JobDescription)returnValues.get(id);
+ JobDescription jd = returnValues.get(id);
if (jd != null)
jd.makeReadOnly();
rval[i] = jd;
- i++;
}
return rval;
}
@@ -3283,7 +3289,7 @@ public class Jobs extends org.apache.man
*@param idList is the list of id's.
*@param params is the set of parameters.
*/
- protected void getJobsChunk(Map returnValues, String idList, ArrayList params)
+ protected void getJobsChunk(Map<Long,JobDescription> returnValues, String idList, ArrayList params)
throws ManifoldCFException
{
try
@@ -3321,6 +3327,7 @@ public class Jobs extends org.apache.man
}
// Fill in schedules for jobs
+ pipelineManager.getRows(returnValues,idList,params);
scheduleManager.getRows(returnValues,idList,params);
hopFilterManager.getRows(returnValues,idList,params);
forcedParamManager.getRows(returnValues,idList,params);
Added: manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/PipelineManager.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/PipelineManager.java?rev=1598980&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/PipelineManager.java (added)
+++ manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/PipelineManager.java Sun Jun 1 12:36:39 2014
@@ -0,0 +1,197 @@
+/* $Id$ */
+
+/**
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.manifoldcf.crawler.jobs;
+
+import org.apache.manifoldcf.core.interfaces.*;
+import org.apache.manifoldcf.agents.interfaces.*;
+import org.apache.manifoldcf.crawler.interfaces.*;
+import java.util.*;
+
+/** This class manages the "pipelines" table, which contains the ordered transformation
+* connections and their specification data.
+*
+* <br><br>
+* <b>pipelines</b>
+* <table border="1" cellpadding="3" cellspacing="0">
+* <tr class="TableHeadingColor">
+* <th>Field</th><th>Type</th><th>Description </th>
+* <tr><td>ownerid</td><td>BIGINT</td><td>Reference:jobs.id</td></tr>
+* <tr><td>ordinal</td><td>BIGINT</td><td></td></tr>
+* <tr><td>transformationname</td><td>VARCHAR(32)</td><td></td></tr>
+* <tr><td>transformationspec</td><td>LONGTEXT</td><td></td></tr>
+* </table>
+* <br><br>
+*
+*/
+public class PipelineManager extends org.apache.manifoldcf.core.database.BaseTable
+{
+ public static final String _rcsid = "@(#)$Id$";
+
+ // Schema
+ public final static String ownerIDField = "ownerid";
+ public final static String ordinalField = "ordinal";
+ public final static String transformationNameField = "transformationname";
+ public final static String transformationSpecField = "transformationspec";
+
+ /** Constructor.
+ *@param threadContext is the thread context.
+ *@param database is the database instance.
+ */
+ public PipelineManager(IThreadContext threadContext, IDBInterface database)
+ throws ManifoldCFException
+ {
+ super(database,"pipelines");
+ }
+
+ /** Install or upgrade.
+ *@param ownerTable is the name of the table that owns this one.
+ *@param owningTablePrimaryKey is the primary key of the owning table.
+ */
+ public void install(String ownerTable, String owningTablePrimaryKey, String transformationTableName, String transformationNameField)
+ throws ManifoldCFException
+ {
+ // Standard practice: Outer loop to support upgrades
+ while (true)
+ {
+ Map existing = getTableSchema(null,null);
+ if (existing == null)
+ {
+ HashMap map = new HashMap();
+ map.put(ownerIDField,new ColumnDescription("BIGINT",false,false,ownerTable,owningTablePrimaryKey,false));
+ map.put(ordinalField,new ColumnDescription("BIGINT",false,false,null,null,false));
+ map.put(transformationNameField,new ColumnDescription("VARCHAR(32)",false,false,transformationTableName,transformationNameField,false));
+ map.put(transformationSpecField,new ColumnDescription("LONGTEXT",false,true,null,null,false));
+ performCreate(map,null);
+ }
+ else
+ {
+ // Upgrade code goes here, if needed.
+ }
+
+ // Index management
+ IndexDescription ownerIndex = new IndexDescription(false,new String[]{ownerIDField});
+
+ // Get rid of indexes that shouldn't be there
+ Map indexes = getTableIndexes(null,null);
+ Iterator iter = indexes.keySet().iterator();
+ while (iter.hasNext())
+ {
+ String indexName = (String)iter.next();
+ IndexDescription id = (IndexDescription)indexes.get(indexName);
+
+ if (ownerIndex != null && id.equals(ownerIndex))
+ ownerIndex = null;
+ else if (indexName.indexOf("_pkey") == -1)
+ // This index shouldn't be here; drop it
+ performRemoveIndex(indexName);
+ }
+
+ // Add the ones we didn't find
+ if (ownerIndex != null)
+ performAddIndex(null,ownerIndex);
+
+ break;
+ }
+ }
+
+ /** Uninstall.
+ */
+ public void deinstall()
+ throws ManifoldCFException
+ {
+ performDrop(null);
+ }
+
+ /** Fill in a set of pipelines corresponding to a set of owner id's.
+ *@param returnValues is a map keyed by ownerID, with value of JobDescription.
+ *@param ownerIDList is the list of owner id's.
+ *@param ownerIDParams is the corresponding set of owner id parameters.
+ */
+ public void getRows(Map<Long,JobDescription> returnValues, String ownerIDList, ArrayList ownerIDParams)
+ throws ManifoldCFException
+ {
+ IResultSet set = performQuery("SELECT * FROM "+getTableName()+" WHERE "+ownerIDField+" IN ("+ownerIDList+") ORDER BY "+ordinalField+" ASC",ownerIDParams,
+ null,null);
+ for (int i = 0; i < set.getRowCount(); i++)
+ {
+ IResultRow row = set.getRow(i);
+ Long ownerID = (Long)row.getValue(ownerIDField);
+ Long ordinal = (Long)row.getValue(ordinalField);
+ String transformationName = (String)row.getValue(transformationNameField);
+ String transformationSpec = (String)row.getValue(transformationSpecField);
+ JobDescription jd = returnValues.get(ownerID);
+ jd.addPipelineConnection(transformationName);
+ jd.getPipelineSpecification((int)ordinal.longValue()).fromXML(transformationSpec);
+ }
+ }
+
+ /** Write a pipeline list into the database.
+ *@param ownerID is the owning identifier.
+ *@param job is the job description that is the source of the pipeline.
+ */
+ public void writeRows(Long ownerID, IJobDescription job)
+ throws ManifoldCFException
+ {
+ beginTransaction();
+ try
+ {
+ HashMap map = new HashMap();
+ for (int i = 0; i < job.countPipelineConnections(); i++)
+ {
+ String pipelineConnectionName = job.getPipelineConnectionName(i);
+ OutputSpecification os = job.getPipelineSpecification(i);
+ map.clear();
+ map.put(ownerIDField,ownerID);
+ map.put(ordinalField,new Long((long)i));
+ map.put(transformationNameField,pipelineConnectionName);
+ map.put(transformationSpecField,os.toXML());
+ performInsert(map,null);
+ i++;
+ }
+ }
+ catch (ManifoldCFException e)
+ {
+ signalRollback();
+ throw e;
+ }
+ catch (Error e)
+ {
+ signalRollback();
+ throw e;
+ }
+ finally
+ {
+ endTransaction();
+ }
+ }
+
+ /** Delete rows.
+ *@param ownerID is the owner whose rows to delete.
+ */
+ public void deleteRows(Long ownerID)
+ throws ManifoldCFException
+ {
+ ArrayList list = new ArrayList();
+ String query = buildConjunctionClause(list,new ClauseDescription[]{
+ new UnitaryClause(ownerIDField,ownerID)});
+
+ performDelete("WHERE "+query,list,null);
+ }
+
+}
Propchange: manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/PipelineManager.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/PipelineManager.java
------------------------------------------------------------------------------
svn:keywords = Id
Modified: manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/ScheduleManager.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/ScheduleManager.java?rev=1598980&r1=1598979&r2=1598980&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/ScheduleManager.java (original)
+++ manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/ScheduleManager.java Sun Jun 1 12:36:39 2014
@@ -164,7 +164,7 @@ public class ScheduleManager extends org
*@param ownerIDList is the list of owner id's.
*@param ownerIDParams is the corresponding set of owner id parameters.
*/
- public void getRows(Map returnValues, String ownerIDList, ArrayList ownerIDParams)
+ public void getRows(Map<Long,JobDescription> returnValues, String ownerIDList, ArrayList ownerIDParams)
throws ManifoldCFException
{
IResultSet set = performQuery("SELECT * FROM "+getTableName()+" WHERE "+ownerIDField+" IN ("+ownerIDList+") ORDER BY "+ordinalField+" ASC",ownerIDParams,
@@ -183,7 +183,7 @@ public class ScheduleManager extends org
(String)row.getValue(timezoneField),
(Long)row.getValue(windowDurationField),
stringToRequestMinimumValue((String)row.getValue(requestMinimumField)));
- ((JobDescription)returnValues.get(ownerID)).addScheduleRecord(sr);
+ returnValues.get(ownerID).addScheduleRecord(sr);
i++;
}
}
Modified: manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java?rev=1598980&r1=1598979&r2=1598980&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java (original)
+++ manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java Sun Jun 1 12:36:39 2014
@@ -650,6 +650,7 @@ public class ManifoldCF extends org.apac
ManifoldCF.getMasterDatabasePassword());
// Also create the following managers, which will handle the actual details of writing configuration data
IOutputConnectionManager outputManager = OutputConnectionManagerFactory.make(threadContext);
+ ITransformationConnectionManager transManager = TransformationConnectionManagerFactory.make(threadContext);
IAuthorityGroupManager groupManager = AuthorityGroupManagerFactory.make(threadContext);
IRepositoryConnectionManager connManager = RepositoryConnectionManagerFactory.make(threadContext);
IMappingConnectionManager mappingManager = MappingConnectionManagerFactory.make(threadContext);
@@ -709,6 +710,11 @@ public class ManifoldCF extends org.apac
// The zipentries must be written in an order that permits their proper restoration. The "lowest level" is thus
// written first, which yields the order: authority connections, repository connections, jobs
+ java.util.zip.ZipEntry transEntry = new java.util.zip.ZipEntry("transformations");
+ zos.putNextEntry(transEntry);
+ transManager.exportConfiguration(zos);
+ zos.closeEntry();
+
java.util.zip.ZipEntry outputEntry = new java.util.zip.ZipEntry("outputs");
zos.putNextEntry(outputEntry);
outputManager.exportConfiguration(zos);
@@ -790,6 +796,7 @@ public class ManifoldCF extends org.apac
ManifoldCF.getMasterDatabasePassword());
// Also create the following managers, which will handle the actual details of reading configuration data
IOutputConnectionManager outputManager = OutputConnectionManagerFactory.make(threadContext);
+ ITransformationConnectionManager transManager = TransformationConnectionManagerFactory.make(threadContext);
IAuthorityGroupManager groupManager = AuthorityGroupManagerFactory.make(threadContext);
IRepositoryConnectionManager connManager = RepositoryConnectionManagerFactory.make(threadContext);
IMappingConnectionManager mappingManager = MappingConnectionManagerFactory.make(threadContext);
@@ -846,7 +853,9 @@ public class ManifoldCF extends org.apac
entries++;
// Get the name of the entry
String name = z.getName();
- if (name.equals("outputs"))
+ if (name.equals("transformations"))
+ transManager.importConfiguration(zis);
+ else if (name.equals("outputs"))
outputManager.importConfiguration(zis);
else if (name.equals("groups"))
groupManager.importConfiguration(zis);
Modified: manifoldcf/branches/CONNECTORS-946/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_en_US.properties
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-946/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_en_US.properties?rev=1598980&r1=1598979&r2=1598980&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-946/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_en_US.properties (original)
+++ manifoldcf/branches/CONNECTORS-946/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_en_US.properties Sun Jun 1 12:36:39 2014
@@ -13,9 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-editoutput.Name=Name
-editoutput.Type=Type
-editoutput.Throttling=Throttling
editconnection.Name=Name
editconnection.Type=Type
editconnection.Throttling=Throttling
@@ -48,6 +45,7 @@ banner.DocumentIngestion=Document Ingest
navigation.LogOut=Log Out
navigation.Outputs=Outputs
+navigation.ListTransformationConnections=List Transformation Connections
navigation.ListOutputConnections=List Output Connections
navigation.Authorities=Authorities
navigation.ListUserMappings=List User Mapping Connections
@@ -69,6 +67,7 @@ navigation.ResultHistogram=Result Histog
navigation.Miscellaneous=Miscellaneous
navigation.Locale=en_US
navigation.Help=Help
+navigation.Listtransformationconnections=List transformation connections
navigation.Listoutputconnections=List output connections
navigation.Listrepositoryconnections=List repository connections
navigation.Listusermappings=List user mapping connections
@@ -98,6 +97,9 @@ listoutputs.AddAnOutputConnection=Add an
listoutputs.uninstalled=(uninstalled)
editoutput.ApacheManifoldCFEditOutputConnection=Apache ManifoldCF: Edit Output Connection
+editoutput.Name=Name
+editoutput.Type=Type
+editoutput.Throttling=Throttling
editoutput.EditAnOutputConnection=Edit an Output Connection
editoutput.EditOutputConnection2=Edit Output Connection
editoutput.ConnectionTypeColon=Connection type:
@@ -113,7 +115,6 @@ editoutput.NameColon=Name:
editoutput.DescriptionColon=Description:
editoutput.ConnectionMustHaveAName=Connection must have a name
editoutput.TheMaximumNumberOfConnectionsMustBeAValidInteger=The maximum number of connections must be a valid integer
-
editoutput.UNREGISTERED=UNREGISTERED
editoutput.tab=tab
@@ -143,6 +144,60 @@ viewoutput.uninstalled=(uninstalled)
viewoutput.Connectorisnotinstalled=Connector is not installed.
viewoutput.Threwexception=Threw exception:
+listtransformations.ApacheManifoldCFListTransformationConnections=Apache ManifoldCF: List Transformation Connections
+listtransformations.ListOfTransformationConnections=List of Transformation Connections
+listtransformations.Name=Name
+listtransformations.Description=Description
+listtransformations.ConnectionType=Connection Type
+listtransformations.Max=Max
+listtransformations.AddaNewTransformationConnection=Add a new transformation connection
+listtransformations.View=View
+listtransformations.Edit=Edit
+listtransformations.Delete=Delete
+listtransformations.DeleteTransformationConnection=Delete transformation connection
+listtransformations.AddATransformationConnection=Add a transformation connection
+listtransformations.uninstalled=(uninstalled)
+
+edittransformation.ApacheManifoldCFEditTransformationConnection=Apache ManifoldCF: Edit Transformation Connection
+edittransformation.Name=Name
+edittransformation.Type=Type
+edittransformation.Throttling=Throttling
+edittransformation.EditATransformationConnection=Edit a Transformation Connection
+edittransformation.EditTransformationConnection2=Edit Transformation Connection
+edittransformation.ConnectionTypeColon=Connection type:
+edittransformation.Continue=Continue
+edittransformation.ContinueToNextPage=Continue to next page
+edittransformation.Cancel=Cancel
+edittransformation.CancelTransformationConnectionEditing=Cancel transformation connection editing
+edittransformation.Save=Save
+edittransformation.SaveThisTransformationConnection=Save this transformation connection
+edittransformation.MaxConnectionsColon=Max connections:
+edittransformation.EditTransformationConnection=Edit transformation connection
+edittransformation.NameColon=Name:
+edittransformation.DescriptionColon=Description:
+edittransformation.ConnectionMustHaveAName=Connection must have a name
+edittransformation.TheMaximumNumberOfConnectionsMustBeAValidInteger=The maximum number of connections must be a valid integer
+edittransformation.UNREGISTERED=UNREGISTERED
+edittransformation.tab=tab
+
+viewtransformation.ApacheManifoldCFViewTransformationConnectionStatus=Apache ManifoldCF: View Transformation Connection Status
+viewtransformation.ViewTransformationConnectionStatus=View Transformation Connection Status
+viewtransformation.NameColon=Name:
+viewtransformation.DescriptionColon=Description:
+viewtransformation.ConnectionTypeColon=Connection type:
+viewtransformation.MaxConnectionsColon=Max connections:
+viewtransformation.ConnectionStatusColon=Connection status:
+viewtransformation.Refresh=Refresh
+viewtransformation.EditThisTransformationConnection=Edit this transformation connection
+viewtransformation.Edit=Edit
+viewtransformation.DeleteThisTransformationConnection=Delete this transformation connection
+viewtransformation.Delete=Delete
+viewtransformation.Deletetransformationconnection=Delete transformation connection
+viewtransformation.qmark=?
+viewtransformation.uninstalled=(uninstalled)
+viewtransformation.Connectorisnotinstalled=Connector is not installed.
+viewtransformation.Threwexception=Threw exception:
+
listgroups.ApacheManifoldCFListAuthorityGroups=Apache ManifoldCF: List Authority Groups
listgroups.DeleteAuthorityGroup=Delete authority group
listgroups.ListOfAuthorityGroups=List of Authority Groups
Modified: manifoldcf/branches/CONNECTORS-946/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_ja_JP.properties
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-946/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_ja_JP.properties?rev=1598980&r1=1598979&r2=1598980&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-946/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_ja_JP.properties (original)
+++ manifoldcf/branches/CONNECTORS-946/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_ja_JP.properties Sun Jun 1 12:36:39 2014
@@ -13,9 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-editoutput.Name=åå
-editoutput.Type=ã¿ã¤ã
-editoutput.Throttling=ã¹ããããªã³ã°
editconnection.Name=åå
editconnection.Type=ã¿ã¤ã
editconnection.Throttling=ã¹ããããªã³ã°
@@ -48,6 +45,7 @@ banner.DocumentIngestion=ã³ã³ã�
navigation.LogOut=ãã°ã¢ã¦ã
navigation.Outputs=åºå
+navigation.ListTransformationConnections=List Transformation Connections
navigation.ListOutputConnections=åºåã³ãã¯ã·ã§ã³ä¸è¦§
navigation.Authorities=権é
navigation.ListUserMappings=ã¦ã¼ã¶ã¼ãããã³ã°ã³ãã¯ã·ã§ã³ä¸è¦§
@@ -70,6 +68,7 @@ navigation.Miscellaneous=ãã®ä�
navigation.Locale=ja_JP
navigation.Help=ãã«ã
navigation.Listrepositoryconnections=ãªãã¸ããªã³ãã¯ã·ã§ã³ä¸è¦§
+navigation.Listtransformationconnections=List transformation connections
navigation.Listoutputconnections=åºåã³ãã¯ã·ã§ã³ä¸è¦§
navigation.Listusermappings=ã¦ã¼ã¶ã¼ãããã³ã°ã³ãã¯ã·ã§ã³ä¸è¦§
navigation.Listauthorities=権éä¸è¦§
@@ -98,6 +97,9 @@ listoutputs.AddAnOutputConnection=åº
listoutputs.uninstalled=ï¼ã¢ã³ã¤ã³ã¹ãã¼ã«ï¼
editoutput.ApacheManifoldCFEditOutputConnection=Apache ManifoldCFï¼åºåã³ãã¯ã·ã§ã³ã®ç·¨é
+editoutput.Name=åå
+editoutput.Type=ã¿ã¤ã
+editoutput.Throttling=ã¹ããããªã³ã°
editoutput.EditAnOutputConnection=åºåã³ãã¯ã·ã§ã³ã®ç·¨é
editoutput.EditOutputConnection2=Eåºåã³ãã¯ã·ã§ã³ãç·¨é
editoutput.ConnectionTypeColon=ã³ãã¯ã·ã§ã³ã¿ã¤ãï¼
@@ -113,7 +115,6 @@ editoutput.NameColon=ååï¼
editoutput.DescriptionColon=説æï¼
editoutput.ConnectionMustHaveAName=ã³ãã¯ã·ã§ã³åãå
¥åãã¦ãã ãã
editoutput.TheMaximumNumberOfConnectionsMustBeAValidInteger=æ大ã³ãã¯ã·ã§ã³æ°ã«ã¯æ´æ°ãå
¥åãã¦ãã ãã
-
editoutput.UNREGISTERED=ã¢ã³ã¤ã³ã¹ãã¼ã«
editoutput.tab=ã¿ã
@@ -143,6 +144,86 @@ viewoutput.uninstalled=ï¼ã¢ã�
viewoutput.Connectorisnotinstalled=ã³ãã¯ã¿ã¼ãã¤ã³ã¹ãã¼ã«ããã¦ãã¾ãã
viewoutput.Threwexception=ä¾å¤ãã¹ãã¼ããã¾ããï¼
+viewoutput.ApacheManifoldCFViewOutputConnectionStatus=Apache ManifoldCF: View Output Connection Status
+viewoutput.ViewOutputConnectionStatus=View Output Connection Status
+viewoutput.NameColon=Name:
+viewoutput.DescriptionColon=Description:
+viewoutput.ConnectionTypeColon=Connection type:
+viewoutput.MaxConnectionsColon=Max connections:
+viewoutput.ConnectionStatusColon=Connection status:
+viewoutput.Refresh=Refresh
+viewoutput.EditThisOutputConnection=Edit this output connection
+viewoutput.Edit=Edit
+viewoutput.DeleteThisOutputConnection=Delete this output connection
+viewoutput.Delete=Delete
+viewoutput.ReIngestAllDocumentsAssociatedWithThisOutputConnection=Re-index all documents associated with this output connection
+viewoutput.ReIngestAllAssociatedDocuments=Re-index all associated documents
+viewoutput.RemoveAllDocumentsAssociatedWithThisOutputConnection=Remove all document output records associated with this output connection
+viewoutput.RemoveAllAssociatedDocuments=Remove all associated records
+viewoutput.Deleteoutputconnection=Delete output connection
+viewoutput.Thiscommandwillforce=This command will force every document associated with output\nconnection
+viewoutput.toberecrawled=to be re-indexed the next time the document is crawled.\nDo you want to continue?
+viewoutput.Thiscommandwillcause=This command will cause ManifoldCF to lose all indexing records for documents\nassociated with output connection
+viewoutput.tobeforgotten=. Do you want to continue?
+viewoutput.qmark=?
+viewoutput.uninstalled=(uninstalled)
+viewoutput.Connectorisnotinstalled=Connector is not installed.
+viewoutput.Threwexception=Threw exception:
+
+listtransformations.ApacheManifoldCFListTransformationConnections=Apache ManifoldCF: List Transformation Connections
+listtransformations.ListOfTransformationConnections=List of Transformation Connections
+listtransformations.Name=Name
+listtransformations.Description=Description
+listtransformations.ConnectionType=Connection Type
+listtransformations.Max=Max
+listtransformations.AddaNewTransformationConnection=Add a new transformation connection
+listtransformations.View=View
+listtransformations.Edit=Edit
+listtransformations.Delete=Delete
+listtransformations.DeleteTransformationConnection=Delete transformation connection
+listtransformations.AddATransformationConnection=Add a transformation connection
+listtransformations.uninstalled=(uninstalled)
+
+edittransformation.ApacheManifoldCFEditTransformationConnection=Apache ManifoldCF: Edit Transformation Connection
+edittransformation.Name=Name
+edittransformation.Type=Type
+edittransformation.Throttling=Throttling
+edittransformation.EditATransformationConnection=Edit a Transformation Connection
+edittransformation.EditTransformationConnection2=Edit Transformation Connection
+edittransformation.ConnectionTypeColon=Connection type:
+edittransformation.Continue=Continue
+edittransformation.ContinueToNextPage=Continue to next page
+edittransformation.Cancel=Cancel
+edittransformation.CancelTransformationConnectionEditing=Cancel transformation connection editing
+edittransformation.Save=Save
+edittransformation.SaveThisTransformationConnection=Save this transformation connection
+edittransformation.MaxConnectionsColon=Max connections:
+edittransformation.EditTransformationConnection=Edit transformation connection
+edittransformation.NameColon=Name:
+edittransformation.DescriptionColon=Description:
+edittransformation.ConnectionMustHaveAName=Connection must have a name
+edittransformation.TheMaximumNumberOfConnectionsMustBeAValidInteger=The maximum number of connections must be a valid integer
+edittransformation.UNREGISTERED=UNREGISTERED
+edittransformation.tab=tab
+
+viewtransformation.ApacheManifoldCFViewTransformationConnectionStatus=Apache ManifoldCF: View Transformation Connection Status
+viewtransformation.ViewTransformationConnectionStatus=View Transformation Connection Status
+viewtransformation.NameColon=Name:
+viewtransformation.DescriptionColon=Description:
+viewtransformation.ConnectionTypeColon=Connection type:
+viewtransformation.MaxConnectionsColon=Max connections:
+viewtransformation.ConnectionStatusColon=Connection status:
+viewtransformation.Refresh=Refresh
+viewtransformation.EditThisTransformationConnection=Edit this transformation connection
+viewtransformation.Edit=Edit
+viewtransformation.DeleteThisTransformationConnection=Delete this transformation connection
+viewtransformation.Delete=Delete
+viewtransformation.Deletetransformationconnection=Delete transformation connection
+viewtransformation.qmark=?
+viewtransformation.uninstalled=(uninstalled)
+viewtransformation.Connectorisnotinstalled=Connector is not installed.
+viewtransformation.Threwexception=Threw exception:
+
listgroups.ApacheManifoldCFListAuthorityGroups=Apache ManifoldCF: 権éã°ã«ã¼ãä¸è¦§
listgroups.DeleteAuthorityGroup=権éã°ã«ã¼ããåé¤
listgroups.ListOfAuthorityGroups=権éã°ã«ã¼ãä¸è¦§