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/03 13:52:14 UTC

svn commit: r1599489 - in /manifoldcf/branches/CONNECTORS-946/framework: crawler-ui/src/main/webapp/ pull-agent/src/main/java/org/apache/manifoldcf/crawler/connectors/ pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/

Author: kwright
Date: Tue Jun  3 11:52:14 2014
New Revision: 1599489

URL: http://svn.apache.org/r1599489
Log:
Add same support for check method naming to repository connectors that output and transformation connectors have

Modified:
    manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/editjob.jsp
    manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/connectors/BaseRepositoryConnector.java
    manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IRepositoryConnector.java

Modified: manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/editjob.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/editjob.jsp?rev=1599489&r1=1599488&r2=1599489&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/editjob.jsp (original)
+++ manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/editjob.jsp Tue Jun  3 11:52:14 2014
@@ -232,7 +232,15 @@
 		}
 	}
 
-	// MHL for repository connection, if ever added
+	if (connection != null)
+	{
+		IRepositoryConnector connector = RepositoryConnectorFactory.getConnectorNoCheck(connection.getClassName());
+		if (connector != null)
+		{
+			checkMethod = connector.getFormCheckJavascriptMethodName(0);
+			saveCheckMethod = connector.getFormPresaveCheckJavascriptMethodName(0);
+		}
+	}
 
 	for (int j = 0; j < transformationConnections.length; j++)
 	{

Modified: manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/connectors/BaseRepositoryConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/connectors/BaseRepositoryConnector.java?rev=1599489&r1=1599488&r2=1599489&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/connectors/BaseRepositoryConnector.java (original)
+++ manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/connectors/BaseRepositoryConnector.java Tue Jun  3 11:52:14 2014
@@ -461,6 +461,24 @@ public abstract class BaseRepositoryConn
   // receives a thread context argument for all UI methods, while the second bunch does not need one (since it has already been applied via the connect()
   // method, above).
 
+  /** Obtain the name of the form check javascript method to call.
+  *@param connectionSequenceNumber is the unique number of this connection within the job.
+  *@return the name of the form check javascript method.
+  */
+  public String getFormCheckJavascriptMethodName(int connectionSequenceNumber)
+  {
+    return "checkSpecification";
+  }
+
+  /** Obtain the name of the form presave check javascript method to call.
+  *@param connectionSequenceNumber is the unique number of this connection within the job.
+  *@return the name of the form presave check javascript method.
+  */
+  public String getFormPresaveCheckJavascriptMethodName(int connectionSequenceNumber)
+  {
+    return "checkSpecificationForSave";
+  }
+
   /** Output the specification header section.
   * This method is called in the head section of a job page which has selected a repository connection of the
   * current type.  Its purpose is to add the required tabs to the list, and to output any javascript methods

Modified: manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IRepositoryConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IRepositoryConnector.java?rev=1599489&r1=1599488&r2=1599489&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IRepositoryConnector.java (original)
+++ manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IRepositoryConnector.java Tue Jun  3 11:52:14 2014
@@ -252,7 +252,19 @@ public interface IRepositoryConnector ex
   // the current connector object is connected, while the second group can.  That is why the first group
   // receives a thread context argument for all UI methods, while the second group does not need one
   // (since it has already been applied via the connect() method).
-    
+
+  /** Obtain the name of the form check javascript method to call.
+  *@param connectionSequenceNumber is the unique number of this connection within the job.
+  *@return the name of the form check javascript method.
+  */
+  public String getFormCheckJavascriptMethodName(int connectionSequenceNumber);
+
+  /** Obtain the name of the form presave check javascript method to call.
+  *@param connectionSequenceNumber is the unique number of this connection within the job.
+  *@return the name of the form presave check javascript method.
+  */
+  public String getFormPresaveCheckJavascriptMethodName(int connectionSequenceNumber);
+
   /** Output the specification header section.
   * This method is called in the head section of a job page which has selected a repository connection of the
   * current type.  Its purpose is to add the required tabs to the list, and to output any javascript methods