Return-Path: X-Original-To: apmail-manifoldcf-commits-archive@www.apache.org Delivered-To: apmail-manifoldcf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EE73110A2A for ; Tue, 10 Sep 2013 10:52:50 +0000 (UTC) Received: (qmail 42945 invoked by uid 500); 10 Sep 2013 10:52:49 -0000 Delivered-To: apmail-manifoldcf-commits-archive@manifoldcf.apache.org Received: (qmail 42909 invoked by uid 500); 10 Sep 2013 10:52:48 -0000 Mailing-List: contact commits-help@manifoldcf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@manifoldcf.apache.org Delivered-To: mailing list commits@manifoldcf.apache.org Received: (qmail 42901 invoked by uid 99); 10 Sep 2013 10:52:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Sep 2013 10:52:47 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,WEIRD_QUOTING X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Sep 2013 10:52:46 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 117512388860; Tue, 10 Sep 2013 10:52:26 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1521432 - in /manifoldcf/branches/CONNECTORS-772/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint: SPSProxyHelper.java SharePointRepository.java Date: Tue, 10 Sep 2013 10:52:25 -0000 To: commits@manifoldcf.apache.org From: kwright@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20130910105226.117512388860@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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); // - 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); // - 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); // - 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); // - 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 " \n"+ " \n"+ " \n"+ +" \n"+ " \n"+ " \n"+ " \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