manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1630555 - in /manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main: java/org/apache/manifoldcf/agents/transformation/documentfilter/ native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/ resou...
Date Thu, 09 Oct 2014 18:54:44 GMT
Author: kwright
Date: Thu Oct  9 18:54:44 2014
New Revision: 1630555

URL: http://svn.apache.org/r1630555
Log:
Add minimum date output

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/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_en_US.properties
    manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_ja_JP.properties
    manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_zh_CN.properties
    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=1630555&r1=1630554&r2=1630555&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 18:54:44 2014
@@ -171,6 +171,7 @@ public class DocumentFilter extends org.
     String maxFileSize = DocumentFilterConfig.MAXLENGTH_DEFAULT;
     String allowedMimeTypes = DocumentFilterConfig.MIMETYPES_DEFAULT;
     String allowedFileExtensions = DocumentFilterConfig.EXTENSIONS_DEFAULT;
+    Long minDate = null;
     for (int i = 0; i < os.getChildCount(); i++)
     {
       SpecificationNode sn = os.getChild(i);
@@ -182,11 +183,21 @@ public class DocumentFilter extends org.
         allowedMimeTypes = sn.getValue();
       else if (sn.getType().equals(DocumentFilterConfig.NODE_EXTENSIONS))
         allowedFileExtensions = sn.getValue();
+      else if (sn.getType().equals(DocumentFilterConfig.NODE_MINDATE))
+        minDate = new Long(sn.getAttributeValue(DocumentFilterConfig.ATTRIBUTE_VALUE));
     }
     paramMap.put("MINFILESIZE",minFileSize);
     paramMap.put("MAXFILESIZE",maxFileSize);
     paramMap.put("MIMETYPES",allowedMimeTypes);
     paramMap.put("EXTENSIONS",allowedFileExtensions);
+    
+    Calendar c = new GregorianCalendar();
+    c.setTimeInMillis((minDate==null)?0L:minDate.longValue());
+    paramMap.put("MINDATEYEAR",Integer.toString(c.get(Calendar.YEAR)));
+    paramMap.put("MINDATEMONTH",Integer.toString(c.get(Calendar.MONTH)));
+    paramMap.put("MINDATEDAY",Integer.toString(c.get(Calendar.DAY_OF_MONTH)));
+    paramMap.put("MINDATEHOUR",Integer.toString(c.get(Calendar.HOUR_OF_DAY)));
+    paramMap.put("MINDATEMINUTE",String.format("%02d",c.get(Calendar.MINUTE)));
   }
   
   /** Obtain the name of the form check javascript method to call.

Modified: manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_en_US.properties
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_en_US.properties?rev=1630555&r1=1630554&r2=1630555&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_en_US.properties
(original)
+++ manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_en_US.properties
Thu Oct  9 18:54:44 2014
@@ -18,3 +18,17 @@ DocumentFilter.MinFileSizeBytesColon=Min
 DocumentFilter.MaxFileSizeBytesColon=Max file size (bytes):
 DocumentFilter.AllowedMIMETypesColon=Allowed MIME types:
 DocumentFilter.AllowedFileExtensionsColon=Allowed file extensions:
+
+DocumentFilter.MinDateColon=Minimum document date:
+DocumentFilter.Month_0=January
+DocumentFilter.Month_1=February
+DocumentFilter.Month_2=March
+DocumentFilter.Month_3=April
+DocumentFilter.Month_4=May
+DocumentFilter.Month_5=June
+DocumentFilter.Month_6=July
+DocumentFilter.Month_7=August
+DocumentFilter.Month_8=September
+DocumentFilter.Month_9=October
+DocumentFilter.Month_10=November
+DocumentFilter.Month_11=December

Modified: manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_ja_JP.properties
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_ja_JP.properties?rev=1630555&r1=1630554&r2=1630555&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_ja_JP.properties
(original)
+++ manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_ja_JP.properties
Thu Oct  9 18:54:44 2014
@@ -18,3 +18,17 @@ DocumentFilter.MinFileSizeBytesColon=æ�
 DocumentFilter.MaxFileSizeBytesColon=最大ファイルサイズ
(バイト):
 DocumentFilter.AllowedMIMETypesColon=利用可能なMIMEタイプ:
 DocumentFilter.AllowedFileExtensionsColon=利用可能なファイル拡張子:
+
+DocumentFilter.MinDateColon=Minimum document date:
+DocumentFilter.Month_0=January
+DocumentFilter.Month_1=February
+DocumentFilter.Month_2=March
+DocumentFilter.Month_3=April
+DocumentFilter.Month_4=May
+DocumentFilter.Month_5=June
+DocumentFilter.Month_6=July
+DocumentFilter.Month_7=August
+DocumentFilter.Month_8=September
+DocumentFilter.Month_9=October
+DocumentFilter.Month_10=November
+DocumentFilter.Month_11=December

Modified: manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_zh_CN.properties
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_zh_CN.properties?rev=1630555&r1=1630554&r2=1630555&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_zh_CN.properties
(original)
+++ manifoldcf/branches/CONNECTORS-1068/connectors/documentfilter/connector/src/main/native2ascii/org/apache/manifoldcf/agents/transformation/documentfilter/common_zh_CN.properties
Thu Oct  9 18:54:44 2014
@@ -18,3 +18,17 @@ DocumentFilter.MinFileSizeBytesColon=æ�
 DocumentFilter.MaxFileSizeBytesColon=最大文件大小(字节):
 DocumentFilter.AllowedMIMETypesColon=可利用的MIME类型:
 DocumentFilter.AllowedFileExtensionsColon=可利用的文件扩展名:
+
+DocumentFilter.MinDateColon=Minimum document date:
+DocumentFilter.Month_0=January
+DocumentFilter.Month_1=February
+DocumentFilter.Month_2=March
+DocumentFilter.Month_3=April
+DocumentFilter.Month_4=May
+DocumentFilter.Month_5=June
+DocumentFilter.Month_6=July
+DocumentFilter.Month_7=August
+DocumentFilter.Month_8=September
+DocumentFilter.Month_9=October
+DocumentFilter.Month_10=November
+DocumentFilter.Month_11=December

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=1630555&r1=1630554&r2=1630555&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 18:54:44 2014
@@ -15,8 +15,16 @@
  limitations under the License.
 -->
 
+#set ($month = "DocumentFilter.Month_${MINDATEMONTH}")
 <table class="displaytable">
   <tr>
+    <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('DocumentFilter.MinDateColon'))</nobr></td>
+    <td class="value">
+      <nobr>
+        $MINDATEYEAR $Encoder.bodyEscape($ResourceBundle.getString($month)) $MINDATEDAY $MINDATEHOUR:$MINDATEMINUTE
+      </nobr></td>
+  </tr>
+  <tr>
     <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('DocumentFilter.MinFileSizeBytesColon'))</nobr></td>
     <td class="value">$Encoder.bodyEscape($MINFILESIZE)</td>
   </tr>



Mime
View raw message