Author: kwright
Date: Tue Jun 21 14:17:47 2016
New Revision: 1749522
URL: http://svn.apache.org/viewvc?rev=1749522&view=rev
Log:
Fix for CONNECTORS-1324.
Modified:
manifoldcf/trunk/CHANGES.txt
manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
Modified: manifoldcf/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1749522&r1=1749521&r2=1749522&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Tue Jun 21 14:17:47 2016
@@ -3,6 +3,10 @@ $Id$
======================= 2.5-dev =====================
+CONNECTORS-1324: Fix (again) the SharePoint connector's "use all metadata"
+option.
+(Konstantin Avdeev)
+
CONNECTORS-1323: When there were multiple outputs, the second,
third, etc outputs would not have their activities properly logged.
(Karl Wright)
Modified:
manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
URL:
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java?rev=1749522&r1=1749521&r2=1749522&view=diff
==============================================================================
---
manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
(original)
+++
manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
Tue Jun 21 14:17:47 2016
@@ -852,12 +852,15 @@ public class SharePointRepository extend
continue;
}
+ // Note well: There's been a lot of back-and forth about this code.
+ // See CONNECTORS-1324.
+ // The fieldNames map returned by proxy.getFieldList() has the
internal name as a key, and the display name as a value.
+ // Since we want the complete list of fields here, by *internal*
name, we iterate over the keySet(), not the values.
String[] fields = new String[fieldNames.size()];
int j = 0;
for (String field : fieldNames.keySet())
{
- String value = fieldNames.get(field);
- fields[j++] = (value==null)?field:value;
+ fields[j++] = field;
}
String[] accessTokens;
@@ -958,6 +961,7 @@ public class SharePointRepository extend
continue;
}
+ // Get the fields we want (internal field names only at this
point), given the list of all fields (internal field names again).
String[] sortedMetadataFields =
getInterestingFieldSetSorted(metadataInfo,listFields);
// Sort access tokens so they are comparable in the version
string
@@ -1305,12 +1309,13 @@ public class SharePointRepository extend
continue;
}
+ // See CONNECTORS-1324. We want internal field names only,
+ // which are the keys of the map.
String[] fields = new String[fieldNames.size()];
int j = 0;
for (String field : fieldNames.keySet())
{
- String value = fieldNames.get(field);
- fields[j++] = (value==null)?field:value;
+ fields[j++] = field;
}
String[] accessTokens;
@@ -1403,6 +1408,7 @@ public class SharePointRepository extend
}
String encodedSitePath = encodePath(sitePath);
+ // Get the fields we want (internal field names only at this
point), given the list of all fields (internal field names again).
String[] sortedMetadataFields =
getInterestingFieldSetSorted(metadataInfo,libFields);
// Sort access tokens