Return-Path: X-Original-To: apmail-manifoldcf-commits-archive@www.apache.org Delivered-To: apmail-manifoldcf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CE646174DF for ; Thu, 9 Oct 2014 22:54:57 +0000 (UTC) Received: (qmail 49318 invoked by uid 500); 9 Oct 2014 22:54:57 -0000 Delivered-To: apmail-manifoldcf-commits-archive@manifoldcf.apache.org Received: (qmail 49272 invoked by uid 500); 9 Oct 2014 22:54:57 -0000 Mailing-List: contact commits-help@manifoldcf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@manifoldcf.apache.org Delivered-To: mailing list commits@manifoldcf.apache.org Received: (qmail 49263 invoked by uid 99); 9 Oct 2014 22:54:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Oct 2014 22:54:57 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Oct 2014 22:54:34 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 9977F23889E0; Thu, 9 Oct 2014 22:54:32 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1630613 - in /manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main: java/org/apache/manifoldcf/agents/transformation/documentfilter/ resources/org/apache/manifoldcf/agents/transformation/documentfilter/ Date: Thu, 09 Oct 2014 22:54:32 -0000 To: commits@manifoldcf.apache.org From: kwright@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20141009225432.9977F23889E0@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kwright Date: Thu Oct 9 22:54:32 2014 New Revision: 1630613 URL: http://svn.apache.org/r1630613 Log: Add minimum date editing and viewing code Modified: manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/DocumentFilter.java manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/editSpecification_Contents.html manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/viewSpecification.html Modified: manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/DocumentFilter.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/DocumentFilter.java?rev=1630613&r1=1630612&r2=1630613&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/DocumentFilter.java (original) +++ manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/DocumentFilter.java Thu Oct 9 22:54:32 2014 @@ -289,6 +289,36 @@ public class DocumentFilter extends org. throws ManifoldCFException { String seqPrefix = "s"+connectionSequenceNumber+"_"; + String minDateYear = variableContext.getParameter(seqPrefix+"mindateyear"); + String minDateMonth = variableContext.getParameter(seqPrefix+"mindatemonth"); + String minDateDay = variableContext.getParameter(seqPrefix + "mindateday"); + String minDateHour = variableContext.getParameter(seqPrefix + "mindatehour"); + String minDateMinute = variableContext.getParameter(seqPrefix + "mindateminute"); + if (minDateYear != null && minDateMonth != null && minDateDay != null && minDateHour != null && minDateMinute != null) + { + Calendar c = new GregorianCalendar(); + try + { + c.set(Integer.parseInt(minDateYear),Integer.parseInt(minDateMonth),Integer.parseInt(minDateDay),Integer.parseInt(minDateHour),Integer.parseInt(minDateMinute)); + } + catch (Exception e) + { + } + long theTime = c.getTimeInMillis(); + int i = 0; + while (i < os.getChildCount()) + { + SpecificationNode node = os.getChild(i); + if (node.getType().equals(DocumentFilterConfig.NODE_MINDATE)) + os.removeChild(i); + else + i++; + } + SpecificationNode sn = new SpecificationNode(DocumentFilterConfig.NODE_MINDATE); + sn.setAttribute(DocumentFilterConfig.ATTRIBUTE_VALUE,new Long(theTime).toString()); + os.addChild(os.getChildCount(),sn); + } + String x; x = variableContext.getParameter(seqPrefix+"minfilesize"); Modified: manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/editSpecification_Contents.html URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/editSpecification_Contents.html?rev=1630613&r1=1630612&r2=1630613&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/editSpecification_Contents.html (original) +++ manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/editSpecification_Contents.html Thu Oct 9 22:54:32 2014 @@ -19,6 +19,61 @@ + + + + Modified: manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/viewSpecification.html URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/viewSpecification.html?rev=1630613&r1=1630612&r2=1630613&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/viewSpecification.html (original) +++ manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/documentfilter/viewSpecification.html Thu Oct 9 22:54:32 2014 @@ -22,7 +22,8 @@ + +
$Encoder.bodyEscape($ResourceBundle.getString('DocumentFilter.MinDateColon')) + + + + + + : + + +
$Encoder.bodyEscape($ResourceBundle.getString('DocumentFilter.MinFileSizeBytesColon')) $MINDATEYEAR $Encoder.bodyEscape($ResourceBundle.getString($month)) $MINDATEDAY $MINDATEHOUR:$MINDATEMINUTE -
$Encoder.bodyEscape($ResourceBundle.getString('DocumentFilter.MinFileSizeBytesColon'))