manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1794710 - in /manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter: ./ connector/ connector/src/ connector/src/main/ connector/src/main/java/ connector/src/main/java/org/ connector/src/main/java/org/apache/ connector/src/main/java...
Date Wed, 10 May 2017 11:52:42 GMT
Author: kwright
Date: Wed May 10 11:52:41 2017
New Revision: 1794710

URL: http://svn.apache.org/viewvc?rev=1794710&view=rev
Log:
Commit contentlimiter connector from patch

Added:
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/.gitignore
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/build.xml
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/java/
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/java/org/
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/java/org/apache/
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/java/org/apache/manifoldcf/
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/java/org/apache/manifoldcf/agents/
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/contentlimiter/
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/contentlimiter/ContentLimiter.java
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/contentlimiter/ContentLimiterConfig.java
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/contentlimiter/Messages.java
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/native2ascii/
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/native2ascii/org/
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/native2ascii/org/apache/
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/native2ascii/org/apache/manifoldcf/
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/contentlimiter/
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/contentlimiter/common_en_US.properties
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/contentlimiter/common_es_ES.properties
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/contentlimiter/common_ja_JP.properties
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/contentlimiter/common_zh_CN.properties
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/resources/
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/resources/org/
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/resources/org/apache/
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/resources/org/apache/manifoldcf/
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/resources/org/apache/manifoldcf/agents/
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/contentlimiter/
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/contentlimiter/editSpecification.js
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/contentlimiter/editSpecification_Content.html
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/contentlimiter/viewSpecification.html
    manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/pom.xml

Added: manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/.gitignore
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/.gitignore?rev=1794710&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/.gitignore (added)
+++ manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/.gitignore Wed May 10 11:52:41 2017
@@ -0,0 +1,4 @@
+/target/
+/.classpath
+/.settings/
+/.project

Added: manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/build.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/build.xml?rev=1794710&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/build.xml (added)
+++ manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/build.xml Wed May 10 11:52:41 2017
@@ -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>

Added: manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/contentlimiter/ContentLimiter.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/contentlimiter/ContentLimiter.java?rev=1794710&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/contentlimiter/ContentLimiter.java (added)
+++ manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/contentlimiter/ContentLimiter.java Wed May 10 11:52:41 2017
@@ -0,0 +1,522 @@
+/* $Id: DocumentFilter.java 1756230 2016-08-12 22:20:00Z kwright $ */
+
+/**
+* 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.contentlimiter;
+
+import org.apache.manifoldcf.core.interfaces.*;
+import org.apache.commons.io.IOUtils;
+import org.apache.manifoldcf.agents.interfaces.*;
+
+import java.io.*;
+import java.util.*;
+
+public class ContentLimiter 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_CONTENT_HTML = "editSpecification_Content.html";
+  
+  private static final String VIEW_SPECIFICATION_HTML = "viewSpecification.html";
+
+  protected static final String ACTIVITY_LIMIT = "limit";
+
+  protected static final String[] activitiesList = new String[]{ACTIVITY_LIMIT};
+  
+  /** We handle up to 64K in memory; after that we go to disk. */
+  protected static final long inMemoryMaximumFile = 65536;
+  
+  /** Return a list of activities that this connector generates.
+  * The connector does NOT need to be connected before this method is called.
+  *@return the set of activities.
+  */
+  @Override
+  public String[] getActivitiesList()
+  {
+    return activitiesList;
+  }
+
+  /** Constructor.
+   */
+  public ContentLimiter(){
+  }
+  
+  /** 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 VersionContext getPipelineDescription(Specification os)
+    throws ManifoldCFException, ServiceInterruption
+  {
+    SpecPacker sp = new SpecPacker(os);
+    return new VersionContext(sp.toPackedString(),params,os);
+  }
+
+  /** 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(VersionContext outputDescription, String mimeType, IOutputCheckActivity activities)
+    throws ManifoldCFException, ServiceInterruption
+  {
+    return true;
+  }
+
+  @Override
+  public boolean checkLengthIndexable(VersionContext outputDescription, long length, IOutputCheckActivity activities)
+    throws ManifoldCFException, ServiceInterruption {
+	// Always true;
+    return true;
+  }
+  
+  /** Add (or replace) a document in the output data store using the connector.
+  * This method presumes that the connector object has been configured, and it is thus able to communicate with the output data store should that be
+  * necessary.
+  *@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, VersionContext outputDescription, RepositoryDocument document, String authorityNameString, IOutputAddActivity activities)
+    throws ManifoldCFException, ServiceInterruption, IOException
+  {
+	InputStream is = null;
+	DestinationStorage ds = null;
+	try {
+		RepositoryDocument finalDocument;
+		long length;
+		long startTime = System.currentTimeMillis();
+		String resultCode = "OK";
+		String description = null;
+		SpecPacker sp = new SpecPacker(outputDescription.getSpecification());
+		
+		if(document.getBinaryLength() > sp.lengthCutoff) {
+		      
+		    if (document.getBinaryLength() <= inMemoryMaximumFile)
+		    {
+		      ds = new MemoryDestinationStorage((int)document.getBinaryLength());
+		    }
+		    else
+		    {
+		      ds = new FileDestinationStorage();
+		    }
+		    
+		    // Create a copy of Repository Document
+		    finalDocument = document.duplicate();
+		    
+		    InputStream docIs = document.getBinaryStream();
+		    try {
+			    IOUtils.copyLarge(docIs, ds.getOutputStream(), 0L, sp.lengthCutoff);
+			    
+			    // Get new stream length
+			    length = ds.getBinaryLength();
+			    is = ds.getInputStream();
+			    finalDocument.setBinary(is,length);
+			    resultCode = "TRUNCATEDOK";
+		    } catch(IOException e) {
+		    	resultCode = "TRUNCATEDERROR";
+		    	description = e.getMessage();
+		    	return DOCUMENTSTATUS_REJECTED;
+		    } finally {
+		    	docIs.close();
+		    }
+		} else {
+			finalDocument = document;
+			length = document.getBinaryLength();
+		}
+		
+		activities.recordActivity(new Long(startTime), ACTIVITY_LIMIT, length, documentURI,
+	            resultCode, description);
+		return activities.sendDocument(documentURI, finalDocument);
+	} finally {
+		if(is != null) {
+			is.close();
+		}
+		if(ds != null) {
+			ds.close();
+		}
+	}
+  }
+  
+  protected static void fillInContentSpecificationMap(Map<String,Object> paramMap, Specification os)
+  {
+    String maxContentLength = ContentLimiterConfig.MAXLENGTH_DEFAULT;
+    for (int i = 0; i < os.getChildCount(); i++)
+    {
+      SpecificationNode sn = os.getChild(i);
+      if (sn.getType().equals(ContentLimiterConfig.NODE_MAXLENGTH)) {
+        maxContentLength = sn.getAttributeValue(ContentLimiterConfig.ATTRIBUTE_VALUE);
+      }
+    }
+    paramMap.put("MAXCONTENTLENGTH",maxContentLength);
+  }
+  
+  /** 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, "ContentLimiter.ContentTabName"));
+
+    // Fill in the specification header map, using data from all tabs.
+    fillInContentSpecificationMap(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
+    fillInContentSpecificationMap(paramMap, os);
+    Messages.outputResourceWithVelocity(out,locale,EDIT_SPECIFICATION_CONTENT_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+"maxcontentlength");
+    if (x != null)
+    {
+      int i = 0;
+      while (i < os.getChildCount())
+      {
+        SpecificationNode node = os.getChild(i);
+        if (node.getType().equals(ContentLimiterConfig.NODE_MAXLENGTH))
+          os.removeChild(i);
+        else
+          i++;
+      }
+      SpecificationNode sn = new SpecificationNode(ContentLimiterConfig.NODE_MAXLENGTH);
+      sn.setAttribute(ContentLimiterConfig.ATTRIBUTE_VALUE,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
+    fillInContentSpecificationMap(paramMap, os);
+
+    Messages.outputResourceWithVelocity(out,locale,VIEW_SPECIFICATION_HTML,paramMap);
+    
+  }
+  
+  protected static Set<String> fillSet(String input) {
+    Set<String> rval = new HashSet<String>();
+    try
+    {
+      StringReader sr = new StringReader(input);
+      BufferedReader br = new BufferedReader(sr);
+      String line = null;
+      while ((line = br.readLine()) != null)
+      {
+        line = line.trim();
+        if (line.equals("*"))
+          rval = null;
+        else if (rval != null && line.length() > 0)
+          rval.add(line.toLowerCase(Locale.ROOT));
+      }
+    }
+    catch (IOException e)
+    {
+      // Should never happen
+      throw new RuntimeException("IO exception reading strings: "+e.getMessage(),e);
+    }
+    return rval;
+  }
+  
+  protected static int handleIOException(IOException e)
+		    throws ManifoldCFException
+  {
+    // IOException reading from our local storage...
+    if (e instanceof InterruptedIOException)
+      throw new ManifoldCFException(e.getMessage(),e,ManifoldCFException.INTERRUPTED);
+    throw new ManifoldCFException(e.getMessage(),e);
+  }
+  
+  protected static interface DestinationStorage
+  {
+    /** Get the output stream to write to.  Caller should explicitly close this stream when done writing.
+    */
+    public OutputStream getOutputStream()
+      throws ManifoldCFException;
+    
+    /** Get new binary length.
+    */
+    public long getBinaryLength()
+      throws ManifoldCFException;
+
+    /** Get the input stream to read from.  Caller should explicitly close this stream when done reading.
+    */
+    public InputStream getInputStream()
+      throws ManifoldCFException;
+    
+    /** Close the object and clean up everything.
+    * This should be called when the data is no longer needed.
+    */
+    public void close()
+      throws ManifoldCFException;
+  }
+  
+  protected static class FileDestinationStorage implements DestinationStorage
+  {
+    protected final File outputFile;
+    protected final OutputStream outputStream;
+
+    public FileDestinationStorage()
+      throws ManifoldCFException
+    {
+      File outputFile;
+      OutputStream outputStream;
+      try
+      {
+        outputFile = File.createTempFile("mcftika","tmp");
+        outputStream = new FileOutputStream(outputFile);
+      }
+      catch (IOException e)
+      {
+        handleIOException(e);
+        outputFile = null;
+        outputStream = null;
+      }
+      this.outputFile = outputFile;
+      this.outputStream = outputStream;
+    }
+    
+    @Override
+    public OutputStream getOutputStream()
+      throws ManifoldCFException
+    {
+      return outputStream;
+    }
+    
+    /** Get new binary length.
+    */
+    @Override
+    public long getBinaryLength()
+      throws ManifoldCFException
+    {
+      return outputFile.length();
+    }
+
+    /** Get the input stream to read from.  Caller should explicitly close this stream when done reading.
+    */
+    @Override
+    public InputStream getInputStream()
+      throws ManifoldCFException
+    {
+      try
+      {
+        return new FileInputStream(outputFile);
+      }
+      catch (IOException e)
+      {
+        handleIOException(e);
+        return null;
+      }
+    }
+    
+    /** Close the object and clean up everything.
+    * This should be called when the data is no longer needed.
+    */
+    @Override
+    public void close()
+      throws ManifoldCFException
+    {
+      outputFile.delete();
+    }
+
+  }
+  
+  protected static class MemoryDestinationStorage implements DestinationStorage
+  {
+    protected final ByteArrayOutputStream outputStream;
+    
+    public MemoryDestinationStorage(int sizeHint)
+    {
+      outputStream = new ByteArrayOutputStream(sizeHint);
+    }
+    
+    @Override
+    public OutputStream getOutputStream()
+      throws ManifoldCFException
+    {
+      return outputStream;
+    }
+
+    /** Get new binary length.
+    */
+    @Override
+    public long getBinaryLength()
+      throws ManifoldCFException
+    {
+      return outputStream.size();
+    }
+    
+    /** Get the input stream to read from.  Caller should explicitly close this stream when done reading.
+    */
+    @Override
+    public InputStream getInputStream()
+      throws ManifoldCFException
+    {
+      return new ByteArrayInputStream(outputStream.toByteArray());
+    }
+    
+    /** Close the object and clean up everything.
+    * This should be called when the data is no longer needed.
+    */
+    public void close()
+      throws ManifoldCFException
+    {
+    }
+
+  }
+  
+  protected static class SpecPacker {
+    
+    
+    private Long lengthCutoff;
+    
+    public SpecPacker(Specification os) {
+      for (int i = 0; i < os.getChildCount(); i++) {
+        SpecificationNode sn = os.getChild(i);
+        
+        if (sn.getType().equals(ContentLimiterConfig.NODE_MAXLENGTH)) {
+          String value = sn.getAttributeValue(ContentLimiterConfig.ATTRIBUTE_VALUE);
+          lengthCutoff = new Long(value);
+        }
+      }
+    }
+    
+    public String toPackedString() {
+      StringBuilder sb = new StringBuilder();
+      
+      // Max length
+      if (lengthCutoff == null)
+        sb.append('-');
+      else {
+        sb.append('+');
+        pack(sb,lengthCutoff.toString(),'+');
+      }
+
+      return sb.toString();
+    }
+    
+  }
+  
+}

Added: manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/contentlimiter/ContentLimiterConfig.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/contentlimiter/ContentLimiterConfig.java?rev=1794710&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/contentlimiter/ContentLimiterConfig.java (added)
+++ manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/contentlimiter/ContentLimiterConfig.java Wed May 10 11:52:41 2017
@@ -0,0 +1,32 @@
+/* $Id: DocumentFilterConfig.java 1630623 2014-10-10 00:11:30Z kwright $ */
+
+/**
+* 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.contentlimiter;
+
+/** Parameters for DocumentFilter transformation connector.
+ */
+public class ContentLimiterConfig {
+
+  // Configuration parameters
+  
+  // Specification nodes and values
+  public static final String NODE_MAXLENGTH = "maxlength";
+  public static final String MAXLENGTH_DEFAULT = "500000000";
+  public static final String ATTRIBUTE_VALUE = "value";
+}

Added: manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/contentlimiter/Messages.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/contentlimiter/Messages.java?rev=1794710&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/contentlimiter/Messages.java (added)
+++ manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/contentlimiter/Messages.java Wed May 10 11:52:41 2017
@@ -0,0 +1,141 @@
+/* $Id: Messages.java 1604371 2014-06-21 13:36:55Z kwright $ */
+
+/**
+* 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.contentlimiter;
+
+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.contentlimiter.common";
+  public static final String DEFAULT_PATH_NAME="org.apache.manifoldcf.agents.transformation.contentlimiter";
+  
+  /** 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);
+  }
+  
+}
+

Added: manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/contentlimiter/common_en_US.properties
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/contentlimiter/common_en_US.properties?rev=1794710&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/contentlimiter/common_en_US.properties (added)
+++ manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/contentlimiter/common_en_US.properties Wed May 10 11:52:41 2017
@@ -0,0 +1,17 @@
+# 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.
+
+ContentLimiter.ContentTabName=Content limiter
+ContentLimiter.MaxContentLengthBytesColon=Maximum content length (bytes):

Added: manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/contentlimiter/common_es_ES.properties
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/contentlimiter/common_es_ES.properties?rev=1794710&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/contentlimiter/common_es_ES.properties (added)
+++ manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/contentlimiter/common_es_ES.properties Wed May 10 11:52:41 2017
@@ -0,0 +1,17 @@
+# 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.
+
+ContentLimiter.ContentTabName=Limitador de contenido
+ContentLimiter.MaxContentLengthBytesColon=Longitud máxima del contenido (bytes):

Added: manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/contentlimiter/common_ja_JP.properties
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/contentlimiter/common_ja_JP.properties?rev=1794710&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/contentlimiter/common_ja_JP.properties (added)
+++ manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/contentlimiter/common_ja_JP.properties Wed May 10 11:52:41 2017
@@ -0,0 +1,17 @@
+# 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.
+
+ContentLimiter.ContentTabName=Content limiter
+ContentLimiter.MaxContentLengthBytesColon=Maximum content length (bytes):

Added: manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/contentlimiter/common_zh_CN.properties
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/contentlimiter/common_zh_CN.properties?rev=1794710&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/contentlimiter/common_zh_CN.properties (added)
+++ manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/contentlimiter/common_zh_CN.properties Wed May 10 11:52:41 2017
@@ -0,0 +1,17 @@
+# 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.
+
+ContentLimiter.ContentTabName=Content limiter
+ContentLimiter.MaxContentLengthBytesColon=Maximum content length (bytes):

Added: manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/contentlimiter/editSpecification.js
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/contentlimiter/editSpecification.js?rev=1794710&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/contentlimiter/editSpecification.js (added)
+++ manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/contentlimiter/editSpecification.js Wed May 10 11:52:41 2017
@@ -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>

Added: manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/contentlimiter/editSpecification_Content.html
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/contentlimiter/editSpecification_Content.html?rev=1794710&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/contentlimiter/editSpecification_Content.html (added)
+++ manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/contentlimiter/editSpecification_Content.html Wed May 10 11:52:41 2017
@@ -0,0 +1,34 @@
+<!--
+ 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('ContentLimiter.ContentTabName') && ${SEQNUM} == ${SELECTEDNUM})
+
+<table class="displaytable">
+  <tr>
+    <td class="description">
+      <nobr>$Encoder.bodyEscape($ResourceBundle.getString('ContentLimiter.MaxContentLengthBytesColon'))</nobr>
+    </td>
+    <td class="value"><input name="s${SEQNUM}_maxcontentlength" type="text"
+      value="$Encoder.attributeEscape($MAXCONTENTLENGTH)" size="24" /></td>
+  </tr>
+</table>
+
+#else
+
+<input type="hidden" name="s${SEQNUM}_maxcontentlength" value="$Encoder.attributeEscape($MAXCONTENTLENGTH)" />
+
+#end

Added: manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/contentlimiter/viewSpecification.html
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/contentlimiter/viewSpecification.html?rev=1794710&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/contentlimiter/viewSpecification.html (added)
+++ manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/contentlimiter/viewSpecification.html Wed May 10 11:52:41 2017
@@ -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.
+-->
+
+
+<table class="displaytable">
+  <tr>
+    <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('ContentLimiter.MaxContentLengthBytesColon'))</nobr></td>
+    <td class="value">$Encoder.bodyEscape($MAXCONTENTLENGTH)</td>
+  </tr>
+</table>

Added: manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/pom.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/pom.xml?rev=1794710&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/pom.xml (added)
+++ manifoldcf/branches/CONNECTORS-1424/connectors/contentlimiter/pom.xml Wed May 10 11:52:41 2017
@@ -0,0 +1,362 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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 xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <parent>
+    <groupId>org.apache.manifoldcf</groupId>
+    <artifactId>mcf-connectors</artifactId>
+    <version>2.6</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+  </properties>
+
+  <artifactId>mcf-contentlimiter-connector</artifactId>
+  <name>ManifoldCF - Connectors - Content Limiter</name>
+
+  <build>
+    <defaultGoal>integration-test</defaultGoal>
+    <sourceDirectory>${basedir}/connector/src/main/java</sourceDirectory>
+    <testSourceDirectory>${basedir}/connector/src/test/java</testSourceDirectory>
+    <resources>
+      <resource>
+        <directory>${basedir}/connector/src/main/native2ascii</directory>
+        <includes>
+          <include>**/*.properties</include>
+        </includes>
+      </resource>
+      <resource>
+        <directory>${basedir}/connector/src/main/resources</directory>
+        <includes>
+          <include>**/*.html</include>
+          <include>**/*.js</include>
+        </includes>
+      </resource>
+    </resources> 
+    <testResources>
+      <testResource>
+        <directory>${basedir}/connector/src/test/resources</directory>
+      </testResource>
+    </testResources>
+
+    <plugins>
+
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>native2ascii-maven-plugin</artifactId>
+        <version>1.0-beta-1</version>
+        <configuration>
+            <workDir>target/classes</workDir>
+        </configuration>
+        <executions>
+            <execution>
+                <id>native2ascii-utf8</id>
+                <goals>
+                    <goal>native2ascii</goal>
+                </goals>
+                <configuration>
+                    <encoding>UTF8</encoding>
+                    <includes>
+                      <include>**/*.properties</include>
+                    </includes>
+                </configuration>
+            </execution>
+        </executions>
+      </plugin>
+
+      <!-- Test plugin configuration -->
+      <plugin>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <executions>
+           <execution>
+            <id>copy-war</id>
+            <phase>generate-resources</phase>
+            <goals>
+              <goal>copy</goal>
+            </goals>
+            <configuration>
+              <outputDirectory>target/dependency</outputDirectory>
+              <artifactItems>
+                <artifactItem>
+                  <groupId>${project.groupId}</groupId>
+                  <artifactId>mcf-api-service</artifactId>
+                  <version>${project.version}</version>
+                  <type>war</type>
+                  <overWrite>false</overWrite>
+                  <destFileName>mcf-api-service.war</destFileName>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>${project.groupId}</groupId>
+                  <artifactId>mcf-authority-service</artifactId>
+                  <version>${project.version}</version>
+                  <type>war</type>
+                  <overWrite>false</overWrite>
+                  <destFileName>mcf-authority-service.war</destFileName>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>${project.groupId}</groupId>
+                  <artifactId>mcf-crawler-ui</artifactId>
+                  <version>${project.version}</version>
+                  <type>war</type>
+                  <overWrite>false</overWrite>
+                  <destFileName>mcf-crawler-ui.war</destFileName>
+                </artifactItem>
+              </artifactItems>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <excludes>
+            <exclude>**/*Postgresql*.java</exclude>
+            <exclude>**/*MySQL*.java</exclude>
+          </excludes>
+          <forkCount>1</forkCount>
+          <reuseForks>false</reuseForks>
+          <workingDirectory>target/test-output</workingDirectory>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-failsafe-plugin</artifactId>
+        <version>2.18.1</version>
+        <configuration>
+          <skipTests>${skipITs}</skipTests>
+          <systemPropertyVariables>
+            <crawlerWarPath>../dependency/mcf-crawler-ui.war</crawlerWarPath>
+            <authorityserviceWarPath>../dependency/mcf-authority-service.war</authorityserviceWarPath>
+            <apiWarPath>../dependency/mcf-api-service.war</apiWarPath>
+          </systemPropertyVariables>
+          <excludes>
+            <exclude>**/*Postgresql*.java</exclude>
+            <exclude>**/*MySQL*.java</exclude>
+          </excludes>
+          <forkCount>1</forkCount>
+          <reuseForks>false</reuseForks>
+          <workingDirectory>target/test-output</workingDirectory>
+        </configuration>
+        <executions>
+          <execution>
+            <id>integration-test</id>
+            <goals>
+              <goal>integration-test</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>verify</id>
+            <goals>
+              <goal>verify</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+
+    </plugins>
+  </build>
+  
+  <dependencies>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>mcf-core</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>mcf-connector-common</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>mcf-agents</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>mcf-ui-core</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    
+    <!-- Testing dependencies -->
+    
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>${junit.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>mcf-core</artifactId>
+      <version>${project.version}</version>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>mcf-agents</artifactId>
+      <version>${project.version}</version>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>mcf-pull-agent</artifactId>
+      <version>${project.version}</version>
+      <type>jar</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>mcf-pull-agent</artifactId>
+      <version>${project.version}</version>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>postgresql</groupId>
+      <artifactId>postgresql</artifactId>
+      <version>${postgresql.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.hsqldb</groupId>
+      <artifactId>hsqldb</artifactId>
+      <version>${hsqldb.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>mysql</groupId>
+      <artifactId>mysql-connector-java</artifactId>
+      <version>${mysql.version}</version>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>mcf-api-service</artifactId>
+      <version>${project.version}</version>
+      <type>war</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>mcf-authority-service</artifactId>
+      <version>${project.version}</version>
+      <type>war</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>mcf-crawler-ui</artifactId>
+      <version>${project.version}</version>
+      <type>war</type>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-server</artifactId>
+      <version>${jetty.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-util</artifactId>
+      <version>${jetty.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-webapp</artifactId>
+      <version>${jetty.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-servlet</artifactId>
+      <version>${jetty.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-http</artifactId>
+      <version>${jetty.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-io</artifactId>
+      <version>${jetty.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-security</artifactId>
+      <version>${jetty.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-continuation</artifactId>
+      <version>${jetty.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-xml</artifactId>
+      <version>${jetty.version}</version>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.mortbay.jetty</groupId>
+      <artifactId>jsp-api-2.1-glassfish</artifactId>
+      <version>${glassfish.version}</version>
+      <scope>test</scope>
+    </dependency>    
+    <dependency>
+      <groupId>org.mortbay.jetty</groupId>
+      <artifactId>jsp-2.1-glassfish</artifactId>
+      <version>${glassfish.version}</version>
+      <scope>test</scope>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+      <version>${slf4j.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <version>${slf4j.version}</version>
+      <scope>test</scope>
+    </dependency>
+
+  </dependencies>
+</project>



Mime
View raw message