Author: kwright
Date: Tue Sep 10 10:52:25 2013
New Revision: 1521432
URL: http://svn.apache.org/r1521432
Log:
Add pull-down option for selecting Amazon version of SharePoint 2010.
Modified:
manifoldcf/branches/CONNECTORS-772/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SPSProxyHelper.java
manifoldcf/branches/CONNECTORS-772/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
Modified:
manifoldcf/branches/CONNECTORS-772/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SPSProxyHelper.java
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-772/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SPSProxyHelper.java?rev=1521432&r1=1521431&r2=1521432&view=diff
==============================================================================
---
manifoldcf/branches/CONNECTORS-772/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SPSProxyHelper.java
(original)
+++
manifoldcf/branches/CONNECTORS-772/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SPSProxyHelper.java
Tue Sep 10 10:52:25 2013
@@ -776,7 +776,7 @@ public class SPSProxyHelper {
* @throws ManifoldCFException
* @throws ServiceInterruption
*/
- public String getDocLibID(String parentSite, String parentSiteDecoded,
String docLibrary)
+ public String getDocLibID(String parentSite, String parentSiteDecoded,
String docLibrary, boolean fullListPaths)
throws ServiceInterruption, ManifoldCFException
{
long currentTime;
@@ -815,7 +815,7 @@ public class SPSProxyHelper {
nodeList.clear();
doc.processPath(nodeList, "*", parent); // <ns1:Lists>
- int chuckIndex = 0; //decodedServerLocation.length() +
parentSiteDecoded.length();
+ int chuckIndex = fullListPaths?decodedServerLocation.length() +
parentSiteDecoded.length():0;
int i = 0;
while (i < nodeList.size())
@@ -965,7 +965,7 @@ public class SPSProxyHelper {
* @throws ManifoldCFException
* @throws ServiceInterruption
*/
- public String getListID(String parentSite, String parentSiteDecoded, String
listName)
+ public String getListID(String parentSite, String parentSiteDecoded, String
listName, boolean fullListPaths)
throws ServiceInterruption, ManifoldCFException
{
long currentTime;
@@ -1004,7 +1004,7 @@ public class SPSProxyHelper {
nodeList.clear();
doc.processPath(nodeList, "*", parent); // <ns1:Lists>
- int chuckIndex = 0; //decodedServerLocation.length() +
parentSiteDecoded.length();
+ int chuckIndex = fullListPaths?decodedServerLocation.length() +
parentSiteDecoded.length():0;
int i = 0;
while (i < nodeList.size())
@@ -2068,7 +2068,7 @@ public class SPSProxyHelper {
* @param parentSite the site to search for document libraries, empty string
for root
* @return lists of NameValue objects, representing document libraries
*/
- public ArrayList getDocumentLibraries( String parentSite, String
parentSiteDecoded )
+ public ArrayList getDocumentLibraries( String parentSite, String
parentSiteDecoded, boolean fullListPaths )
throws ManifoldCFException, ServiceInterruption
{
long currentTime;
@@ -2107,7 +2107,7 @@ public class SPSProxyHelper {
nodeList.clear();
doc.processPath(nodeList, "*", parent); // <ns1:Lists>
- int chuckIndex = 0; //decodedServerLocation.length() +
parentSiteDecoded.length();
+ int chuckIndex = fullListPaths?decodedServerLocation.length() +
parentSiteDecoded.length():0;
int i = 0;
while (i < nodeList.size())
@@ -2212,7 +2212,7 @@ public class SPSProxyHelper {
* @param parentSite the site to search for lists, empty string for root
* @return lists of NameValue objects, representing lists
*/
- public ArrayList getLists( String parentSite, String parentSiteDecoded )
+ public ArrayList getLists( String parentSite, String parentSiteDecoded,
boolean fullListPaths )
throws ManifoldCFException, ServiceInterruption
{
long currentTime;
@@ -2251,7 +2251,7 @@ public class SPSProxyHelper {
nodeList.clear();
doc.processPath(nodeList, "*", parent); // <ns1:Lists>
- int chuckIndex = 0; //decodedServerLocation.length() +
parentSiteDecoded.length();
+ int chuckIndex = fullListPaths?decodedServerLocation.length() +
parentSiteDecoded.length():0;
int i = 0;
while (i < nodeList.size())
Modified:
manifoldcf/branches/CONNECTORS-772/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-772/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java?rev=1521432&r1=1521431&r2=1521432&view=diff
==============================================================================
---
manifoldcf/branches/CONNECTORS-772/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
(original)
+++
manifoldcf/branches/CONNECTORS-772/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
Tue Sep 10 10:52:25 2013
@@ -85,6 +85,8 @@ public class SharePointRepository extend
private boolean supportsItemSecurity = false;
private boolean dspStsWorks = true;
+ private boolean fullListPaths = true;
+
private String serverProtocol = null;
private String serverUrl = null;
private String fileBaseUrl = null;
@@ -145,6 +147,7 @@ public class SharePointRepository extend
serverVersion = "2.0";
supportsItemSecurity = !serverVersion.equals("2.0");
dspStsWorks = !serverVersion.equals("4.0");
+ fullListPaths = !serverVersion.equals("4.0AWS");
serverProtocol = params.getParameter( "serverProtocol" );
if (serverProtocol == null)
@@ -756,7 +759,7 @@ public class SharePointRepository extend
String listID = listIDMap.get(decodedListPath);
if (listID == null)
{
- listID = proxy.getListID(encodedSitePath, sitePath, list);
+ listID = proxy.getListID(encodedSitePath, sitePath, list,
fullListPaths);
if (listID != null)
listIDMap.put(decodedListPath,listID);
}
@@ -911,7 +914,7 @@ public class SharePointRepository extend
String libID = libIDMap.get(decodedLibPath);
if (libID == null)
{
- libID = proxy.getDocLibID(encodedSitePath, sitePath, lib);
+ libID = proxy.getDocLibID(encodedSitePath, sitePath, lib,
fullListPaths);
if (libID != null)
libIDMap.put(decodedLibPath,libID);
}
@@ -1231,7 +1234,7 @@ public class SharePointRepository extend
// Calculate the start of the path part that would contain the
list item name
int listItemPathIndex = site.length() + 1 + listName.length();
- String listID = proxy.getListID( encodePath(site), site, listName
);
+ String listID = proxy.getListID( encodePath(site), site, listName,
fullListPaths );
if (listID != null)
{
ListItemStream fs = new ListItemStream( activities,
listItemPathIndex, spec );
@@ -1326,7 +1329,7 @@ public class SharePointRepository extend
String listID = listIDMap.get(decodedListPath);
if (listID == null)
{
- listID = proxy.getListID( encodePath(site), site,
listName);
+ listID = proxy.getListID( encodePath(site), site,
listName, fullListPaths );
if (listID == null)
listID = "";
listIDMap.put(decodedListPath,listID);
@@ -1404,7 +1407,7 @@ public class SharePointRepository extend
// Calculate the start of the path part that would contain the
folders/file
int foldersFilePathIndex = site.length() + 1 + libName.length();
- String libID = proxy.getDocLibID( encodePath(site), site, libName
);
+ String libID = proxy.getDocLibID( encodePath(site), site, libName,
fullListPaths );
if (libID != null)
{
FileStream fs = new FileStream( activities,
foldersFilePathIndex, spec );
@@ -1618,7 +1621,7 @@ public class SharePointRepository extend
String documentLibID = docLibIDMap.get(decodedLibPath);
if (documentLibID == null)
{
- documentLibID = proxy.getDocLibID( encodePath(site),
site, libName);
+ documentLibID = proxy.getDocLibID( encodePath(site),
site, libName, fullListPaths );
if (documentLibID == null)
documentLibID = "";
docLibIDMap.put(decodedLibPath,documentLibID);
@@ -1744,7 +1747,7 @@ public class SharePointRepository extend
}
// Look at libraries
- ArrayList libraries = proxy.getDocumentLibraries(
encodePath(decodedSitePath), decodedSitePath );
+ ArrayList libraries = proxy.getDocumentLibraries(
encodePath(decodedSitePath), decodedSitePath, fullListPaths );
if (libraries != null)
{
int j = 0;
@@ -1765,7 +1768,7 @@ public class SharePointRepository extend
}
// Look at lists
- ArrayList lists = proxy.getLists( encodePath(decodedSitePath),
decodedSitePath );
+ ArrayList lists = proxy.getLists( encodePath(decodedSitePath),
decodedSitePath, fullListPaths );
if (lists != null)
{
int j = 0;
@@ -2140,6 +2143,7 @@ public class SharePointRepository extend
" <option value=\"2.0\"
"+((serverVersion.equals("2.0"))?"selected=\"true\"":"")+">SharePoint Services
2.0 (2003)</option>\n"+
" <option value=\"3.0\"
"+(serverVersion.equals("3.0")?"selected=\"true\"":"")+">SharePoint Services
3.0 (2007)</option>\n"+
" <option value=\"4.0\"
"+(serverVersion.equals("4.0")?"selected=\"true\"":"")+">SharePoint Services
4.0 (2010)</option>\n"+
+" <option value=\"4.0AWS\"
"+(serverVersion.equals("4.0AWS")?"selected=\"true\"":"")+">SharePoint Services
4.0 (2010), Amazon version</option>\n"+
" </select>\n"+
" </td>\n"+
" </tr>\n"+
@@ -5000,7 +5004,7 @@ public class SharePointRepository extend
throws ServiceInterruption, ManifoldCFException
{
getSession();
- return proxy.getFieldList( encodePath(parentSite), proxy.getDocLibID(
encodePath(parentSite), parentSite, docLibrary) );
+ return proxy.getFieldList( encodePath(parentSite), proxy.getDocLibID(
encodePath(parentSite), parentSite, docLibrary, fullListPaths ) );
}
/**
@@ -5013,7 +5017,7 @@ public class SharePointRepository extend
throws ServiceInterruption, ManifoldCFException
{
getSession();
- return proxy.getFieldList( encodePath(parentSite), proxy.getListID(
encodePath(parentSite), parentSite, listName) );
+ return proxy.getFieldList( encodePath(parentSite), proxy.getListID(
encodePath(parentSite), parentSite, listName, fullListPaths ) );
}
/**
@@ -5037,7 +5041,7 @@ public class SharePointRepository extend
throws ManifoldCFException, ServiceInterruption
{
getSession();
- return proxy.getDocumentLibraries( encodePath(parentSite), parentSite );
+ return proxy.getDocumentLibraries( encodePath(parentSite), parentSite,
fullListPaths );
}
/**
@@ -5049,7 +5053,7 @@ public class SharePointRepository extend
throws ManifoldCFException, ServiceInterruption
{
getSession();
- return proxy.getLists( encodePath(parentSite), parentSite );
+ return proxy.getLists( encodePath(parentSite), parentSite, fullListPaths );
}
// Protected static methods