You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2013/09/22 16:26:13 UTC
svn commit: r1525367 - in /manifoldcf/branches/CONNECTORS-778:
connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/
framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/
framework/pul...
Author: kwright
Date: Sun Sep 22 14:26:13 2013
New Revision: 1525367
URL: http://svn.apache.org/r1525367
Log:
Improve javadoc, and get the basic connector running again.
Modified:
manifoldcf/branches/CONNECTORS-778/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
manifoldcf/branches/CONNECTORS-778/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IJobManager.java
manifoldcf/branches/CONNECTORS-778/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IProcessActivity.java
manifoldcf/branches/CONNECTORS-778/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java
Modified: manifoldcf/branches/CONNECTORS-778/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-778/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java?rev=1525367&r1=1525366&r2=1525367&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-778/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java (original)
+++ manifoldcf/branches/CONNECTORS-778/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java Sun Sep 22 14:26:13 2013
@@ -1257,7 +1257,7 @@ public class SharePointRepository extend
if (accessTokens != null)
{
ListItemStream fs = new ListItemStream( activities, encodedServerLocation, site, siteListPath, spec,
- accessTokens, denyTokens, listID, fields );
+ documentIdentifier, accessTokens, denyTokens, listID, fields );
boolean success = proxy.getChildren( fs, encodedSitePath , listID, dspStsWorks );
if (!success)
{
@@ -1316,8 +1316,8 @@ public class SharePointRepository extend
int startPosition = unpackList(metadataDescription,version,0,'+');
// Acls
- ArrayList acls = null;
- ArrayList denyAcls = null;
+ ArrayList acls = new ArrayList();
+ ArrayList denyAcls = new ArrayList();
startPosition = unpackList(acls,version,startPosition,'+');
startPosition = unpackList(denyAcls,version,startPosition,'+');
@@ -1385,7 +1385,7 @@ public class SharePointRepository extend
dataValues[4] = new String[]{attachmentName.getPrettyName()};
activities.addDocumentReference(documentIdentifier + "/" + attachmentName.getValue(),
- null, null, dataNames, dataValues);
+ documentIdentifier, null, dataNames, dataValues);
}
}
@@ -1581,7 +1581,7 @@ public class SharePointRepository extend
if (accessTokens != null)
{
FileStream fs = new FileStream( activities, encodedServerLocation, site, siteLibPath, spec,
- accessTokens, denyTokens, libID, fields );
+ documentIdentifier, accessTokens, denyTokens, libID, fields );
boolean success = proxy.getChildren( fs, encodedSitePath , libID, dspStsWorks );
if (!success)
{
@@ -1633,8 +1633,8 @@ public class SharePointRepository extend
int startPosition = unpackList(metadataDescription,version,0,'+');
// Acls
- ArrayList acls = null;
- ArrayList denyAcls = null;
+ ArrayList acls = new ArrayList();
+ ArrayList denyAcls = new ArrayList();
startPosition = unpackList(acls,version,startPosition,'+');
startPosition = unpackList(denyAcls,version,startPosition,'+');
@@ -2101,16 +2101,18 @@ public class SharePointRepository extend
protected final String siteLibPath;
// For carry-down
+ protected final String documentIdentifier;
protected final String[][] dataValues;
public FileStream(IProcessActivity activities, String rootPath, String sitePath, String siteLibPath, DocumentSpecification spec,
- String[] accessTokens, String denyTokens[], String libID, String[] fields)
+ String documentIdentifier, String[] accessTokens, String denyTokens[], String libID, String[] fields)
{
this.activities = activities;
this.spec = spec;
this.rootPath = rootPath;
this.sitePath = sitePath;
this.siteLibPath = siteLibPath;
+ this.documentIdentifier = documentIdentifier;
this.dataValues = new String[fileStreamDataNames.length][];
this.dataValues[0] = accessTokens;
this.dataValues[1] = denyTokens;
@@ -2141,7 +2143,7 @@ public class SharePointRepository extend
{
// Split at the libpath/file boundary
String modifiedPath = siteLibPath + "/" + relPath.substring(siteLibPath.length());
- activities.addDocumentReference( modifiedPath, null, null, fileStreamDataNames, dataValues );
+ activities.addDocumentReference( modifiedPath, documentIdentifier, null, fileStreamDataNames, dataValues );
}
else
{
@@ -2167,16 +2169,18 @@ public class SharePointRepository extend
protected final String siteListPath;
// For carry-down
+ protected final String documentIdentifier;
protected final String[][] dataValues;
public ListItemStream(IProcessActivity activities, String rootPath, String sitePath, String siteListPath, DocumentSpecification spec,
- String[] accessTokens, String denyTokens[], String listID, String[] fields)
+ String documentIdentifier, String[] accessTokens, String denyTokens[], String listID, String[] fields)
{
this.activities = activities;
this.spec = spec;
this.rootPath = rootPath;
this.sitePath = sitePath;
this.siteListPath = siteListPath;
+ this.documentIdentifier = documentIdentifier;
this.dataValues = new String[listItemStreamDataNames.length][];
this.dataValues[0] = accessTokens;
this.dataValues[1] = denyTokens;
@@ -2214,7 +2218,7 @@ public class SharePointRepository extend
// The way I've chosen to do this is to use a triple slash at that point, as a separator.
String modifiedPath = relPath.substring(0,siteListPath.length()) + "//" + relPath.substring(siteListPath.length());
- activities.addDocumentReference( modifiedPath, null, null, listItemStreamDataNames, dataValues );
+ activities.addDocumentReference( modifiedPath, documentIdentifier, null, listItemStreamDataNames, dataValues );
}
else
{
Modified: manifoldcf/branches/CONNECTORS-778/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IJobManager.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-778/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IJobManager.java?rev=1525367&r1=1525366&r2=1525367&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-778/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IJobManager.java (original)
+++ manifoldcf/branches/CONNECTORS-778/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IJobManager.java Sun Sep 22 14:26:13 2013
@@ -582,6 +582,7 @@ public interface IJobManager
*@param legalLinkTypes is the set of legal link types that this connector generates.
*@param docIDHash is the local document identifier hash value.
*@param parentIdentifierHash is the optional parent identifier hash value for this document. Pass null if none.
+ * MUST be present in the case of carrydown information.
*@param relationshipType is the optional link type between this document and its parent. Pass null if there
* is no relationship with a parent.
*@param hopcountMethod is either accurate, nodelete, or neverdelete.
@@ -610,6 +611,7 @@ public interface IJobManager
*@param docIDHashes are the hashes of the local document identifiers.
*@param docIDs are the local document identifiers.
*@param parentIdentifierHash is the optional parent identifier hash of these documents. Pass null if none.
+ * MUST be present in the case of carrydown information.
*@param relationshipType is the optional link type between this document and its parent. Pass null if there
* is no relationship with a parent.
*@param hopcountMethod is either accurate, nodelete, or neverdelete.
Modified: manifoldcf/branches/CONNECTORS-778/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IProcessActivity.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-778/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IProcessActivity.java?rev=1525367&r1=1525366&r2=1525367&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-778/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IProcessActivity.java (original)
+++ manifoldcf/branches/CONNECTORS-778/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IProcessActivity.java Sun Sep 22 14:26:13 2013
@@ -33,6 +33,7 @@ public interface IProcessActivity extend
* fetched the document).
*@param parentIdentifier is the document identifier that is considered to be the "parent"
* of this identifier. May be null, if no hopcount filtering desired for this kind of relationship.
+ * MUST be present in the case of carrydown information.
*@param relationshipType is the string describing the kind of relationship described by this
* reference. This must be one of the strings returned by the IRepositoryConnector method
* "getRelationshipTypes()". May be null.
@@ -51,6 +52,7 @@ public interface IProcessActivity extend
* fetched the document).
*@param parentIdentifier is the document identifier that is considered to be the "parent"
* of this identifier. May be null, if no hopcount filtering desired for this kind of relationship.
+ * MUST be present in the case of carrydown information.
*@param relationshipType is the string describing the kind of relationship described by this
* reference. This must be one of the strings returned by the IRepositoryConnector method
* "getRelationshipTypes()". May be null.
@@ -69,6 +71,7 @@ public interface IProcessActivity extend
* fetched the document).
*@param parentIdentifier is the document identifier that is considered to be the "parent"
* of this identifier. May be null, if no hopcount filtering desired for this kind of relationship.
+ * MUST be present in the case of carrydown information.
*@param relationshipType is the string describing the kind of relationship described by this
* reference. This must be one of the strings returned by the IRepositoryConnector method
* "getRelationshipTypes()". May be null.
Modified: manifoldcf/branches/CONNECTORS-778/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-778/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java?rev=1525367&r1=1525366&r2=1525367&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-778/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java (original)
+++ manifoldcf/branches/CONNECTORS-778/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java Sun Sep 22 14:26:13 2013
@@ -3971,7 +3971,8 @@ public class JobManager implements IJobM
*@param jobID is the job identifier.
*@param legalLinkTypes is the set of legal link types that this connector generates.
*@param docIDHashes are the local document identifier hashes.
- *@param parentIdentifierHash is the optional parent identifier hash of this document. Pass null if none.
+ *@param parentIdentifierHash is the optional parent identifier hash of this document. Pass null if none.
+ * MUST be present in the case of carrydown information.
*@param relationshipType is the optional link type between this document and its parent. Pass null if there
* is no relationship with a parent.
*@param hopcountMethod is the desired method for managing hopcounts.
@@ -4263,6 +4264,7 @@ public class JobManager implements IJobM
*@param legalLinkTypes is the set of legal link types that this connector generates.
*@param docIDHash is the local document identifier hash value.
*@param parentIdentifierHash is the optional parent identifier hash of this document. Pass null if none.
+ * MUST be present in the case of carrydown information.
*@param relationshipType is the optional link type between this document and its parent. Pass null if there
* is no relationship with a parent.
*@param hopcountMethod is the desired method for managing hopcounts.