Class SPSProxyHelper
- java.lang.Object
-
- org.apache.manifoldcf.crawler.connectors.sharepoint.SPSProxyHelper
-
public class SPSProxyHelper extends java.lang.Object- Author:
- Michael Cummings
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classSPSProxyHelper.ListsWSSharePoint Lists Service Wrapper Classprotected static classSPSProxyHelper.MCPermissionsWSMC Permissions Service Wrapper Classprotected static classSPSProxyHelper.PermissionsWSSharePoint Permissions Service Wrapper Classprotected static classSPSProxyHelper.ResourceProviderImplementation of EngineConfiguration that we'll use to get the wsdd file from a local resource.protected static classSPSProxyHelper.StsAdapterWSSharePoint StsAdapter (List Data Services) Service Wrapper Classprotected static classSPSProxyHelper.UserGroupWSSharePoint UserGroup Service Wrapper Classprotected static classSPSProxyHelper.VersionsWSSharePoint Versions Service Wrapper Classprotected static classSPSProxyHelper.WebsWSSharePoint Webs Service Wrapper Class
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringHTTPCLIENT_PROPERTYprotected static java.util.regex.PatternsubsPattern
-
Constructor Summary
Constructors Constructor Description SPSProxyHelper(java.lang.String serverUrl, java.lang.String serverLocation, java.lang.String decodedServerLocation, java.lang.String userName, java.lang.String password, java.lang.Class resourceClass, java.lang.String configFileName, org.apache.http.client.HttpClient httpClient)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static com.microsoft.schemas.sharepoint.soap.GetListItemsQuerybuildMatchQuery(java.lang.String fieldName, java.lang.String type, java.lang.String value)Build a query XML object that matches a specified field and value pair.protected static com.microsoft.schemas.sharepoint.soap.GetListItemsQueryOptionsbuildNonPagingQueryOptions()Build queryOptions XML object that specifies no paging value.protected static com.microsoft.schemas.sharepoint.soap.GetListItemsQuerybuildOrderedQuery(java.lang.String indexedColumn)Build a query XML object that orders by an indexed column, for paging.protected static com.microsoft.schemas.sharepoint.soap.GetListItemsQueryOptionsbuildPagingQueryOptions(java.lang.String pageNextString)Build queryOptions XML object that specifies a paging value.protected static com.microsoft.schemas.sharepoint.soap.GetListItemsViewFieldsbuildViewFields(java.lang.String[] fieldNames)Build viewFields XML for the ListItems call.booleancheckConnection(java.lang.String site, boolean sps30)java.lang.String[]getACLs(java.lang.String site, java.lang.String guid, boolean activeDirectoryAuthority)Get the acls for a document library.java.util.List<NameValue>getAttachmentNames(java.lang.String site, java.lang.String listName, java.lang.String itemID)Gets a list of attachment URLs, given a site, list name, and list item ID.booleangetChildren(IFileStream fileStream, java.lang.String site, java.lang.String guid, boolean dspStsWorks)java.lang.StringgetDocLibID(java.lang.String parentSite, java.lang.String parentSiteDecoded, java.lang.String docLibrary)java.lang.String[]getDocumentACLs(java.lang.String site, java.lang.String file, boolean activeDirectoryAuthority)Get the acls for a document.java.util.List<NameValue>getDocumentLibraries(java.lang.String parentSite, java.lang.String parentSiteDecoded)Gets a list of document libraries given a parent sitejava.util.Map<java.lang.String,java.lang.String>getFieldList(java.lang.String site, java.lang.String listName)Gets a list of field names of the given document libraryjava.util.Map<java.lang.String,java.lang.String>getFieldValues(java.lang.String[] fieldNames, java.lang.String site, java.lang.String docLibrary, java.lang.String docId, boolean dspStsWorks)Gets a list of field values of the given documentjava.lang.StringgetListID(java.lang.String parentSite, java.lang.String parentSiteDecoded, java.lang.String listName)java.util.List<NameValue>getLists(java.lang.String parentSite, java.lang.String parentSiteDecoded)Gets a list of lists given a parent sitejava.util.List<NameValue>getSites(java.lang.String parentSite)Gets a list of sites given a parent siteorg.apache.manifoldcf.core.common.XMLDocgetVersions(java.lang.String site, java.lang.String docPath)protected static java.lang.StringvalueMunge(java.lang.String value)Substitute progid where found
-
-
-
Field Detail
-
HTTPCLIENT_PROPERTY
public static final java.lang.String HTTPCLIENT_PROPERTY
- See Also:
- Constant Field Values
-
subsPattern
protected static java.util.regex.Pattern subsPattern
-
-
Constructor Detail
-
SPSProxyHelper
public SPSProxyHelper(java.lang.String serverUrl, java.lang.String serverLocation, java.lang.String decodedServerLocation, java.lang.String userName, java.lang.String password, java.lang.Class resourceClass, java.lang.String configFileName, org.apache.http.client.HttpClient httpClient)- Parameters:
serverUrl-userName-password-
-
-
Method Detail
-
getACLs
public java.lang.String[] getACLs(java.lang.String site, java.lang.String guid, boolean activeDirectoryAuthority) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruptionGet the acls for a document library.- Parameters:
site-guid- is the list/library GUID- Returns:
- array of sids
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
getDocumentACLs
public java.lang.String[] getDocumentACLs(java.lang.String site, java.lang.String file, boolean activeDirectoryAuthority) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruptionGet the acls for a document. NOTE that this function only works for SharePoint 2007+ with the MCPermissions web service installed.- Parameters:
site- is the encoded subsite pathfile- is the encoded file url (not including protocol or server or location, but including encoded subsite, library and folder/file path)- Returns:
- array of document SIDs
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
getChildren
public boolean getChildren(IFileStream fileStream, java.lang.String site, java.lang.String guid, boolean dspStsWorks) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
- Parameters:
site-- Returns:
- an XML document
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
getDocLibID
public java.lang.String getDocLibID(java.lang.String parentSite, java.lang.String parentSiteDecoded, java.lang.String docLibrary) throws org.apache.manifoldcf.agents.interfaces.ServiceInterruption, org.apache.manifoldcf.core.interfaces.ManifoldCFException- Parameters:
parentSite-docLibrary-- Returns:
- document library ID
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
getListID
public java.lang.String getListID(java.lang.String parentSite, java.lang.String parentSiteDecoded, java.lang.String listName) throws org.apache.manifoldcf.agents.interfaces.ServiceInterruption, org.apache.manifoldcf.core.interfaces.ManifoldCFException- Parameters:
parentSite-listName- name- Returns:
- document library ID
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
getVersions
public org.apache.manifoldcf.core.common.XMLDoc getVersions(java.lang.String site, java.lang.String docPath) throws org.apache.manifoldcf.agents.interfaces.ServiceInterruption, org.apache.manifoldcf.core.interfaces.ManifoldCFException- Parameters:
site-docPath-- Returns:
- an XML document
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
checkConnection
public boolean checkConnection(java.lang.String site, boolean sps30) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption- Returns:
- true if connection OK
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
getAttachmentNames
public java.util.List<NameValue> getAttachmentNames(java.lang.String site, java.lang.String listName, java.lang.String itemID) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
Gets a list of attachment URLs, given a site, list name, and list item ID. These will be returned as name/value pairs; the "name" is the name of the attachment, and the "value" is the full URL.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
getFieldList
public java.util.Map<java.lang.String,java.lang.String> getFieldList(java.lang.String site, java.lang.String listName) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruptionGets a list of field names of the given document library- Parameters:
site-listName- list/library name- Returns:
- list of the fields
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
getFieldValues
public java.util.Map<java.lang.String,java.lang.String> getFieldValues(java.lang.String[] fieldNames, java.lang.String site, java.lang.String docLibrary, java.lang.String docId, boolean dspStsWorks) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruptionGets a list of field values of the given document- Parameters:
fieldNames-site-docId-- Returns:
- set of the field values
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
getSites
public java.util.List<NameValue> getSites(java.lang.String parentSite) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
Gets a list of sites given a parent site- Parameters:
parentSite- the site to search for subsites, empty string for root- Returns:
- lists of sites as an arraylist of NameValue objects
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
getDocumentLibraries
public java.util.List<NameValue> getDocumentLibraries(java.lang.String parentSite, java.lang.String parentSiteDecoded) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
Gets a list of document libraries given a parent site- Parameters:
parentSite- the site to search for document libraries, empty string for root- Returns:
- lists of NameValue objects, representing document libraries
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
getLists
public java.util.List<NameValue> getLists(java.lang.String parentSite, java.lang.String parentSiteDecoded) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException, org.apache.manifoldcf.agents.interfaces.ServiceInterruption
Gets a list of lists given a parent site- Parameters:
parentSite- the site to search for lists, empty string for root- Returns:
- lists of NameValue objects, representing lists
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
valueMunge
protected static java.lang.String valueMunge(java.lang.String value)
Substitute progid where found
-
buildViewFields
protected static com.microsoft.schemas.sharepoint.soap.GetListItemsViewFields buildViewFields(java.lang.String[] fieldNames) throws org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionBuild viewFields XML for the ListItems call.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
buildMatchQuery
protected static com.microsoft.schemas.sharepoint.soap.GetListItemsQuery buildMatchQuery(java.lang.String fieldName, java.lang.String type, java.lang.String value) throws org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionBuild a query XML object that matches a specified field and value pair.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
buildOrderedQuery
protected static com.microsoft.schemas.sharepoint.soap.GetListItemsQuery buildOrderedQuery(java.lang.String indexedColumn) throws org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionBuild a query XML object that orders by an indexed column, for paging.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
buildPagingQueryOptions
protected static com.microsoft.schemas.sharepoint.soap.GetListItemsQueryOptions buildPagingQueryOptions(java.lang.String pageNextString) throws org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionBuild queryOptions XML object that specifies a paging value.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
buildNonPagingQueryOptions
protected static com.microsoft.schemas.sharepoint.soap.GetListItemsQueryOptions buildNonPagingQueryOptions() throws org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionBuild queryOptions XML object that specifies no paging value.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
-