manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1625484 - in /manifoldcf/branches/dev_1x: ./ connectors/amazoncloudsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/amazoncloudsearch/ connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/e...
Date Wed, 17 Sep 2014 08:20:58 GMT
Author: kwright
Date: Wed Sep 17 08:20:57 2014
New Revision: 1625484

URL: http://svn.apache.org/r1625484
Log:
Pull up output connector-related changes from CONNECTORS-977 on trunk.

Modified:
    manifoldcf/branches/dev_1x/   (props changed)
    manifoldcf/branches/dev_1x/connectors/amazoncloudsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/amazoncloudsearch/AmazonCloudSearchConnector.java
    manifoldcf/branches/dev_1x/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConnector.java
    manifoldcf/branches/dev_1x/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/agents/output/filesystem/FileOutputConnector.java
    manifoldcf/branches/dev_1x/connectors/gts/connector/src/main/java/org/apache/manifoldcf/agents/output/gts/GTSConnector.java
    manifoldcf/branches/dev_1x/connectors/hdfs/connector/src/main/java/org/apache/manifoldcf/agents/output/hdfs/HDFSOutputConnector.java
    manifoldcf/branches/dev_1x/connectors/nulloutput/connector/src/main/java/org/apache/manifoldcf/agents/output/nullconnector/NullConnector.java
    manifoldcf/branches/dev_1x/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerConnector.java
    manifoldcf/branches/dev_1x/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/SolrConnector.java
    manifoldcf/branches/dev_1x/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/IPipelineConnector.java

Propchange: manifoldcf/branches/dev_1x/
------------------------------------------------------------------------------
  Merged /manifoldcf/trunk:r1621449

Modified: manifoldcf/branches/dev_1x/connectors/amazoncloudsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/amazoncloudsearch/AmazonCloudSearchConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/connectors/amazoncloudsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/amazoncloudsearch/AmazonCloudSearchConnector.java?rev=1625484&r1=1625483&r2=1625484&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/connectors/amazoncloudsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/amazoncloudsearch/AmazonCloudSearchConnector.java
(original)
+++ manifoldcf/branches/dev_1x/connectors/amazoncloudsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/amazoncloudsearch/AmazonCloudSearchConnector.java
Wed Sep 17 08:20:57 2014
@@ -704,24 +704,4 @@ public class AmazonCloudSearchConnector 
         currentTime + 300000L, currentTime + 3 * 60 * 60000L, -1, false);
   }
   
-  /** 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.
-  */
-  @Override
-  public String getFormCheckJavascriptMethodName(int connectionSequenceNumber)
-  {
-    return "s"+connectionSequenceNumber+"_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.
-  */
-  @Override
-  public String getFormPresaveCheckJavascriptMethodName(int connectionSequenceNumber)
-  {
-    return "s"+connectionSequenceNumber+"_checkSpecificationForSave";
-  }
-
 }

Modified: manifoldcf/branches/dev_1x/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConnector.java?rev=1625484&r1=1625483&r2=1625484&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConnector.java
(original)
+++ manifoldcf/branches/dev_1x/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchConnector.java
Wed Sep 17 08:20:57 2014
@@ -261,26 +261,6 @@ public class ElasticSearchConnector exte
     outputResource(EDIT_CONFIG_FORWARD_PARAMETERS, out, locale, config, tabName, null, null);
   }
 
-  /** 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.
-  */
-  @Override
-  public String getFormCheckJavascriptMethodName(int connectionSequenceNumber)
-  {
-    return "s"+connectionSequenceNumber+"_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.
-  */
-  @Override
-  public String getFormPresaveCheckJavascriptMethodName(int connectionSequenceNumber)
-  {
-    return "s"+connectionSequenceNumber+"_checkSpecificationForSave";
-  }
-
   /** Output the specification header section.
   * This method is called in the head section of a job page which has selected a pipeline
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.
@@ -456,10 +436,10 @@ public class ElasticSearchConnector exte
   }
 
   @Override
-  public boolean checkMimeTypeIndexable(String outputDescription,
-      String mimeType) throws ManifoldCFException, ServiceInterruption
+  public boolean checkMimeTypeIndexable(VersionContext outputDescription, String mimeType,
IOutputCheckActivity activities)
+    throws ManifoldCFException, ServiceInterruption
   {
-    ElasticSearchSpecs specs = getSpecsCache(outputDescription);
+    ElasticSearchSpecs specs = getSpecsCache(outputDescription.getVersionString());
     return specs.checkMimeType(mimeType);
   }
 
@@ -504,11 +484,24 @@ public class ElasticSearchConnector exte
     return new String[0];
   }
 
+  /** Add (or replace) a document in the output data store using the connector.
+  * This method presumes that the connector object has been configured, and it is thus able
to communicate with the output data store should that be
+  * necessary.
+  *@param documentURI is the URI of the document.  The URI is presumed to be the unique identifier
which the output data store will use to process
+  * and serve the document.  This URI is constructed by the repository connector which fetches
the document, and is thus universal across all output connectors.
+  *@param pipelineDescription includes the description string that was constructed for this
document by the getOutputDescription() method.
+  *@param document is the document data to be processed (handed to the output data store).
+  *@param authorityNameString is the name of the authority responsible for authorizing any
access tokens passed in with the repository document.  May be null.
+  *@param activities is the handle to an object that the implementer of a pipeline connector
may use to perform operations, such as logging processing activity,
+  * or sending a modified document to the next stage in the pipeline.
+  *@return the document status (accepted or permanently rejected).
+  *@throws IOException only if there's a stream error reading the document data.
+  */
   @Override
-  public int addOrReplaceDocument(String documentURI, String outputDescription,
+  public int addOrReplaceDocumentWithException(String documentURI, VersionContext pipelineDescription,
       RepositoryDocument document, String authorityNameString,
       IOutputAddActivity activities) throws ManifoldCFException,
-      ServiceInterruption
+      ServiceInterruption, IOException
   {
     HttpClient client = getSession();
     ElasticSearchConfig config = getConfigParameters(null);

Modified: manifoldcf/branches/dev_1x/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/agents/output/filesystem/FileOutputConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/agents/output/filesystem/FileOutputConnector.java?rev=1625484&r1=1625483&r2=1625484&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/agents/output/filesystem/FileOutputConnector.java
(original)
+++ manifoldcf/branches/dev_1x/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/agents/output/filesystem/FileOutputConnector.java
Wed Sep 17 08:20:57 2014
@@ -452,26 +452,6 @@ public class FileOutputConnector extends
     activities.recordActivity(null, REMOVE_ACTIVITY, null, documentURI, "OK", null);
   }
 
-  /** 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.
-  */
-  @Override
-  public String getFormCheckJavascriptMethodName(int connectionSequenceNumber)
-  {
-    return "s"+connectionSequenceNumber+"_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.
-  */
-  @Override
-  public String getFormPresaveCheckJavascriptMethodName(int connectionSequenceNumber)
-  {
-    return "s"+connectionSequenceNumber+"_checkSpecificationForSave";
-  }
-
   /** Output the specification header section.
   * This method is called in the head section of a job page which has selected a pipeline
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.

Modified: manifoldcf/branches/dev_1x/connectors/gts/connector/src/main/java/org/apache/manifoldcf/agents/output/gts/GTSConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/connectors/gts/connector/src/main/java/org/apache/manifoldcf/agents/output/gts/GTSConnector.java?rev=1625484&r1=1625483&r2=1625484&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/connectors/gts/connector/src/main/java/org/apache/manifoldcf/agents/output/gts/GTSConnector.java
(original)
+++ manifoldcf/branches/dev_1x/connectors/gts/connector/src/main/java/org/apache/manifoldcf/agents/output/gts/GTSConnector.java
Wed Sep 17 08:20:57 2014
@@ -200,7 +200,7 @@ public class GTSConnector extends org.ap
   *@return true if the mime type is indexable by this connector.
   */
   @Override
-  public boolean checkMimeTypeIndexable(String mimeType)
+  public boolean checkMimeTypeIndexable(VersionContext outputDescription, String mimeType,
IOutputCheckActivity activities)
     throws ManifoldCFException, ServiceInterruption
   {
     return (ingestableMimeTypeMap.get(mimeType) != null);
@@ -213,11 +213,9 @@ public class GTSConnector extends org.ap
   *@return true if the file is indexable.
   */
   @Override
-  public boolean checkDocumentIndexable(File localFile)
+  public boolean checkDocumentIndexable(VersionContext outputDescription, File localFile,
IOutputCheckActivity activities)
     throws ManifoldCFException, ServiceInterruption
   {
-    if (!super.checkDocumentIndexable(localFile))
-      return false;
     int docType = fingerprint(localFile);
     return (docType == DT_TEXT ||
       docType == DT_MSWORD ||
@@ -288,21 +286,22 @@ public class GTSConnector extends org.ap
   /** Add (or replace) a document in the output data store using the connector.
   * This method presumes that the connector object has been configured, and it is thus able
to communicate with the output data store should that be
   * necessary.
-  * The OutputSpecification is *not* provided to this method, because the goal is consistency,
and if output is done it must be consistent with the
-  * output description, since that was what was partly used to determine if output should
be taking place.  So it may be necessary for this method to decode
-  * an output description string in order to determine what should be done.
   *@param documentURI is the URI of the document.  The URI is presumed to be the unique identifier
which the output data store will use to process
   * and serve the document.  This URI is constructed by the repository connector which fetches
the document, and is thus universal across all output connectors.
-  *@param outputDescription is the description string that was constructed for this document
by the getOutputDescription() method.
+  *@param pipelineDescription includes the description string that was constructed for this
document by the getOutputDescription() method.
   *@param document is the document data to be processed (handed to the output data store).
   *@param authorityNameString is the name of the authority responsible for authorizing any
access tokens passed in with the repository document.  May be null.
-  *@param activities is the handle to an object that the implementer of an output connector
may use to perform operations, such as logging processing activity.
+  *@param activities is the handle to an object that the implementer of a pipeline connector
may use to perform operations, such as logging processing activity,
+  * or sending a modified document to the next stage in the pipeline.
   *@return the document status (accepted or permanently rejected).
+  *@throws IOException only if there's a stream error reading the document data.
   */
   @Override
-  public int addOrReplaceDocument(String documentURI, String outputDescription, RepositoryDocument
document, String authorityNameString, IOutputAddActivity activities)
-    throws ManifoldCFException, ServiceInterruption
+  public int addOrReplaceDocumentWithException(String documentURI, VersionContext pipelineDescription,
RepositoryDocument document, String authorityNameString, IOutputAddActivity activities)
+    throws ManifoldCFException, ServiceInterruption, IOException
   {
+    String outputDescription = pipelineDescription.getVersionString();
+	  
     // Establish a session
     getSession();
 
@@ -557,26 +556,6 @@ public class GTSConnector extends org.ap
     );
   }
   
-  /** 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.
-  */
-  @Override
-  public String getFormCheckJavascriptMethodName(int connectionSequenceNumber)
-  {
-    return "s"+connectionSequenceNumber+"_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.
-  */
-  @Override
-  public String getFormPresaveCheckJavascriptMethodName(int connectionSequenceNumber)
-  {
-    return "s"+connectionSequenceNumber+"_checkSpecificationForSave";
-  }
-
   /** Output the specification header section.
   * This method is called in the head section of a job page which has selected a pipeline
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.

Modified: manifoldcf/branches/dev_1x/connectors/hdfs/connector/src/main/java/org/apache/manifoldcf/agents/output/hdfs/HDFSOutputConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/connectors/hdfs/connector/src/main/java/org/apache/manifoldcf/agents/output/hdfs/HDFSOutputConnector.java?rev=1625484&r1=1625483&r2=1625484&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/connectors/hdfs/connector/src/main/java/org/apache/manifoldcf/agents/output/hdfs/HDFSOutputConnector.java
(original)
+++ manifoldcf/branches/dev_1x/connectors/hdfs/connector/src/main/java/org/apache/manifoldcf/agents/output/hdfs/HDFSOutputConnector.java
Wed Sep 17 08:20:57 2014
@@ -256,22 +256,22 @@ public class HDFSOutputConnector extends
   }
 
   /** Add (or replace) a document in the output data store using the connector.
-   * This method presumes that the connector object has been configured, and it is thus able
to communicate with the output data store should that be
-   * necessary.
-   * The OutputSpecification is *not* provided to this method, because the goal is consistency,
and if output is done it must be consistent with the
-   * output description, since that was what was partly used to determine if output should
be taking place.  So it may be necessary for this method to decode
-   * an output description string in order to determine what should be done.
-   *@param documentURI is the URI of the document.  The URI is presumed to be the unique
identifier which the output data store will use to process
-   * and serve the document.  This URI is constructed by the repository connector which fetches
the document, and is thus universal across all output connectors.
-   *@param outputDescription is the description string that was constructed for this document
by the getOutputDescription() method.
-   *@param document is the document data to be processed (handed to the output data store).
-   *@param authorityNameString is the name of the authority responsible for authorizing any
access tokens passed in with the repository document.  May be null.
-   *@param activities is the handle to an object that the implementer of an output connector
may use to perform operations, such as logging processing activity.
-   *@return the document status (accepted or permanently rejected).
-   */
+  * This method presumes that the connector object has been configured, and it is thus able
to communicate with the output data store should that be
+  * necessary.
+  *@param documentURI is the URI of the document.  The URI is presumed to be the unique identifier
which the output data store will use to process
+  * and serve the document.  This URI is constructed by the repository connector which fetches
the document, and is thus universal across all output connectors.
+  *@param pipelineDescription includes the description string that was constructed for this
document by the getOutputDescription() method.
+  *@param document is the document data to be processed (handed to the output data store).
+  *@param authorityNameString is the name of the authority responsible for authorizing any
access tokens passed in with the repository document.  May be null.
+  *@param activities is the handle to an object that the implementer of a pipeline connector
may use to perform operations, such as logging processing activity,
+  * or sending a modified document to the next stage in the pipeline.
+  *@return the document status (accepted or permanently rejected).
+  *@throws IOException only if there's a stream error reading the document data.
+  */
   @Override
-  public int addOrReplaceDocument(String documentURI, String outputDescription, RepositoryDocument
document, String authorityNameString, IOutputAddActivity activities) throws ManifoldCFException,
ServiceInterruption {
-
+  public int addOrReplaceDocumentWithException(String documentURI, VersionContext pipelineDescription,
RepositoryDocument document, String authorityNameString, IOutputAddActivity activities)
+    throws ManifoldCFException, ServiceInterruption, IOException {
+    String outputDescription = pipelineDescription.getVersionString();
     try {
       HDFSOutputSpecs specs = new HDFSOutputSpecs(outputDescription);
 
@@ -391,26 +391,6 @@ public class HDFSOutputConnector extends
     outputResource(VIEW_CONFIGURATION_HTML, out, locale, getConfigParameters(parameters),
null, null, null);
   }
 
-  /** 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.
-  */
-  @Override
-  public String getFormCheckJavascriptMethodName(int connectionSequenceNumber)
-  {
-    return "s"+connectionSequenceNumber+"_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.
-  */
-  @Override
-  public String getFormPresaveCheckJavascriptMethodName(int connectionSequenceNumber)
-  {
-    return "s"+connectionSequenceNumber+"_checkSpecificationForSave";
-  }
-
   /** Output the specification header section.
   * This method is called in the head section of a job page which has selected a pipeline
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.

Modified: manifoldcf/branches/dev_1x/connectors/nulloutput/connector/src/main/java/org/apache/manifoldcf/agents/output/nullconnector/NullConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/connectors/nulloutput/connector/src/main/java/org/apache/manifoldcf/agents/output/nullconnector/NullConnector.java?rev=1625484&r1=1625483&r2=1625484&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/connectors/nulloutput/connector/src/main/java/org/apache/manifoldcf/agents/output/nullconnector/NullConnector.java
(original)
+++ manifoldcf/branches/dev_1x/connectors/nulloutput/connector/src/main/java/org/apache/manifoldcf/agents/output/nullconnector/NullConnector.java
Wed Sep 17 08:20:57 2014
@@ -168,24 +168,4 @@ public class NullConnector extends org.a
     activities.recordActivity(null,JOB_COMPLETE_ACTIVITY,null,"","OK",null);
   }
 
-  /** 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.
-  */
-  @Override
-  public String getFormCheckJavascriptMethodName(int connectionSequenceNumber)
-  {
-    return "s"+connectionSequenceNumber+"_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.
-  */
-  @Override
-  public String getFormPresaveCheckJavascriptMethodName(int connectionSequenceNumber)
-  {
-    return "s"+connectionSequenceNumber+"_checkSpecificationForSave";
-  }
-
 }

Modified: manifoldcf/branches/dev_1x/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerConnector.java?rev=1625484&r1=1625483&r2=1625484&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerConnector.java
(original)
+++ manifoldcf/branches/dev_1x/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerConnector.java
Wed Sep 17 08:20:57 2014
@@ -37,6 +37,7 @@ import org.apache.http.protocol.HttpRequ
 import org.apache.manifoldcf.agents.interfaces.IOutputAddActivity;
 import org.apache.manifoldcf.agents.interfaces.IOutputNotifyActivity;
 import org.apache.manifoldcf.agents.interfaces.IOutputRemoveActivity;
+import org.apache.manifoldcf.agents.interfaces.IOutputCheckActivity;
 import org.apache.manifoldcf.agents.interfaces.RepositoryDocument;
 import org.apache.manifoldcf.agents.interfaces.ServiceInterruption;
 import org.apache.manifoldcf.agents.output.BaseOutputConnector;
@@ -260,31 +261,6 @@ public class OpenSearchServerConnector e
   }
 
   /**
-  * 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.
-  */
-  @Override
-  public String getFormCheckJavascriptMethodName(int connectionSequenceNumber)
-  {
-    return "s" + connectionSequenceNumber + "_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.
-  */
-  @Override
-  public String getFormPresaveCheckJavascriptMethodName(
-      int connectionSequenceNumber)
-  {
-    return "s" + connectionSequenceNumber + "_checkSpecificationForSave";
-  }
-
-  /**
   * Output the specification header section. This method is called in the head
   * section of a job page which has selected a pipeline connection of the
   * current type. Its purpose is to add the required tabs to the list, and to
@@ -431,29 +407,21 @@ public class OpenSearchServerConnector e
   }
 
   @Override
-  public boolean checkLengthIndexable(String outputDescription, long length)
+  public boolean checkLengthIndexable(VersionContext outputDescription, long length, IOutputCheckActivity
activities)
       throws ManifoldCFException, ServiceInterruption
   {
-    OpenSearchServerSpecs specs = getSpecsCache(outputDescription);
+    OpenSearchServerSpecs specs = getSpecsCache(outputDescription.getVersionString());
     long maxFileSize = specs.getMaxFileSize();
     if (length > maxFileSize)
       return false;
-    return super.checkLengthIndexable(outputDescription, length);
-  }
-
-  @Override
-  public boolean checkDocumentIndexable(String outputDescription, File localFile)
-      throws ManifoldCFException, ServiceInterruption
-  {
     return true;
   }
 
   @Override
-  public boolean checkMimeTypeIndexable(String outputDescription,
-      String mimeType)
+  public boolean checkMimeTypeIndexable(VersionContext outputDescription, String mimeType,
IOutputCheckActivity activities)
       throws ManifoldCFException, ServiceInterruption
   {
-    OpenSearchServerSpecs specs = getSpecsCache(outputDescription);
+    OpenSearchServerSpecs specs = getSpecsCache(outputDescription.getVersionString());
     return specs.checkMimeType(mimeType);
   }
 
@@ -469,10 +437,10 @@ public class OpenSearchServerConnector e
    * @return true if the file is indexable.
    */
   @Override
-  public boolean checkURLIndexable(String outputDescription, String url)
+  public boolean checkURLIndexable(VersionContext outputDescription, String url, IOutputCheckActivity
activities)
       throws ManifoldCFException, ServiceInterruption
   {
-    OpenSearchServerSpecs specs = getSpecsCache(outputDescription);
+    OpenSearchServerSpecs specs = getSpecsCache(outputDescription.getVersionString());
     return specs.checkExtension(FilenameUtils.getExtension(url));
   }
 
@@ -550,11 +518,24 @@ public class OpenSearchServerConnector e
     }
   }
 
+  /** Add (or replace) a document in the output data store using the connector.
+  * This method presumes that the connector object has been configured, and it is thus able
to communicate with the output data store should that be
+  * necessary.
+  *@param documentURI is the URI of the document.  The URI is presumed to be the unique identifier
which the output data store will use to process
+  * and serve the document.  This URI is constructed by the repository connector which fetches
the document, and is thus universal across all output connectors.
+  *@param pipelineDescription includes the description string that was constructed for this
document by the getOutputDescription() method.
+  *@param document is the document data to be processed (handed to the output data store).
+  *@param authorityNameString is the name of the authority responsible for authorizing any
access tokens passed in with the repository document.  May be null.
+  *@param activities is the handle to an object that the implementer of a pipeline connector
may use to perform operations, such as logging processing activity,
+  * or sending a modified document to the next stage in the pipeline.
+  *@return the document status (accepted or permanently rejected).
+  *@throws IOException only if there's a stream error reading the document data.
+  */
   @Override
-  public int addOrReplaceDocument(String documentURI, String outputDescription,
+  public int addOrReplaceDocumentWithException(String documentURI, VersionContext pipelineDescription,
       RepositoryDocument document, String authorityNameString,
       IOutputAddActivity activities)
-      throws ManifoldCFException, ServiceInterruption
+      throws ManifoldCFException, ServiceInterruption, IOException
   {
     HttpClient client = getSession();
     OpenSearchServerConfig config = getConfigParameters(null);

Modified: manifoldcf/branches/dev_1x/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/SolrConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/SolrConnector.java?rev=1625484&r1=1625483&r2=1625484&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/SolrConnector.java
(original)
+++ manifoldcf/branches/dev_1x/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/SolrConnector.java
Wed Sep 17 08:20:57 2014
@@ -31,6 +31,7 @@ import java.util.HashSet;
 import org.apache.manifoldcf.agents.interfaces.IOutputAddActivity;
 import org.apache.manifoldcf.agents.interfaces.IOutputNotifyActivity;
 import org.apache.manifoldcf.agents.interfaces.IOutputRemoveActivity;
+import org.apache.manifoldcf.agents.interfaces.IOutputCheckActivity;
 import org.apache.manifoldcf.agents.interfaces.RepositoryDocument;
 import org.apache.manifoldcf.agents.interfaces.ServiceInterruption;
 import org.apache.manifoldcf.core.interfaces.Specification;
@@ -516,7 +517,7 @@ public class SolrConnector extends org.a
   *@return true if the mime type is indexable by this connector.
   */
   @Override
-  public boolean checkMimeTypeIndexable(String outputDescription, String mimeType)
+  public boolean checkMimeTypeIndexable(VersionContext outputDescription, String mimeType,
IOutputCheckActivity activities)
     throws ManifoldCFException, ServiceInterruption
   {
     getSession();
@@ -526,7 +527,7 @@ public class SolrConnector extends org.a
         return false;
       if (excludedMimeTypes != null && excludedMimeTypes.get(mimeType) != null)
         return false;
-      return super.checkMimeTypeIndexable(outputDescription,mimeType);
+      return true;
     }
     return acceptableMimeTypes.contains(mimeType.toLowerCase(Locale.ROOT));
   }
@@ -538,34 +539,33 @@ public class SolrConnector extends org.a
   *@return true if the file is indexable.
   */
   @Override
-  public boolean checkLengthIndexable(String outputDescription, long length)
+  public boolean checkLengthIndexable(VersionContext outputDescription, long length, IOutputCheckActivity
activities)
     throws ManifoldCFException, ServiceInterruption
   {
     getSession();
     if (maxDocumentLength != null && length > maxDocumentLength.longValue())
       return false;
-    return super.checkLengthIndexable(outputDescription,length);
+    return true;
   }
 
   /** Add (or replace) a document in the output data store using the connector.
   * This method presumes that the connector object has been configured, and it is thus able
to communicate with the output data store should that be
   * necessary.
-  * The OutputSpecification is *not* provided to this method, because the goal is consistency,
and if output is done it must be consistent with the
-  * output description, since that was what was partly used to determine if output should
be taking place.  So it may be necessary for this method to decode
-  * an output description string in order to determine what should be done.
   *@param documentURI is the URI of the document.  The URI is presumed to be the unique identifier
which the output data store will use to process
   * and serve the document.  This URI is constructed by the repository connector which fetches
the document, and is thus universal across all output connectors.
-  *@param outputDescription is the description string that was constructed for this document
by the getOutputDescription() method.
+  *@param pipelineDescription includes the description string that was constructed for this
document by the getOutputDescription() method.
   *@param document is the document data to be processed (handed to the output data store).
   *@param authorityNameString is the name of the authority responsible for authorizing any
access tokens passed in with the repository document.  May be null.
-  *@param activities is the handle to an object that the implementer of an output connector
may use to perform operations, such as logging processing activity.
+  *@param activities is the handle to an object that the implementer of a pipeline connector
may use to perform operations, such as logging processing activity,
+  * or sending a modified document to the next stage in the pipeline.
   *@return the document status (accepted or permanently rejected).
+  *@throws IOException only if there's a stream error reading the document data.
   */
   @Override
-  public int addOrReplaceDocument(String documentURI, String outputDescription, RepositoryDocument
document, String authorityNameString, IOutputAddActivity activities)
-    throws ManifoldCFException, ServiceInterruption
+  public int addOrReplaceDocumentWithException(String documentURI, VersionContext pipelineDescription,
RepositoryDocument document, String authorityNameString, IOutputAddActivity activities)
+    throws ManifoldCFException, ServiceInterruption, IOException
   {
-    SpecPacker sp = new SpecPacker(outputDescription);
+    SpecPacker sp = new SpecPacker(pipelineDescription.getVersionString());
 
     // Establish a session
     getSession();
@@ -2177,26 +2177,6 @@ public class SolrConnector extends org.a
     );
   }
   
-  /** 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.
-  */
-  @Override
-  public String getFormCheckJavascriptMethodName(int connectionSequenceNumber)
-  {
-    return "s"+connectionSequenceNumber+"_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.
-  */
-  @Override
-  public String getFormPresaveCheckJavascriptMethodName(int connectionSequenceNumber)
-  {
-    return "s"+connectionSequenceNumber+"_checkSpecificationForSave";
-  }
-
   /** Output the specification header section.
   * This method is called in the head section of a job page which has selected a pipeline
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.

Modified: manifoldcf/branches/dev_1x/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/IPipelineConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/IPipelineConnector.java?rev=1625484&r1=1625483&r2=1625484&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/IPipelineConnector.java
(original)
+++ manifoldcf/branches/dev_1x/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/IPipelineConnector.java
Wed Sep 17 08:20:57 2014
@@ -101,12 +101,9 @@ public interface IPipelineConnector exte
   /** Add (or replace) a document in the output data store using the connector.
   * This method presumes that the connector object has been configured, and it is thus able
to communicate with the output data store should that be
   * necessary.
-  * The OutputSpecification is *not* provided to this method, because the goal is consistency,
and if output is done it must be consistent with the
-  * output description, since that was what was partly used to determine if output should
be taking place.  So it may be necessary for this method to decode
-  * an output description string in order to determine what should be done.
   *@param documentURI is the URI of the document.  The URI is presumed to be the unique identifier
which the output data store will use to process
   * and serve the document.  This URI is constructed by the repository connector which fetches
the document, and is thus universal across all output connectors.
-  *@param outputDescription is the description string that was constructed for this document
by the getOutputDescription() method.
+  *@param pipelineDescription includes the description string that was constructed for this
document by the getOutputDescription() method.
   *@param document is the document data to be processed (handed to the output data store).
   *@param authorityNameString is the name of the authority responsible for authorizing any
access tokens passed in with the repository document.  May be null.
   *@param activities is the handle to an object that the implementer of a pipeline connector
may use to perform operations, such as logging processing activity,



Mime
View raw message