manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1604371 [1/2] - in /manifoldcf/trunk/connectors: ./ amazoncloudsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/amazoncloudsearch/ amazoncloudsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/amaz...
Date Sat, 21 Jun 2014 13:36:56 GMT
Author: kwright
Date: Sat Jun 21 13:36:55 2014
New Revision: 1604371

URL: http://svn.apache.org/r1604371
Log:
Add a document filter transformer, and remove document filtering from Amazon connector

Added:
    manifoldcf/trunk/connectors/amazoncloudsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/amazoncloudsearch/common_zh_CH.properties   (with props)
    manifoldcf/trunk/connectors/documentfilter/   (with props)
    manifoldcf/trunk/connectors/documentfilter/build.xml   (with props)
    manifoldcf/trunk/connectors/documentfilter/connector/
    manifoldcf/trunk/connectors/documentfilter/connector/src/
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/DocumentFilter.java   (with props)
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/DocumentFilterConfig.java   (with props)
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/Messages.java   (with props)
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/native2ascii/
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/native2ascii/org/
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/native2ascii/org/apache/
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_en_US.properties   (with props)
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_ja_JP.properties   (with props)
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_zh_CH.properties   (with props)
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/resources/
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/resources/org/
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/resources/org/apache/
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/editSpecification.js   (with props)
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/editSpecification_Contents.html   (with props)
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/viewSpecification.html   (with props)
    manifoldcf/trunk/connectors/documentfilter/pom.xml   (with props)
Removed:
    manifoldcf/trunk/connectors/amazoncloudsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/amazoncloudsearch/editSpecification.js
    manifoldcf/trunk/connectors/amazoncloudsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/amazoncloudsearch/editSpecification_Contents.html
    manifoldcf/trunk/connectors/amazoncloudsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/amazoncloudsearch/viewSpecification.html
Modified:
    manifoldcf/trunk/connectors/amazoncloudsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/amazoncloudsearch/AmazonCloudSearchConfig.java
    manifoldcf/trunk/connectors/amazoncloudsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/amazoncloudsearch/AmazonCloudSearchConnector.java
    manifoldcf/trunk/connectors/amazoncloudsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/amazoncloudsearch/common_en_US.properties
    manifoldcf/trunk/connectors/amazoncloudsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/amazoncloudsearch/common_ja_JP.properties
    manifoldcf/trunk/connectors/pom.xml
    manifoldcf/trunk/connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformer/tika/TikaExtractor.java

Modified: manifoldcf/trunk/connectors/amazoncloudsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/amazoncloudsearch/AmazonCloudSearchConfig.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/amazoncloudsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/amazoncloudsearch/AmazonCloudSearchConfig.java?rev=1604371&r1=1604370&r2=1604371&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/amazoncloudsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/amazoncloudsearch/AmazonCloudSearchConfig.java (original)
+++ manifoldcf/trunk/connectors/amazoncloudsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/amazoncloudsearch/AmazonCloudSearchConfig.java Sat Jun 21 13:36:55 2014
@@ -37,16 +37,5 @@ public class AmazonCloudSearchConfig {
   public static final String PROXY_PORT_DEFAULT = "";
   
   // Specification nodes and values
-  public static final String NODE_MAXLENGTH = "maxlength";
-  public static final String MAXLENGTH_DEFAULT = "";
-  public static final String NODE_MIMETYPES = "mimetypes";
-  public static final String MIMETYPES_DEFAULT = "";
-  public static final String NODE_EXTENSIONS = "extensions";
-  public static final String EXTENSIONS_DEFAULT = "";
-  public static final String NODE_FIELDMAP = "fieldmap";
-  public static final String NODE_KEEPMETADATA = "keepAllMetadata";
-  public static final String ATTRIBUTE_SOURCE = "source";
-  public static final String ATTRIBUTE_TARGET = "target";
-  public static final String ATTRIBUTE_VALUE = "value";
   
 }

Modified: manifoldcf/trunk/connectors/amazoncloudsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/amazoncloudsearch/AmazonCloudSearchConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/amazoncloudsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/amazoncloudsearch/AmazonCloudSearchConnector.java?rev=1604371&r1=1604370&r2=1604371&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/amazoncloudsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/amazoncloudsearch/AmazonCloudSearchConnector.java (original)
+++ manifoldcf/trunk/connectors/amazoncloudsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/amazoncloudsearch/AmazonCloudSearchConnector.java Sat Jun 21 13:36:55 2014
@@ -37,7 +37,6 @@ import java.util.Date;
 
 import org.apache.commons.io.input.ReaderInputStream;
 
-import org.apache.commons.io.FilenameUtils;
 import org.apache.http.Consts;
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpHost;
@@ -97,13 +96,6 @@ public class AmazonCloudSearchConnector 
   /** Forward to the HTML template to view the configuration parameters */
   private static final String VIEW_CONFIGURATION_HTML = "viewConfiguration.html";
 
-  /** Forward to the javascript to check the specification parameters for the job */
-  private static final String EDIT_SPECIFICATION_JS = "editSpecification.js";
-  
-  private static final String EDIT_SPECIFICATION_CONTENTS_HTML = "editSpecification_Contents.html";
-  
-  private static final String VIEW_SPECIFICATION_HTML = "viewSpecification.html";
-  
   /** Local connection */
   protected HttpPost poster = null;
   
@@ -324,61 +316,19 @@ public class AmazonCloudSearchConnector 
     return null;
   }
 
-  /** Get an output version string, given an output specification.  The output version string is used to uniquely describe the pertinent details of
-  * the output specification and the configuration, to allow the Connector Framework to determine whether a document will need to be output again.
-  * Note that the contents of the document cannot be considered by this method, and that a different version string (defined in IRepositoryConnector)
-  * is used to describe the version of the actual document.
-  *
-  * 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 os is the current output specification for the job that is doing the crawling.
-  *@return a string, of unlimited length, which uniquely describes output configuration and specification in such a way that if two such strings are equal,
-  * the document will not need to be sent again to the output data store.
-  */
-  @Override
-  public String getPipelineDescription(Specification os)
-    throws ManifoldCFException, ServiceInterruption
-  {
-    SpecPacker sp = new SpecPacker(os);
-    return sp.toPackedString();
-  }
-
   /** Detect if a mime type is indexable or not.  This method is used by participating repository connectors to pre-filter the number of
   * unusable documents that will be passed to this output connector.
   *@param outputDescription is the document's output version.
   *@param mimeType is the mime type of the document.
   *@return true if the mime type is indexable by this connector.
   */
+  @Override
   public boolean checkMimeTypeIndexable(String outputDescription, String mimeType)
     throws ManifoldCFException, ServiceInterruption
   {
-    SpecPacker sp = new SpecPacker(outputDescription);
-    if (sp.checkMimeType(mimeType))
-      return super.checkMimeTypeIndexable(outputDescription, mimeType);
-    else
-      return false;
+    return mimeType.toLowerCase(Locale.ROOT).equals("text/plain;charset=utf-8");
   }
 
-  @Override
-  public boolean checkLengthIndexable(String outputDescription, long length)
-    throws ManifoldCFException, ServiceInterruption {
-    SpecPacker sp = new SpecPacker(outputDescription);
-    if (sp.checkLengthIndexable(length))
-      return super.checkLengthIndexable(outputDescription, length);
-    else
-      return false;
-  }
-
-  @Override
-  public boolean checkURLIndexable(String outputDescription, String url)
-    throws ManifoldCFException, ServiceInterruption {
-    SpecPacker sp = new SpecPacker(outputDescription);
-    if (sp.checkURLIndexable(url))
-      return super.checkURLIndexable(outputDescription, url);
-    else
-      return false;
-  }
-  
   /** 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.
@@ -400,8 +350,6 @@ public class AmazonCloudSearchConnector 
     // Establish a session
     getSession();
     
-    SpecPacker sp = new SpecPacker(outputDescription);
-    
     String uid = ManifoldCF.hash(documentURI);
 
     // Build a JSON generator
@@ -753,26 +701,6 @@ public class AmazonCloudSearchConnector 
         currentTime + 300000L, currentTime + 3 * 60 * 60000L, -1, false);
   }
   
-  protected static void fillInContentsSpecificationMap(Map<String,Object> paramMap, Specification os)
-  {
-    String maxFileSize = AmazonCloudSearchConfig.MAXLENGTH_DEFAULT;
-    String allowedMimeTypes = AmazonCloudSearchConfig.MIMETYPES_DEFAULT;
-    String allowedFileExtensions = AmazonCloudSearchConfig.EXTENSIONS_DEFAULT;
-    for (int i = 0; i < os.getChildCount(); i++)
-    {
-      SpecificationNode sn = os.getChild(i);
-      if (sn.getType().equals(AmazonCloudSearchConfig.NODE_MAXLENGTH))
-        maxFileSize = sn.getAttributeValue(AmazonCloudSearchConfig.ATTRIBUTE_VALUE);
-      else if (sn.getType().equals(AmazonCloudSearchConfig.NODE_MIMETYPES))
-        allowedMimeTypes = sn.getValue();
-      else if (sn.getType().equals(AmazonCloudSearchConfig.NODE_EXTENSIONS))
-        allowedFileExtensions = sn.getValue();
-    }
-    paramMap.put("MAXFILESIZE",maxFileSize);
-    paramMap.put("MIMETYPES",allowedMimeTypes);
-    paramMap.put("EXTENSIONS",allowedFileExtensions);
-  }
-  
   /** 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.
@@ -793,284 +721,4 @@ public class AmazonCloudSearchConnector 
     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.
-  *@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
-  {
-    Map<String, Object> paramMap = new HashMap<String, Object>();
-    paramMap.put("SEQNUM",Integer.toString(connectionSequenceNumber));
-
-    tabsArray.add(Messages.getString(locale, "AmazonCloudSearchOutputConnector.ContentsTabName"));
-
-    // Fill in the specification header map, using data from all tabs.
-    fillInContentsSpecificationMap(paramMap, os);
-
-    Messages.outputResourceWithVelocity(out,locale,EDIT_SPECIFICATION_JS,paramMap);
-  }
-  
-  /** 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
-  {
-    Map<String, Object> paramMap = new HashMap<String, Object>();
-
-    // Set the tab name
-    paramMap.put("TABNAME", tabName);
-    paramMap.put("SEQNUM",Integer.toString(connectionSequenceNumber));
-    paramMap.put("SELECTEDNUM",Integer.toString(actualSequenceNumber));
-
-    // Fill in the field mapping tab data
-    fillInContentsSpecificationMap(paramMap, os);
-    Messages.outputResourceWithVelocity(out,locale,EDIT_SPECIFICATION_CONTENTS_HTML,paramMap);
-  }
-
-  /** 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 {
-    String seqPrefix = "s"+connectionSequenceNumber+"_";
-
-    String x;
-        
-    x = variableContext.getParameter(seqPrefix+"maxfilesize");
-    if (x != null)
-    {
-      int i = 0;
-      while (i < os.getChildCount())
-      {
-        SpecificationNode node = os.getChild(i);
-        if (node.getType().equals(AmazonCloudSearchConfig.NODE_MAXLENGTH))
-          os.removeChild(i);
-        else
-          i++;
-      }
-      SpecificationNode sn = new SpecificationNode(AmazonCloudSearchConfig.NODE_MAXLENGTH);
-      sn.setAttribute(AmazonCloudSearchConfig.ATTRIBUTE_VALUE,x);
-      os.addChild(os.getChildCount(),sn);
-    }
-
-    x = variableContext.getParameter(seqPrefix+"mimetypes");
-    if (x != null)
-    {
-      int i = 0;
-      while (i < os.getChildCount())
-      {
-        SpecificationNode node = os.getChild(i);
-        if (node.getType().equals(AmazonCloudSearchConfig.NODE_MIMETYPES))
-          os.removeChild(i);
-        else
-          i++;
-      }
-      SpecificationNode sn = new SpecificationNode(AmazonCloudSearchConfig.NODE_MIMETYPES);
-      sn.setValue(x);
-      os.addChild(os.getChildCount(),sn);
-    }
-
-    x = variableContext.getParameter(seqPrefix+"extensions");
-    if (x != null)
-    {
-      int i = 0;
-      while (i < os.getChildCount())
-      {
-        SpecificationNode node = os.getChild(i);
-        if (node.getType().equals(AmazonCloudSearchConfig.NODE_EXTENSIONS))
-          os.removeChild(i);
-        else
-          i++;
-      }
-      SpecificationNode sn = new SpecificationNode(AmazonCloudSearchConfig.NODE_EXTENSIONS);
-      sn.setValue(x);
-      os.addChild(os.getChildCount(),sn);
-    }
-    
-    return 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
-  {
-    Map<String, Object> paramMap = new HashMap<String, Object>();
-    paramMap.put("SEQNUM",Integer.toString(connectionSequenceNumber));
-
-    // Fill in the map with data from all tabs
-    fillInContentsSpecificationMap(paramMap, os);
-
-    Messages.outputResourceWithVelocity(out,locale,VIEW_SPECIFICATION_HTML,paramMap);
-    
-  }
-  
-  protected static void fillSet(Set<String> set, String input) {
-    try
-    {
-      StringReader sr = new StringReader(input);
-      BufferedReader br = new BufferedReader(sr);
-      String line = null;
-      while ((line = br.readLine()) != null)
-      {
-        line = line.trim();
-        if (line.length() > 0)
-          set.add(line);
-      }
-    }
-    catch (IOException e)
-    {
-      // Should never happen
-      throw new RuntimeException("IO exception reading strings: "+e.getMessage(),e);
-    }
-  }
-  
-  protected static class SpecPacker {
-    
-    private final Set<String> extensions = new HashSet<String>();
-    private final Set<String> mimeTypes = new HashSet<String>();
-    private final Long lengthCutoff;
-    
-    public SpecPacker(Specification os) {
-      Long lengthCutoff = null;
-      String extensions = null;
-      String mimeTypes = null;
-      for (int i = 0; i < os.getChildCount(); i++) {
-        SpecificationNode sn = os.getChild(i);
-        
-        if (sn.getType().equals(AmazonCloudSearchConfig.NODE_MIMETYPES)) {
-          mimeTypes = sn.getValue();
-        } else if (sn.getType().equals(AmazonCloudSearchConfig.NODE_EXTENSIONS)) {
-          extensions = sn.getValue();
-        } else if (sn.getType().equals(AmazonCloudSearchConfig.NODE_MAXLENGTH)) {
-          String value = sn.getAttributeValue(AmazonCloudSearchConfig.ATTRIBUTE_VALUE);
-          lengthCutoff = new Long(value);
-        }
-      }
-      this.lengthCutoff = lengthCutoff;
-      fillSet(this.extensions, extensions);
-      fillSet(this.mimeTypes, mimeTypes);
-    }
-    
-    public SpecPacker(String packedString) {
-      
-      int index = 0;
-      
-      // Max length
-      final StringBuilder sb = new StringBuilder();
-      if (packedString.length() > index) {
-        if (packedString.charAt(index++) == '+') {
-          index = unpack(sb,packedString,index,'+');
-          this.lengthCutoff = new Long(sb.toString());
-        } else
-          this.lengthCutoff = null;
-      } else
-        this.lengthCutoff = null;
-      
-      // Mime types
-      final List<String> mimeBuffer = new ArrayList<String>();
-      index = unpackList(mimeBuffer,packedString,index,'+');
-      for (String mimeType : mimeBuffer) {
-        this.mimeTypes.add(mimeType);
-      }
-      
-      // Extensions
-      final List<String> extensionsBuffer = new ArrayList<String>();
-      index = unpackList(extensionsBuffer,packedString,index,'+');
-      for (String extension : extensionsBuffer) {
-        this.extensions.add(extension);
-      }
-    }
-    
-    public String toPackedString() {
-      StringBuilder sb = new StringBuilder();
-      int i;
-      
-      // Max length
-      if (lengthCutoff == null)
-        sb.append('-');
-      else {
-        sb.append('+');
-        pack(sb,lengthCutoff.toString(),'+');
-      }
-      
-      // Mime types
-      String[] mimeTypes = new String[this.mimeTypes.size()];
-      i = 0;
-      for (String mimeType : this.mimeTypes) {
-        mimeTypes[i++] = mimeType;
-      }
-      java.util.Arrays.sort(mimeTypes);
-      packList(sb,mimeTypes,'+');
-      
-      // Extensions
-      String[] extensions = new String[this.extensions.size()];
-      i = 0;
-      for (String extension : this.extensions) {
-        extensions[i++] = extension;
-      }
-      java.util.Arrays.sort(extensions);
-      packList(sb,extensions,'+');
-      
-      return sb.toString();
-    }
-    
-    public boolean checkLengthIndexable(long length) {
-      if (lengthCutoff == null)
-        return true;
-      return (length <= lengthCutoff.longValue());
-    }
-    
-    public boolean checkMimeType(String mimeType) {
-      if (mimeType == null)
-        mimeType = "application/unknown";
-      return mimeTypes.contains(mimeType);
-    }
-    
-    public boolean checkURLIndexable(String url) {
-      String extension = FilenameUtils.getExtension(url);
-      if (extension == null || extension.length() == 0)
-        extension = ".";
-      return extensions.contains(extension);
-    }
-    
-  }
-  
 }

Modified: manifoldcf/trunk/connectors/amazoncloudsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/amazoncloudsearch/common_en_US.properties
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/amazoncloudsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/amazoncloudsearch/common_en_US.properties?rev=1604371&r1=1604370&r2=1604371&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/amazoncloudsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/amazoncloudsearch/common_en_US.properties (original)
+++ manifoldcf/trunk/connectors/amazoncloudsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/amazoncloudsearch/common_en_US.properties Sat Jun 21 13:36:55 2014
@@ -22,16 +22,3 @@ AmazonCloudSearchOutputConnector.ProxyPo
 AmazonCloudSearchOutputConnector.ServerHostCannotBeNull=Server host cannot be null
 AmazonCloudSearchOutputConnector.ServerPathMustStartWithSlash=Server path must start with a '/'
 AmazonCloudSearchOutputConnector.ProxyPortMustBeAnInteger=Proxy port must be an integer
-AmazonCloudSearchOutputConnector.FieldMappingTabName=CloudSearch Field Mapping
-AmazonCloudSearchOutputConnector.ContentsTabName=CloudSearch Contents
-AmazonCloudSearchOutputConnector.FieldMappings=Field Mappings
-AmazonCloudSearchOutputConnector.MetadataFieldName=Metadata Field Name
-AmazonCloudSearchOutputConnector.CloudSearchFieldName=CloudSearch Field Name
-AmazonCloudSearchOutputConnector.DeleteFieldMapping=Delete field mapping
-AmazonCloudSearchOutputConnector.AddFieldMapping=Add field mapping
-AmazonCloudSearchOutputConnector.KeepAllMetadata=Keep all metadata:
-AmazonCloudSearchOutputConnector.Add=Add
-AmazonCloudSearchOutputConnector.NoFieldMappingSpecified=No field mapping specified
-AmazonCloudSearchOutputConnector.MaxFileSizeBytesColon=Max file size (bytes):
-AmazonCloudSearchOutputConnector.AllowedMIMETypesColon=Allowed MIME types:
-AmazonCloudSearchOutputConnector.AllowedFileExtensionsColon=Allowed file extensions:

Modified: manifoldcf/trunk/connectors/amazoncloudsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/amazoncloudsearch/common_ja_JP.properties
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/amazoncloudsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/amazoncloudsearch/common_ja_JP.properties?rev=1604371&r1=1604370&r2=1604371&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/amazoncloudsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/amazoncloudsearch/common_ja_JP.properties (original)
+++ manifoldcf/trunk/connectors/amazoncloudsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/amazoncloudsearch/common_ja_JP.properties Sat Jun 21 13:36:55 2014
@@ -22,16 +22,3 @@ AmazonCloudSearchOutputConnector.ProxyPo
 AmazonCloudSearchOutputConnector.ServerHostCannotBeNull=サーバー名は必須です。
 AmazonCloudSearchOutputConnector.ServerPathMustStartWithSlash=パスは / から入力してください。
 AmazonCloudSearchOutputConnector.ProxyPortMustBeAnInteger=プロキシ ポートは数値を入力してください。
-AmazonCloudSearchOutputConnector.FieldMappingTabName=CloudSearch フィールドマッピング
-AmazonCloudSearchOutputConnector.ContentsTabName=CloudSearch コンテンツ
-AmazonCloudSearchOutputConnector.FieldMappings=フィールドマッピング
-AmazonCloudSearchOutputConnector.MetadataFieldName=メタデータフィールド名
-AmazonCloudSearchOutputConnector.CloudSearchFieldName=CloudSearch フィールド名
-AmazonCloudSearchOutputConnector.DeleteFieldMapping=フィールドマッピングを削除
-AmazonCloudSearchOutputConnector.AddFieldMapping=フィールドマッピングを追加
-AmazonCloudSearchOutputConnector.KeepAllMetadata=全てのメタデータを保持する:
-AmazonCloudSearchOutputConnector.Add=追加
-AmazonCloudSearchOutputConnector.NoFieldMappingSpecified=フィールドマッピングを入力してください
-AmazonCloudSearchOutputConnector.MaxFileSizeBytesColon=最大ファイルサイズ (バイト):
-AmazonCloudSearchOutputConnector.AllowedMIMETypesColon=利用可能なMIMEタイプ:
-AmazonCloudSearchOutputConnector.AllowedFileExtensionsColon=利用可能なファイル拡張子:

Added: manifoldcf/trunk/connectors/amazoncloudsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/amazoncloudsearch/common_zh_CH.properties
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/amazoncloudsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/amazoncloudsearch/common_zh_CH.properties?rev=1604371&view=auto
==============================================================================
--- manifoldcf/trunk/connectors/amazoncloudsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/amazoncloudsearch/common_zh_CH.properties (added)
+++ manifoldcf/trunk/connectors/amazoncloudsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/amazoncloudsearch/common_zh_CH.properties Sat Jun 21 13:36:55 2014
@@ -0,0 +1,24 @@
+# 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.
+
+AmazonCloudSearchOutputConnector.ServerTabName=Server
+AmazonCloudSearchOutputConnector.ServerHostColon=Server host:
+AmazonCloudSearchOutputConnector.ServerPathColon=Server path:
+AmazonCloudSearchOutputConnector.ProxyProtocolColon=Proxy protocol:
+AmazonCloudSearchOutputConnector.ProxyHostColon=Proxy host:
+AmazonCloudSearchOutputConnector.ProxyPortColon=Proxy port:
+AmazonCloudSearchOutputConnector.ServerHostCannotBeNull=Server host cannot be null
+AmazonCloudSearchOutputConnector.ServerPathMustStartWithSlash=Server path must start with a '/'
+AmazonCloudSearchOutputConnector.ProxyPortMustBeAnInteger=Proxy port must be an integer

Propchange: manifoldcf/trunk/connectors/amazoncloudsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/amazoncloudsearch/common_zh_CH.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: manifoldcf/trunk/connectors/amazoncloudsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/amazoncloudsearch/common_zh_CH.properties
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: manifoldcf/trunk/connectors/documentfilter/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sat Jun 21 13:36:55 2014
@@ -0,0 +1,10 @@
+build
+dist
+doc
+target
+test-output
+test-derby-output
+test-postgresql-output
+test-HSQLDB-output
+test-HSQLDBext-output
+test-mysql-output

Added: manifoldcf/trunk/connectors/documentfilter/build.xml
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/documentfilter/build.xml?rev=1604371&view=auto
==============================================================================
--- manifoldcf/trunk/connectors/documentfilter/build.xml (added)
+++ manifoldcf/trunk/connectors/documentfilter/build.xml Sat Jun 21 13:36:55 2014
@@ -0,0 +1,40 @@
+<!--
+ 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.
+-->
+
+<project name="documentfilter" default="all">
+
+    <property environment="env"/>
+    <condition property="mcf-dist" value="${env.MCFDISTPATH}">
+        <isset property="env.MCFDISTPATH"/>
+    </condition>
+    <property name="abs-dist" location="../../dist"/>
+    <condition property="mcf-dist" value="${abs-dist}">
+        <not>
+            <isset property="env.MCFDISTPATH"/>
+        </not>
+    </condition>
+
+    <import file="${mcf-dist}/connector-build.xml"/>
+
+    <target name="deliver-connector" depends="mcf-connector-build.deliver-connector">
+        <antcall target="general-add-transformation-connector">
+            <param name="connector-label" value="Allowed Documents"/>
+            <param name="connector-class" value="org.apache.manifoldcf.agents.transformation.documentfilter.DocumentFilter"/>
+        </antcall>
+    </target>
+
+</project>

Propchange: manifoldcf/trunk/connectors/documentfilter/build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: manifoldcf/trunk/connectors/documentfilter/build.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/DocumentFilter.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/DocumentFilter.java?rev=1604371&view=auto
==============================================================================
--- manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/DocumentFilter.java (added)
+++ manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/DocumentFilter.java Sat Jun 21 13:36:55 2014
@@ -0,0 +1,443 @@
+/* $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.agents.transformation.documentfilter;
+
+import org.apache.manifoldcf.core.interfaces.*;
+import org.apache.manifoldcf.agents.interfaces.*;
+
+import org.apache.manifoldcf.agents.system.ManifoldCF;
+import org.apache.manifoldcf.agents.system.Logging;
+
+import org.apache.commons.io.FilenameUtils;
+
+import java.io.*;
+import java.util.*;
+
+public class DocumentFilter extends org.apache.manifoldcf.agents.transformation.BaseTransformationConnector {
+
+  /** Forward to the javascript to check the specification parameters for the job */
+  private static final String EDIT_SPECIFICATION_JS = "editSpecification.js";
+  
+  private static final String EDIT_SPECIFICATION_CONTENTS_HTML = "editSpecification_Contents.html";
+  
+  private static final String VIEW_SPECIFICATION_HTML = "viewSpecification.html";
+  
+  /** Constructor.
+   */
+  public DocumentFilter(){
+  }
+  
+  /** Get an output version string, given an output specification.  The output version string is used to uniquely describe the pertinent details of
+  * the output specification and the configuration, to allow the Connector Framework to determine whether a document will need to be output again.
+  * Note that the contents of the document cannot be considered by this method, and that a different version string (defined in IRepositoryConnector)
+  * is used to describe the version of the actual document.
+  *
+  * 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 os is the current output specification for the job that is doing the crawling.
+  *@return a string, of unlimited length, which uniquely describes output configuration and specification in such a way that if two such strings are equal,
+  * the document will not need to be sent again to the output data store.
+  */
+  @Override
+  public String getPipelineDescription(Specification os)
+    throws ManifoldCFException, ServiceInterruption
+  {
+    SpecPacker sp = new SpecPacker(os);
+    return sp.toPackedString();
+  }
+
+  /** Detect if a mime type is indexable or not.  This method is used by participating repository connectors to pre-filter the number of
+  * unusable documents that will be passed to this output connector.
+  *@param outputDescription is the document's output version.
+  *@param mimeType is the mime type of the document.
+  *@return true if the mime type is indexable by this connector.
+  */
+  @Override
+  public boolean checkMimeTypeIndexable(String outputDescription, String mimeType, IOutputCheckActivity activities)
+    throws ManifoldCFException, ServiceInterruption
+  {
+    SpecPacker sp = new SpecPacker(outputDescription);
+    if (sp.checkMimeType(mimeType))
+      return super.checkMimeTypeIndexable(outputDescription, mimeType, activities);
+    else
+      return false;
+  }
+
+  @Override
+  public boolean checkLengthIndexable(String outputDescription, long length, IOutputCheckActivity activities)
+    throws ManifoldCFException, ServiceInterruption {
+    SpecPacker sp = new SpecPacker(outputDescription);
+    if (sp.checkLengthIndexable(length))
+      return super.checkLengthIndexable(outputDescription, length, activities);
+    else
+      return false;
+  }
+
+  @Override
+  public boolean checkURLIndexable(String outputDescription, String url, IOutputCheckActivity activities)
+    throws ManifoldCFException, ServiceInterruption {
+    SpecPacker sp = new SpecPacker(outputDescription);
+    if (sp.checkURLIndexable(url))
+      return super.checkURLIndexable(outputDescription, url, activities);
+    else
+      return false;
+  }
+  
+  /** 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).
+  */
+  @Override
+  public int addOrReplaceDocumentWithException(String documentURI, String outputDescription, RepositoryDocument document, String authorityNameString, IOutputAddActivity activities)
+    throws ManifoldCFException, ServiceInterruption, IOException
+  {
+    return activities.sendDocument(documentURI, document, authorityNameString);
+  }
+  
+  protected static void fillInContentsSpecificationMap(Map<String,Object> paramMap, Specification os)
+  {
+    String maxFileSize = DocumentFilterConfig.MAXLENGTH_DEFAULT;
+    String allowedMimeTypes = DocumentFilterConfig.MIMETYPES_DEFAULT;
+    String allowedFileExtensions = DocumentFilterConfig.EXTENSIONS_DEFAULT;
+    for (int i = 0; i < os.getChildCount(); i++)
+    {
+      SpecificationNode sn = os.getChild(i);
+      if (sn.getType().equals(DocumentFilterConfig.NODE_MAXLENGTH))
+        maxFileSize = sn.getAttributeValue(DocumentFilterConfig.ATTRIBUTE_VALUE);
+      else if (sn.getType().equals(DocumentFilterConfig.NODE_MIMETYPES))
+        allowedMimeTypes = sn.getValue();
+      else if (sn.getType().equals(DocumentFilterConfig.NODE_EXTENSIONS))
+        allowedFileExtensions = sn.getValue();
+    }
+    paramMap.put("MAXFILESIZE",maxFileSize);
+    paramMap.put("MIMETYPES",allowedMimeTypes);
+    paramMap.put("EXTENSIONS",allowedFileExtensions);
+  }
+  
+  /** 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.
+  *@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
+  {
+    Map<String, Object> paramMap = new HashMap<String, Object>();
+    paramMap.put("SEQNUM",Integer.toString(connectionSequenceNumber));
+
+    tabsArray.add(Messages.getString(locale, "DocumentFilter.ContentsTabName"));
+
+    // Fill in the specification header map, using data from all tabs.
+    fillInContentsSpecificationMap(paramMap, os);
+
+    Messages.outputResourceWithVelocity(out,locale,EDIT_SPECIFICATION_JS,paramMap);
+  }
+  
+  /** 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
+  {
+    Map<String, Object> paramMap = new HashMap<String, Object>();
+
+    // Set the tab name
+    paramMap.put("TABNAME", tabName);
+    paramMap.put("SEQNUM",Integer.toString(connectionSequenceNumber));
+    paramMap.put("SELECTEDNUM",Integer.toString(actualSequenceNumber));
+
+    // Fill in the field mapping tab data
+    fillInContentsSpecificationMap(paramMap, os);
+    Messages.outputResourceWithVelocity(out,locale,EDIT_SPECIFICATION_CONTENTS_HTML,paramMap);
+  }
+
+  /** 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 {
+    String seqPrefix = "s"+connectionSequenceNumber+"_";
+
+    String x;
+        
+    x = variableContext.getParameter(seqPrefix+"maxfilesize");
+    if (x != null)
+    {
+      int i = 0;
+      while (i < os.getChildCount())
+      {
+        SpecificationNode node = os.getChild(i);
+        if (node.getType().equals(DocumentFilterConfig.NODE_MAXLENGTH))
+          os.removeChild(i);
+        else
+          i++;
+      }
+      SpecificationNode sn = new SpecificationNode(DocumentFilterConfig.NODE_MAXLENGTH);
+      sn.setAttribute(DocumentFilterConfig.ATTRIBUTE_VALUE,x);
+      os.addChild(os.getChildCount(),sn);
+    }
+
+    x = variableContext.getParameter(seqPrefix+"mimetypes");
+    if (x != null)
+    {
+      int i = 0;
+      while (i < os.getChildCount())
+      {
+        SpecificationNode node = os.getChild(i);
+        if (node.getType().equals(DocumentFilterConfig.NODE_MIMETYPES))
+          os.removeChild(i);
+        else
+          i++;
+      }
+      SpecificationNode sn = new SpecificationNode(DocumentFilterConfig.NODE_MIMETYPES);
+      sn.setValue(x);
+      os.addChild(os.getChildCount(),sn);
+    }
+
+    x = variableContext.getParameter(seqPrefix+"extensions");
+    if (x != null)
+    {
+      int i = 0;
+      while (i < os.getChildCount())
+      {
+        SpecificationNode node = os.getChild(i);
+        if (node.getType().equals(DocumentFilterConfig.NODE_EXTENSIONS))
+          os.removeChild(i);
+        else
+          i++;
+      }
+      SpecificationNode sn = new SpecificationNode(DocumentFilterConfig.NODE_EXTENSIONS);
+      sn.setValue(x);
+      os.addChild(os.getChildCount(),sn);
+    }
+    
+    return 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
+  {
+    Map<String, Object> paramMap = new HashMap<String, Object>();
+    paramMap.put("SEQNUM",Integer.toString(connectionSequenceNumber));
+
+    // Fill in the map with data from all tabs
+    fillInContentsSpecificationMap(paramMap, os);
+
+    Messages.outputResourceWithVelocity(out,locale,VIEW_SPECIFICATION_HTML,paramMap);
+    
+  }
+  
+  protected static void fillSet(Set<String> set, String input) {
+    try
+    {
+      StringReader sr = new StringReader(input);
+      BufferedReader br = new BufferedReader(sr);
+      String line = null;
+      while ((line = br.readLine()) != null)
+      {
+        line = line.trim();
+        if (line.length() > 0)
+          set.add(line);
+      }
+    }
+    catch (IOException e)
+    {
+      // Should never happen
+      throw new RuntimeException("IO exception reading strings: "+e.getMessage(),e);
+    }
+  }
+  
+  protected static class SpecPacker {
+    
+    private final Set<String> extensions = new HashSet<String>();
+    private final Set<String> mimeTypes = new HashSet<String>();
+    private final Long lengthCutoff;
+    
+    public SpecPacker(Specification os) {
+      Long lengthCutoff = null;
+      String extensions = null;
+      String mimeTypes = null;
+      for (int i = 0; i < os.getChildCount(); i++) {
+        SpecificationNode sn = os.getChild(i);
+        
+        if (sn.getType().equals(DocumentFilterConfig.NODE_MIMETYPES)) {
+          mimeTypes = sn.getValue();
+        } else if (sn.getType().equals(DocumentFilterConfig.NODE_EXTENSIONS)) {
+          extensions = sn.getValue();
+        } else if (sn.getType().equals(DocumentFilterConfig.NODE_MAXLENGTH)) {
+          String value = sn.getAttributeValue(DocumentFilterConfig.ATTRIBUTE_VALUE);
+          lengthCutoff = new Long(value);
+        }
+      }
+      this.lengthCutoff = lengthCutoff;
+      fillSet(this.extensions, extensions);
+      fillSet(this.mimeTypes, mimeTypes);
+    }
+    
+    public SpecPacker(String packedString) {
+      
+      int index = 0;
+      
+      // Max length
+      final StringBuilder sb = new StringBuilder();
+      if (packedString.length() > index) {
+        if (packedString.charAt(index++) == '+') {
+          index = unpack(sb,packedString,index,'+');
+          this.lengthCutoff = new Long(sb.toString());
+        } else
+          this.lengthCutoff = null;
+      } else
+        this.lengthCutoff = null;
+      
+      // Mime types
+      final List<String> mimeBuffer = new ArrayList<String>();
+      index = unpackList(mimeBuffer,packedString,index,'+');
+      for (String mimeType : mimeBuffer) {
+        this.mimeTypes.add(mimeType);
+      }
+      
+      // Extensions
+      final List<String> extensionsBuffer = new ArrayList<String>();
+      index = unpackList(extensionsBuffer,packedString,index,'+');
+      for (String extension : extensionsBuffer) {
+        this.extensions.add(extension);
+      }
+    }
+    
+    public String toPackedString() {
+      StringBuilder sb = new StringBuilder();
+      int i;
+      
+      // Max length
+      if (lengthCutoff == null)
+        sb.append('-');
+      else {
+        sb.append('+');
+        pack(sb,lengthCutoff.toString(),'+');
+      }
+      
+      // Mime types
+      String[] mimeTypes = new String[this.mimeTypes.size()];
+      i = 0;
+      for (String mimeType : this.mimeTypes) {
+        mimeTypes[i++] = mimeType;
+      }
+      java.util.Arrays.sort(mimeTypes);
+      packList(sb,mimeTypes,'+');
+      
+      // Extensions
+      String[] extensions = new String[this.extensions.size()];
+      i = 0;
+      for (String extension : this.extensions) {
+        extensions[i++] = extension;
+      }
+      java.util.Arrays.sort(extensions);
+      packList(sb,extensions,'+');
+      
+      return sb.toString();
+    }
+    
+    public boolean checkLengthIndexable(long length) {
+      if (lengthCutoff == null)
+        return true;
+      return (length <= lengthCutoff.longValue());
+    }
+    
+    public boolean checkMimeType(String mimeType) {
+      if (mimeType == null)
+        mimeType = "application/unknown";
+      return mimeTypes.contains(mimeType);
+    }
+    
+    public boolean checkURLIndexable(String url) {
+      String extension = FilenameUtils.getExtension(url);
+      if (extension == null || extension.length() == 0)
+        extension = ".";
+      return extensions.contains(extension);
+    }
+    
+  }
+  
+}

Propchange: manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/DocumentFilter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/DocumentFilter.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/DocumentFilterConfig.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/DocumentFilterConfig.java?rev=1604371&view=auto
==============================================================================
--- manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/DocumentFilterConfig.java (added)
+++ manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/DocumentFilterConfig.java Sat Jun 21 13:36:55 2014
@@ -0,0 +1,53 @@
+/* $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.agents.transformation.documentfilter;
+
+/** Parameters for DocumentFilter transformation connector.
+ */
+public class DocumentFilterConfig {
+
+  // Configuration parameters
+  
+  // Specification nodes and values
+  public static final String NODE_MAXLENGTH = "maxlength";
+  public static final String MAXLENGTH_DEFAULT = "16777216";
+  public static final String NODE_MIMETYPES = "mimetypes";
+  public static final String MIMETYPES_DEFAULT =
+                        "application/msword\n"
+		        + "application/vnd.ms-excel\n"
+		        + "application/vnd.openxmlformats-officedocument.wordprocessingml.document\n"
+		        + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\n"
+		        + "text/html\n"
+		        + "application/pdf\n"
+		        + "application/vnd.ms-powerpoint\n"
+		        + "application/vnd.openxmlformats-officedocument.presentationml.presentation\n"
+		        + "application/vnd.oasis.opendocument.text\n"
+		        + "application/vnd.oasis.opendocument.spreadsheet\n"
+		        + "application/vnd.oasis.opendocument.formula\n"
+		        + "application/rtf\n" + "text/plain\n" + "audio/mpeg\n"
+		        + "audio/x-wav\n" + "audio/ogg\n" + "audio/flac\n"
+		        + "application/x-bittorrent";
+  public static final String NODE_EXTENSIONS = "extensions";
+  public static final String EXTENSIONS_DEFAULT =
+                    "doc\n" + "docx\n" + "xls\n" + "xlsx\n" + "ppt\n" + "pptx\n"
+		    + "html\n" + "pdf\n" + "odt\n" + "ods\n" + "rtf\n" + "txt\n" + "mp3\n"
+		    + "mp4\n" + "wav\n" + "ogg\n" + "flac\n" + "torrent";
+  public static final String ATTRIBUTE_VALUE = "value";
+}

Propchange: manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/DocumentFilterConfig.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/DocumentFilterConfig.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/Messages.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/Messages.java?rev=1604371&view=auto
==============================================================================
--- manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/Messages.java (added)
+++ manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/Messages.java Sat Jun 21 13:36:55 2014
@@ -0,0 +1,141 @@
+/* $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.agents.transformation.documentfilter;
+
+import java.util.Locale;
+import java.util.Map;
+import org.apache.manifoldcf.core.interfaces.ManifoldCFException;
+import org.apache.manifoldcf.core.interfaces.IHTTPOutput;
+
+public class Messages extends org.apache.manifoldcf.ui.i18n.Messages
+{
+  public static final String DEFAULT_BUNDLE_NAME="org.apache.manifoldcf.agents.transformation.documentfilter.common";
+  public static final String DEFAULT_PATH_NAME="org.apache.manifoldcf.agents.transformation.documentfilter";
+  
+  /** Constructor - do no instantiate
+  */
+  protected Messages()
+  {
+  }
+  
+  public static String getString(Locale locale, String messageKey)
+  {
+    return getString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
+  }
+
+  public static String getAttributeString(Locale locale, String messageKey)
+  {
+    return getAttributeString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
+  }
+
+  public static String getBodyString(Locale locale, String messageKey)
+  {
+    return getBodyString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
+  }
+
+  public static String getAttributeJavascriptString(Locale locale, String messageKey)
+  {
+    return getAttributeJavascriptString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
+  }
+
+  public static String getBodyJavascriptString(Locale locale, String messageKey)
+  {
+    return getBodyJavascriptString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
+  }
+
+  public static String getString(Locale locale, String messageKey, Object[] args)
+  {
+    return getString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
+  }
+
+  public static String getAttributeString(Locale locale, String messageKey, Object[] args)
+  {
+    return getAttributeString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
+  }
+  
+  public static String getBodyString(Locale locale, String messageKey, Object[] args)
+  {
+    return getBodyString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
+  }
+
+  public static String getAttributeJavascriptString(Locale locale, String messageKey, Object[] args)
+  {
+    return getAttributeJavascriptString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
+  }
+
+  public static String getBodyJavascriptString(Locale locale, String messageKey, Object[] args)
+  {
+    return getBodyJavascriptString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
+  }
+
+  // More general methods which allow bundlenames and class loaders to be specified.
+  
+  public static String getString(String bundleName, Locale locale, String messageKey, Object[] args)
+  {
+    return getString(Messages.class, bundleName, locale, messageKey, args);
+  }
+
+  public static String getAttributeString(String bundleName, Locale locale, String messageKey, Object[] args)
+  {
+    return getAttributeString(Messages.class, bundleName, locale, messageKey, args);
+  }
+
+  public static String getBodyString(String bundleName, Locale locale, String messageKey, Object[] args)
+  {
+    return getBodyString(Messages.class, bundleName, locale, messageKey, args);
+  }
+  
+  public static String getAttributeJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
+  {
+    return getAttributeJavascriptString(Messages.class, bundleName, locale, messageKey, args);
+  }
+
+  public static String getBodyJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
+  {
+    return getBodyJavascriptString(Messages.class, bundleName, locale, messageKey, args);
+  }
+
+  // Resource output
+  
+  public static void outputResource(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,String> substitutionParameters, boolean mapToUpperCase)
+    throws ManifoldCFException
+  {
+    outputResource(output,Messages.class,DEFAULT_PATH_NAME,locale,resourceKey,
+      substitutionParameters,mapToUpperCase);
+  }
+  
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,String> substitutionParameters, boolean mapToUpperCase)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      substitutionParameters,mapToUpperCase);
+  }
+
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,Object> contextObjects)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      contextObjects);
+  }
+  
+}
+

Propchange: manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/Messages.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/Messages.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: manifoldcf/trunk/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_en_US.properties
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_en_US.properties?rev=1604371&view=auto
==============================================================================
--- manifoldcf/trunk/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_en_US.properties (added)
+++ manifoldcf/trunk/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_en_US.properties Sat Jun 21 13:36:55 2014
@@ -0,0 +1,19 @@
+# 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.
+
+DocumentFilter.ContentsTabName=Allowed contents
+DocumentFilter.MaxFileSizeBytesColon=Max file size (bytes):
+DocumentFilter.AllowedMIMETypesColon=Allowed MIME types:
+DocumentFilter.AllowedFileExtensionsColon=Allowed file extensions:

Propchange: manifoldcf/trunk/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_en_US.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: manifoldcf/trunk/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_en_US.properties
------------------------------------------------------------------------------
    svn:keywords = Id

Added: manifoldcf/trunk/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_ja_JP.properties
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_ja_JP.properties?rev=1604371&view=auto
==============================================================================
--- manifoldcf/trunk/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_ja_JP.properties (added)
+++ manifoldcf/trunk/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_ja_JP.properties Sat Jun 21 13:36:55 2014
@@ -0,0 +1,19 @@
+# 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.
+
+DocumentFilter.ContentsTabName=コンテンツ
+DocumentFilter.MaxFileSizeBytesColon=最大ファイルサイズ (バイト):
+DocumentFilter.AllowedMIMETypesColon=利用可能なMIMEタイプ:
+DocumentFilter.AllowedFileExtensionsColon=利用可能なファイル拡張子:

Propchange: manifoldcf/trunk/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_ja_JP.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: manifoldcf/trunk/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_ja_JP.properties
------------------------------------------------------------------------------
    svn:keywords = Id

Added: manifoldcf/trunk/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_zh_CH.properties
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_zh_CH.properties?rev=1604371&view=auto
==============================================================================
--- manifoldcf/trunk/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_zh_CH.properties (added)
+++ manifoldcf/trunk/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_zh_CH.properties Sat Jun 21 13:36:55 2014
@@ -0,0 +1,19 @@
+# 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.
+
+DocumentFilter.ContentsTabName=Allowed contents
+DocumentFilter.MaxFileSizeBytesColon=Max file size (bytes):
+DocumentFilter.AllowedMIMETypesColon=Allowed MIME types:
+DocumentFilter.AllowedFileExtensionsColon=Allowed file extensions:

Propchange: manifoldcf/trunk/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_zh_CH.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: manifoldcf/trunk/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_zh_CH.properties
------------------------------------------------------------------------------
    svn:keywords = Id

Added: manifoldcf/trunk/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/editSpecification.js
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/editSpecification.js?rev=1604371&view=auto
==============================================================================
--- manifoldcf/trunk/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/editSpecification.js (added)
+++ manifoldcf/trunk/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/editSpecification.js Sat Jun 21 13:36:55 2014
@@ -0,0 +1,26 @@
+<!--
+ 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.
+-->
+
+<script type="text/javascript">
+<!--
+function s${SEQNUM}_checkSpecification()
+{
+  return true;
+}
+
+//-->
+</script>

Propchange: manifoldcf/trunk/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/editSpecification.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: manifoldcf/trunk/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/editSpecification.js
------------------------------------------------------------------------------
    svn:keywords = Id

Added: manifoldcf/trunk/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/editSpecification_Contents.html
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/editSpecification_Contents.html?rev=1604371&view=auto
==============================================================================
--- manifoldcf/trunk/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/editSpecification_Contents.html (added)
+++ manifoldcf/trunk/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/editSpecification_Contents.html Sat Jun 21 13:36:55 2014
@@ -0,0 +1,50 @@
+<!--
+ 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.
+-->
+
+#if($TABNAME == $ResourceBundle.getString('DocumentFilter.ContentsTabName') && ${SEQNUM} == ${SELECTEDNUM})
+
+<table class="displaytable">
+  <tr>
+    <td class="description">
+      <nobr>$Encoder.bodyEscape($ResourceBundle.getString('DocumentFilter.MaxFileSizeBytesColon'))</nobr>
+    </td>
+    <td class="value"><input name="s${SEQNUM}_maxfilesize" type="text"
+      value="$Encoder.attributeEscape($MAXFILESIZE)" size="24" /></td>
+  </tr>
+  <tr>
+    <td class="description">
+      <nobr>$Encoder.bodyEscape($ResourceBundle.getString('DocumentFilter.AllowedMIMETypesColon'))</nobr>
+    </td>
+    <td class="value">
+      <textarea rows="10" cols="64" name="s${SEQNUM}_mimetypes">$Encoder.bodyEscape($MIMETYPES)</textarea>
+    </td>
+  </tr>
+  <tr>
+    <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('DocumentFilter.AllowedFileExtensionsColon'))</nobr></td>
+    <td class="value">
+      <textarea rows="10" cols="12" name="s${SEQNUM}_extensions">$Encoder.bodyEscape($EXTENSIONS)</textarea>
+    </td>
+  </tr>
+</table>
+
+#else
+
+<input type="hidden" name="s${SEQNUM}_maxfilesize" value="$Encoder.attributeEscape($MAXFILESIZE)" />
+<input type="hidden" name="s${SEQNUM}_mimetypes" value="$Encoder.attributeEscape($MIMETYPES)" />
+<input type="hidden" name="s${SEQNUM}_extensions" value="$Encoder.attributeEscape($EXTENSIONS)" />
+
+#end

Propchange: manifoldcf/trunk/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/editSpecification_Contents.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: manifoldcf/trunk/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/editSpecification_Contents.html
------------------------------------------------------------------------------
    svn:keywords = Id

Added: manifoldcf/trunk/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/viewSpecification.html
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/viewSpecification.html?rev=1604371&view=auto
==============================================================================
--- manifoldcf/trunk/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/viewSpecification.html (added)
+++ manifoldcf/trunk/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/viewSpecification.html Sat Jun 21 13:36:55 2014
@@ -0,0 +1,32 @@
+<!--
+ 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.
+-->
+
+<table class="displaytable">
+  <tr>
+    <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('DocumentFilter.MaxFileSizeBytesColon'))</nobr></td>
+    <td class="value">$Encoder.bodyEscape($MAXFILESIZE)</td>
+  </tr>
+  <tr>
+    <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('DocumentFilter.AllowedMIMETypesColon'))</nobr></td>
+    <td class="value">$Encoder.bodyEscape($MIMETYPES)</td>
+  </tr>
+  <tr>
+    <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('DocumentFilter.AllowedFileExtensionsColon'))</nobr></td>
+    <td class="value">$Encoder.bodyEscape($EXTENSIONS)</td>
+  </tr>
+  
+</table>

Propchange: manifoldcf/trunk/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/viewSpecification.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: manifoldcf/trunk/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/viewSpecification.html
------------------------------------------------------------------------------
    svn:keywords = Id



Mime
View raw message