manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1791604 - in /manifoldcf/branches/release-2.7-branch: ./ connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/
Date Sun, 16 Apr 2017 12:08:18 GMT
Author: kwright
Date: Sun Apr 16 12:08:18 2017
New Revision: 1791604

URL: http://svn.apache.org/viewvc?rev=1791604&view=rev
Log:
Pull up additional change for CONNECTORS-1405

Modified:
    manifoldcf/branches/release-2.7-branch/   (props changed)
    manifoldcf/branches/release-2.7-branch/CHANGES.txt
    manifoldcf/branches/release-2.7-branch/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConfig.java
    manifoldcf/branches/release-2.7-branch/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConnector.java

Propchange: manifoldcf/branches/release-2.7-branch/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Apr 16 12:08:18 2017
@@ -142,4 +142,4 @@
 /manifoldcf/branches/CONNECTORS-981:1605049-1605773
 /manifoldcf/branches/CONNECTORS-989:1611600-1612101
 /manifoldcf/branches/CONNECTORS-990:1610284-1610707
-/manifoldcf/trunk:1791542,1791548
+/manifoldcf/trunk:1791542,1791548,1791603

Modified: manifoldcf/branches/release-2.7-branch/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/branches/release-2.7-branch/CHANGES.txt?rev=1791604&r1=1791603&r2=1791604&view=diff
==============================================================================
--- manifoldcf/branches/release-2.7-branch/CHANGES.txt (original)
+++ manifoldcf/branches/release-2.7-branch/CHANGES.txt Sun Apr 16 12:08:18 2017
@@ -19,7 +19,7 @@ CONNECTORS-1407: Extract email addresses
 CONNECTORS-1406: Fix multiple To and From field bug at email.
 (Furkan KAMACI)
 
-CONNECTORS-1405: Add filename metadata information for email.
+CONNECTORS-1405: Add file name of attachment metadata information for email.
 (Furkan KAMACI)
 
 CONNECTORS-1402: Add metadata information for email attachments.

Modified: manifoldcf/branches/release-2.7-branch/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConfig.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/release-2.7-branch/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConfig.java?rev=1791604&r1=1791603&r2=1791604&view=diff
==============================================================================
--- manifoldcf/branches/release-2.7-branch/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConfig.java
(original)
+++ manifoldcf/branches/release-2.7-branch/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConfig.java
Sun Apr 16 12:08:18 2017
@@ -101,7 +101,7 @@ public class EmailConfig {
   public static final String EMAIL_DATE = "date";
   public static final String EMAIL_ATTACHMENT_ENCODING = "encoding of attachment";
   public static final String EMAIL_ATTACHMENT_MIMETYPE = "mime type of attachment";
-  public static final String EMAIL_ATTACHMENT_FILENAME = "file name of attachment";
+  public static final String EMAIL_ATTACHMENTNAME = "file name of attachment";
   public static final String EMAIL_VERSION = "1.0";
 
   // Date field names for filtering
@@ -118,7 +118,7 @@ public class EmailConfig {
   
   public static final String ENCODING_FIELD = "encoding";
   public static final String MIMETYPE_FIELD = "mimetype";
-  public static final String FILENAME_FIELD = "filename";
+  public static final String ATTACHMENTNAME_FIELD = "attachmentname";
   public static final String MAILSUBJECT_FIELD = "mailsubject";
   //public static final String TO = "To";
   

Modified: manifoldcf/branches/release-2.7-branch/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/release-2.7-branch/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConnector.java?rev=1791604&r1=1791603&r2=1791604&view=diff
==============================================================================
--- manifoldcf/branches/release-2.7-branch/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConnector.java
(original)
+++ manifoldcf/branches/release-2.7-branch/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConnector.java
Sun Apr 16 12:08:18 2017
@@ -660,21 +660,21 @@ public class EmailConnector extends org.
                       rd.addField(EmailConfig.MIMETYPE_FIELD, "");
                     }
                   }
-                } else if (metadata.toLowerCase(Locale.ROOT).equals(EmailConfig.EMAIL_ATTACHMENT_FILENAME))
{
+                } else if (metadata.toLowerCase(Locale.ROOT).equals(EmailConfig.EMAIL_ATTACHMENTNAME))
{
                   Object o = msg.getContent();
                   if (o != null) {
                     if (o instanceof Multipart) {
                       Multipart mp = (Multipart) o;
-                      String[] fileNames = new String[mp.getCount()];
+                      String[] attachmentNames = new String[mp.getCount()];
                       for (int k = 0, n = mp.getCount(); k < n; k++) {
                         Part part = mp.getBodyPart(k);
                         if (isAttachment(part)) {
-                          fileNames[k] = part.getFileName();
+                          attachmentNames[k] = part.getFileName();
                         }
                       }
-                      rd.addField(EmailConfig.FILENAME_FIELD, fileNames);
+                      rd.addField(EmailConfig.ATTACHMENTNAME_FIELD, attachmentNames);
                     } else if (o instanceof String) {
-                      rd.addField(EmailConfig.FILENAME_FIELD, "");
+                      rd.addField(EmailConfig.ATTACHMENTNAME_FIELD, "");
                     }
                   }
                 }



Mime
View raw message