manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1627002 - in /manifoldcf/trunk/connectors/opensearchserver/connector/src: main/java/org/apache/manifoldcf/agents/output/opensearchserver/ main/resources/org/apache/manifoldcf/agents/output/opensearchserver/ test/java/org/apache/manifoldcf/...
Date Tue, 23 Sep 2014 13:13:04 GMT
Author: kwright
Date: Tue Sep 23 13:13:04 2014
New Revision: 1627002

URL: http://svn.apache.org/r1627002
Log:
Update OpenSearchServer to remove filtering capability.  Part of CONNECTORS-982.

Removed:
    manifoldcf/trunk/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerSpecs.java
    manifoldcf/trunk/connectors/opensearchserver/connector/src/main/resources/org/apache/manifoldcf/agents/output/opensearchserver/editSpecification.html
    manifoldcf/trunk/connectors/opensearchserver/connector/src/main/resources/org/apache/manifoldcf/agents/output/opensearchserver/editSpecification.js
    manifoldcf/trunk/connectors/opensearchserver/connector/src/main/resources/org/apache/manifoldcf/agents/output/opensearchserver/viewSpecification.html
Modified:
    manifoldcf/trunk/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerConnector.java
    manifoldcf/trunk/connectors/opensearchserver/connector/src/test/java/org/apache/manifoldcf/agents/output/opensearchserver/tests/NavigationDerbyUI.java

Modified: manifoldcf/trunk/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerConnector.java?rev=1627002&r1=1627001&r2=1627002&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerConnector.java
(original)
+++ manifoldcf/trunk/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerConnector.java
Tue Sep 23 13:13:04 2014
@@ -82,15 +82,6 @@ public class OpenSearchServerConnector e
   /** Forward to the javascript to check the configuration parameters */
   private static final String EDIT_CONFIG_HEADER_FORWARD = "editConfiguration.js";
 
-  /** Forward to the template to view the specification parameters for the job */
-  private static final String VIEW_SPEC_FORWARD = "viewSpecification.html";
-
-  /** Forward to the template to edit the configuration parameters for the job */
-  private static final String EDIT_SPEC_FORWARD = "editSpecification.html";
-
-  /** Forward to the javascript to check the specification parameters for the job */
-  private static final String EDIT_SPEC_HEADER_FORWARD = "editSpecification.js";
-
   /** Connection expiration interval */
   private static final long EXPIRATION_INTERVAL = 60000L;
 
@@ -254,103 +245,6 @@ public class OpenSearchServerConnector e
   }
 
   /**
-  * 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.
-  *
-  * @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 pipeline specification for this connection.
-  * @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,
-      Specification os, int connectionSequenceNumber, List<String> tabsArray)
-      throws ManifoldCFException, IOException
-  {
-    super.outputSpecificationHeader(out, locale, os, connectionSequenceNumber,
-        tabsArray);
-    tabsArray.add(Messages.getString(locale, OPENSEARCHSERVER_TAB_MESSAGE));
-    outputResource(EDIT_SPEC_HEADER_FORWARD, out, locale, null, null,
-        new Integer(connectionSequenceNumber), null);
-  }
-
-  final private SpecificationNode getSpecNode(Specification os)
-  {
-    int l = os.getChildCount();
-    for (int i = 0; i < l; i++)
-    {
-      SpecificationNode node = os.getChild(i);
-      if (OpenSearchServerSpecs.OPENSEARCHSERVER_SPECS_NODE.equals(node
-          .getType()))
-      {
-        return node;
-      }
-    }
-    return null;
-  }
-
-  /**
-  * Output the specification body section. This method is called in the body
-  * section of a job page which has selected a pipeline 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 pipeline 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,
-      Specification os, int connectionSequenceNumber, int actualSequenceNumber,
-      String tabName)
-      throws ManifoldCFException, IOException
-  {
-    OpenSearchServerSpecs specs = getSpecParameters(os);
-    outputResource(EDIT_SPEC_FORWARD, out, locale, specs, tabName, new Integer(
-        connectionSequenceNumber), new Integer(actualSequenceNumber));
-  }
-
-  /**
-   * 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 transformation 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 pipeline 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, Specification os, int connectionSequenceNumber)
-      throws ManifoldCFException
-  {
-    ConfigurationNode specNode = getSpecNode(os);
-    boolean bAdd = (specNode == null);
-    if (bAdd)
-    {
-      specNode = new SpecificationNode(
-          OpenSearchServerSpecs.OPENSEARCHSERVER_SPECS_NODE);
-    }
-    OpenSearchServerSpecs.contextToSpecNode(variableContext, specNode,
-        connectionSequenceNumber);
-    if (bAdd)
-      os.addChild(os.getChildCount(), specNode);
-    return null;
-  }
-
-  /**
    * Build a Set of OpenSearchServer parameters. If configParams is null,
    * getConfiguration() is used.
    * 
@@ -364,56 +258,11 @@ public class OpenSearchServerConnector e
     return new OpenSearchServerConfig(configParams);
   }
 
-  final private OpenSearchServerSpecs getSpecParameters(Specification os)
-      throws ManifoldCFException
-  {
-    return new OpenSearchServerSpecs(getSpecNode(os));
-  }
-
   @Override
   public VersionContext getPipelineDescription(Specification os)
       throws ManifoldCFException
   {
-    OpenSearchServerSpecs specs = new OpenSearchServerSpecs(getSpecNode(os));
-    return new VersionContext(specs.toJson().toString(), params, os);
-  }
-
-  @Override
-  public boolean checkLengthIndexable(VersionContext outputDescription, long length, IOutputCheckActivity
activities)
-      throws ManifoldCFException, ServiceInterruption
-  {
-    OpenSearchServerSpecs specs = new OpenSearchServerSpecs(getSpecNode(outputDescription.getSpecification()));
-    long maxFileSize = specs.getMaxFileSize();
-    if (length > maxFileSize)
-      return false;
-    return true;
-  }
-
-  @Override
-  public boolean checkMimeTypeIndexable(VersionContext outputDescription, String mimeType,
IOutputCheckActivity activities)
-      throws ManifoldCFException, ServiceInterruption
-  {
-    OpenSearchServerSpecs specs = new OpenSearchServerSpecs(getSpecNode(outputDescription.getSpecification()));
-    return specs.checkMimeType(mimeType);
-  }
-
-  /**
-   * Pre-determine whether a document's URL is indexable by this connector. This
-   * method is used by participating repository connectors to help filter out
-   * documents that are not worth indexing.
-   *
-   * @param outputDescription
-   *          is the document's output version.
-   * @param url
-   *          is the URL of the document.
-   * @return true if the file is indexable.
-   */
-  @Override
-  public boolean checkURLIndexable(VersionContext outputDescription, String url, IOutputCheckActivity
activities)
-      throws ManifoldCFException, ServiceInterruption
-  {
-    OpenSearchServerSpecs specs = new OpenSearchServerSpecs(getSpecNode(outputDescription.getSpecification()));
-    return specs.checkExtension(FilenameUtils.getExtension(url));
+    return new VersionContext("", params, os);
   }
 
   @Override
@@ -425,26 +274,6 @@ public class OpenSearchServerConnector e
         getConfigParameters(parameters), null, null, null);
   }
 
-  /**
-   * View specification. This method is called in the body section of a job's
-   * view page. Its purpose is to present the pipeline 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 connectionSequenceNumber is the unique number of this connection within the job.
-   * @param os is the current pipeline specification for this job.
-   */
-  @Override
-  public void viewSpecification(IHTTPOutput out, Locale locale,
-      Specification os, int connectionSequenceNumber)
-      throws ManifoldCFException, IOException
-  {
-    outputResource(VIEW_SPEC_FORWARD, out, locale, getSpecParameters(os), null,
-        new Integer(connectionSequenceNumber), null);
-  }
-
   @Override
   public String processConfigurationPost(IThreadContext threadContext,
       IPostParameters variableContext, ConfigParams parameters)

Modified: manifoldcf/trunk/connectors/opensearchserver/connector/src/test/java/org/apache/manifoldcf/agents/output/opensearchserver/tests/NavigationDerbyUI.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/opensearchserver/connector/src/test/java/org/apache/manifoldcf/agents/output/opensearchserver/tests/NavigationDerbyUI.java?rev=1627002&r1=1627001&r2=1627002&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/opensearchserver/connector/src/test/java/org/apache/manifoldcf/agents/output/opensearchserver/tests/NavigationDerbyUI.java
(original)
+++ manifoldcf/trunk/connectors/opensearchserver/connector/src/test/java/org/apache/manifoldcf/agents/output/opensearchserver/tests/NavigationDerbyUI.java
Tue Sep 23 13:13:04 2014
@@ -162,11 +162,6 @@ public class NavigationDerbyUI extends B
     button.click();
     window = testerInstance.findWindow(null);
     form = window.findForm(testerInstance.createStringDescription("editjob"));
-    // OpenSearchServer
-    link = window.findLink(testerInstance.createStringDescription("OpenSearchServer tab"));
-    link.click();
-    window = testerInstance.findWindow(null);
-    form = window.findForm(testerInstance.createStringDescription("editjob"));
 
     // Save the job
     button = window.findButton(testerInstance.createStringDescription("Save this job"));



Mime
View raw message