manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1598185 - in /manifoldcf/branches/CONNECTORS-946/framework: agents/src/main/java/org/apache/manifoldcf/agents/interfaces/ agents/src/main/java/org/apache/manifoldcf/agents/output/ crawler-ui/src/main/webapp/
Date Thu, 29 May 2014 00:37:19 GMT
Author: kwright
Date: Thu May 29 00:37:19 2014
New Revision: 1598185

URL: http://svn.apache.org/r1598185
Log:
Convert IOutputConnector specification methods to take sequence numbers

Modified:
    manifoldcf/branches/CONNECTORS-946/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/IOutputConnector.java
    manifoldcf/branches/CONNECTORS-946/framework/agents/src/main/java/org/apache/manifoldcf/agents/output/BaseOutputConnector.java
    manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/editjob.jsp
    manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/execute.jsp
    manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/viewjob.jsp

Modified: manifoldcf/branches/CONNECTORS-946/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/IOutputConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-946/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/IOutputConnector.java?rev=1598185&r1=1598184&r2=1598185&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-946/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/IOutputConnector.java
(original)
+++ manifoldcf/branches/CONNECTORS-946/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/IOutputConnector.java
Thu May 29 00:37:19 2014
@@ -182,9 +182,11 @@ public interface IOutputConnector extend
   *@param out is the output to which any HTML should be sent.
   *@param locale is the preferred local of the output.
   *@param os is the current output specification for this job.
+  *@param connectionSequenceNumber is the unique number of this connection within the job.
   *@param tabsArray is an array of tab names.  Add to this array any tab names that are specific
to the connector.
   */
-  public void outputSpecificationHeader(IHTTPOutput out, Locale locale, OutputSpecification
os, List<String> tabsArray)
+  public void outputSpecificationHeader(IHTTPOutput out, Locale locale, OutputSpecification
os,
+    int connectionSequenceNumber, List<String> tabsArray)
     throws ManifoldCFException, IOException;
   
   /** Output the specification body section.
@@ -194,9 +196,12 @@ public interface IOutputConnector extend
   *@param out is the output to which any HTML should be sent.
   *@param locale is the preferred local of the output.
   *@param os is the current output specification for this job.
+  *@param connectionSequenceNumber is the unique number of this connection within the job.
+  *@param actualSequenceNumber is the connection within the job that has currently been selected.
   *@param tabName is the current tab name.
   */
-  public void outputSpecificationBody(IHTTPOutput out, Locale locale, OutputSpecification
os, String tabName)
+  public void outputSpecificationBody(IHTTPOutput out, Locale locale, OutputSpecification
os,
+    int connectionSequenceNumber, int actualSequenceNumber, String tabName)
     throws ManifoldCFException, IOException;
   
   /** Process a specification post.
@@ -206,9 +211,11 @@ public interface IOutputConnector extend
   *@param variableContext contains the post data, including binary file-upload information.
   *@param locale is the preferred local of the output.
   *@param os is the current output specification for this job.
+  *@param connectionSequenceNumber is the unique number of this connection within the job.
   *@return null if all is well, or a string error message if there is an error that should
prevent saving of the job (and cause a redirection to an error page).
   */
-  public String processSpecificationPost(IPostParameters variableContext, Locale locale,
OutputSpecification os)
+  public String processSpecificationPost(IPostParameters variableContext, Locale locale,
OutputSpecification os,
+    int connectionSequenceNumber)
     throws ManifoldCFException;
   
   /** View specification.
@@ -216,9 +223,11 @@ public interface IOutputConnector extend
   * The coder can presume that the HTML that is output from this configuration will be within
appropriate <html> and <body> tags.
   *@param out is the output to which any HTML should be sent.
   *@param locale is the preferred local of the output.
+  *@param connectionSequenceNumber is the unique number of this connection within the job.
   *@param os is the current output specification for this job.
   */
-  public void viewSpecification(IHTTPOutput out, Locale locale, OutputSpecification os)
+  public void viewSpecification(IHTTPOutput out, Locale locale, OutputSpecification os,
+    int connectionSequenceNumber)
     throws ManifoldCFException, IOException;
   
 }

Modified: manifoldcf/branches/CONNECTORS-946/framework/agents/src/main/java/org/apache/manifoldcf/agents/output/BaseOutputConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-946/framework/agents/src/main/java/org/apache/manifoldcf/agents/output/BaseOutputConnector.java?rev=1598185&r1=1598184&r2=1598185&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-946/framework/agents/src/main/java/org/apache/manifoldcf/agents/output/BaseOutputConnector.java
(original)
+++ manifoldcf/branches/CONNECTORS-946/framework/agents/src/main/java/org/apache/manifoldcf/agents/output/BaseOutputConnector.java
Thu May 29 00:37:19 2014
@@ -228,16 +228,32 @@ public abstract class BaseOutputConnecto
   // in that the first bunch cannot assume that the current connector object is connected,
while the second bunch can.  That is why the first bunch
   // 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).
-    
-   /** Output the specification header section.
+
+  /** Output the specification header section.
   * This method is called in the head section of a job page which has selected an output
connection of the current type.  Its purpose is to add the required tabs
   * to the list, and to output any javascript methods that might be needed by the job editing
HTML.
   *@param out is the output to which any HTML should be sent.
   *@param locale is the preferred local of the output.
   *@param os is the current output specification for this job.
+  *@param connectionSequenceNumber is the unique number of this connection within the job.
   *@param tabsArray is an array of tab names.  Add to this array any tab names that are specific
to the connector.
   */
   @Override
+  public void outputSpecificationHeader(IHTTPOutput out, Locale locale, OutputSpecification
os,
+    int connectionSequenceNumber, List<String> tabsArray)
+    throws ManifoldCFException, IOException
+  {
+    outputSpecificationHeader(out,locale,os,tabsArray);
+  }
+
+  /** Output the specification header section.
+  * This method is called in the head section of a job page which has selected an output
connection of the current type.  Its purpose is to add the required tabs
+  * to the list, and to output any javascript methods that might be needed by the job editing
HTML.
+  *@param out is the output to which any HTML should be sent.
+  *@param locale is the preferred local of the output.
+  *@param os is the current output specification for this job.
+  *@param tabsArray is an array of tab names.  Add to this array any tab names that are specific
to the connector.
+  */
   public void outputSpecificationHeader(IHTTPOutput out, Locale locale, OutputSpecification
os, List<String> tabsArray)
     throws ManifoldCFException, IOException
   {
@@ -275,9 +291,27 @@ public abstract class BaseOutputConnecto
   *@param out is the output to which any HTML should be sent.
   *@param locale is the preferred local of the output.
   *@param os is the current output specification for this job.
+  *@param connectionSequenceNumber is the unique number of this connection within the job.
+  *@param actualSequenceNumber is the connection within the job that has currently been selected.
   *@param tabName is the current tab name.
   */
   @Override
+  public void outputSpecificationBody(IHTTPOutput out, Locale locale, OutputSpecification
os,
+    int connectionSequenceNumber, int actualSequenceNumber, String tabName)
+    throws ManifoldCFException, IOException
+  {
+    outputSpecificationBody(out,locale,os,tabName);
+  }
+
+  /** Output the specification body section.
+  * This method is called in the body section of a job page which has selected an output
connection of the current type.  Its purpose is to present the required form elements for
editing.
+  * The coder can presume that the HTML that is output from this configuration will be within
appropriate <html>, <body>, and <form> tags.  The name of the
+  * form is "editjob".
+  *@param out is the output to which any HTML should be sent.
+  *@param locale is the preferred local of the output.
+  *@param os is the current output specification for this job.
+  *@param tabName is the current tab name.
+  */
   public void outputSpecificationBody(IHTTPOutput out, Locale locale, OutputSpecification
os, String tabName)
     throws ManifoldCFException, IOException
   {
@@ -304,9 +338,26 @@ public abstract class BaseOutputConnecto
   *@param variableContext contains the post data, including binary file-upload information.
   *@param locale is the preferred local of the output.
   *@param os is the current output specification for this job.
+  *@param connectionSequenceNumber is the unique number of this connection within the job.
   *@return null if all is well, or a string error message if there is an error that should
prevent saving of the job (and cause a redirection to an error page).
   */
   @Override
+  public String processSpecificationPost(IPostParameters variableContext, Locale locale,
OutputSpecification os,
+    int connectionSequenceNumber)
+    throws ManifoldCFException
+  {
+    return processSpecificationPost(variableContext,locale,os);
+  }
+
+  /** Process a specification post.
+  * This method is called at the start of job's edit or view page, whenever there is a possibility
that form data for a connection has been
+  * posted.  Its purpose is to gather form information and modify the output specification
accordingly.
+  * The name of the posted form is "editjob".
+  *@param variableContext contains the post data, including binary file-upload information.
+  *@param locale is the preferred local of the output.
+  *@param os is the current output specification for this job.
+  *@return null if all is well, or a string error message if there is an error that should
prevent saving of the job (and cause a redirection to an error page).
+  */
   public String processSpecificationPost(IPostParameters variableContext, Locale locale,
OutputSpecification os)
     throws ManifoldCFException
   {
@@ -332,9 +383,24 @@ public abstract class BaseOutputConnecto
   * The coder can presume that the HTML that is output from this configuration will be within
appropriate <html> and <body> tags.
   *@param out is the output to which any HTML should be sent.
   *@param locale is the preferred local of the output.
+  *@param connectionSequenceNumber is the unique number of this connection within the job.
   *@param os is the current output specification for this job.
   */
   @Override
+  public void viewSpecification(IHTTPOutput out, Locale locale, OutputSpecification os,
+    int connectionSequenceNumber)
+    throws ManifoldCFException, IOException
+  {
+    viewSpecification(out,locale,os);
+  }
+
+  /** View specification.
+  * This method is called in the body section of a job's view page.  Its purpose is to present
the output specification information to the user.
+  * The coder can presume that the HTML that is output from this configuration will be within
appropriate <html> and <body> tags.
+  *@param out is the output to which any HTML should be sent.
+  *@param locale is the preferred local of the output.
+  *@param os is the current output specification for this job.
+  */
   public void viewSpecification(IHTTPOutput out, Locale locale, OutputSpecification os)
     throws ManifoldCFException, IOException
   {

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=1598185&r1=1598184&r2=1598185&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 Thu
May 29 00:37:19 2014
@@ -155,7 +155,7 @@
 
 	int model = IRepositoryConnector.MODEL_ADD_CHANGE_DELETE;
 	String[] relationshipTypes = null;
-	ArrayList tabsArray = new ArrayList();
+	List<String> tabsArray = new ArrayList<String>();
 	List<Integer> sequenceArray = new ArrayList<Integer>();
 	
 	IRepositoryConnection connection = null;
@@ -474,7 +474,7 @@
 		{
 			try
 			{
-				outputConnector.outputSpecificationHeader(new org.apache.manifoldcf.ui.jsp.JspWrapper(out,adminprofile),pageContext.getRequest().getLocale(),outputSpecification,tabsArray);
+				outputConnector.outputSpecificationHeader(new org.apache.manifoldcf.ui.jsp.JspWrapper(out,adminprofile),pageContext.getRequest().getLocale(),outputSpecification,1,tabsArray);
 			}
 			finally
 			{
@@ -1366,7 +1366,7 @@
 		{
 			try
 			{
-				outputConnector.outputSpecificationBody(new org.apache.manifoldcf.ui.jsp.JspWrapper(out,adminprofile),pageContext.getRequest().getLocale(),outputSpecification,tabName);
+				outputConnector.outputSpecificationBody(new org.apache.manifoldcf.ui.jsp.JspWrapper(out,adminprofile),pageContext.getRequest().getLocale(),outputSpecification,1,tabSequenceInt,tabName);
 			}
 			finally
 			{

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=1598185&r1=1598184&r2=1598185&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 Thu
May 29 00:37:19 2014
@@ -1066,7 +1066,7 @@
 						{
 							try
 							{
-								String error = outputConnector.processSpecificationPost(variableContext,pageContext.getRequest().getLocale(),job.getOutputSpecification());
+								String error = outputConnector.processSpecificationPost(variableContext,pageContext.getRequest().getLocale(),job.getOutputSpecification(),1);
 								if (error != null)
 								{
 									variableContext.setParameter("text",error);

Modified: manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/viewjob.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/viewjob.jsp?rev=1598185&r1=1598184&r2=1598185&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/viewjob.jsp (original)
+++ manifoldcf/branches/CONNECTORS-946/framework/crawler-ui/src/main/webapp/viewjob.jsp Thu
May 29 00:37:19 2014
@@ -657,7 +657,7 @@
 			{
 				try
 				{
-					outputConnector.viewSpecification(new org.apache.manifoldcf.ui.jsp.JspWrapper(out,adminprofile),pageContext.getRequest().getLocale(),job.getOutputSpecification());
+					outputConnector.viewSpecification(new org.apache.manifoldcf.ui.jsp.JspWrapper(out,adminprofile),pageContext.getRequest().getLocale(),job.getOutputSpecification(),1);
 				}
 				finally
 				{



Mime
View raw message