com.adobe.livecycle.crc.sharepoint.client
Class MSSharePointContentRepositoryConnectorServiceClient

java.lang.Object
  extended by com.adobe.livecycle.crc.sharepoint.client.MSSharePointContentRepositoryConnectorServiceClient
All Implemented Interfaces:
IMSSharePointContentRepositoryConnectorServiceClient

public class MSSharePointContentRepositoryConnectorServiceClient
extends java.lang.Object
implements IMSSharePointContentRepositoryConnectorServiceClient

The MSSharePointContentRepositoryConnectorServiceClient class enables you to create a Java object that can invoke operations supported by the Microsoft SharePoint Content Repository Connector service.


Constructor Summary
MSSharePointContentRepositoryConnectorServiceClient(ServiceClientFactory serviceFactory)
          Create a MSSharePointContentRepositoryConnectorServiceClient using the given service factory
MSSharePointContentRepositoryConnectorServiceClient(ServiceClientFactory serviceFactory, java.lang.String serviceName)
          Create a MSSharePointContentRepositoryConnectorServiceClient using the given service factory and specified service name
 
Method Summary
 SearchQueryResultType advancedSearch(LoginSettings loginSettings, java.lang.String siteUrl, java.lang.String documentLibraryName, java.lang.String folderUrl, java.lang.String keyword, java.lang.String customScope, SearchFilter searchFilter)
          Queries at a given Microsoft SharePoint site with paginated results.
 boolean cancelFileCheckOut(LoginSettings loginSettings, java.lang.String siteUrl, java.lang.String documentLibraryName, java.lang.String fileUrl)
          Cancels the check-out of the document identified by the file URL.
 boolean checkInFile(LoginSettings loginSettings, java.lang.String siteUrl, java.lang.String documentLibraryName, java.lang.String fileUrl, java.lang.Boolean isMajor, java.lang.String comment)
          Checks-in an existing file to the SharePoint server.
 boolean checkOutFile(LoginSettings loginSettings, java.lang.String siteUrl, java.lang.String documentLibraryName, java.lang.String fileUrl)
          Check-out a document identified by the file URL, from the SharePoint repository.
 CreateDocumentResultType createDocument(LoginSettings loginSettings, java.lang.String siteUrl, java.lang.String documentLibraryName, Document inputDoc, java.lang.String folderUrl, java.lang.String newFileName, java.lang.Boolean updateInSameTransaction, java.util.Map properties)
          Creates a new document in a SharePoint Document library.
 java.lang.String createFolder(LoginSettings loginSettings, java.lang.String siteUrl, java.lang.String documentLibraryName, java.lang.String folderUrl, java.lang.String newFolderName)
          Creates a new folder in SharePoint document library.
 void delete(LoginSettings loginSettings, java.lang.String siteUrl, java.lang.String documentLibraryName, java.lang.String fileUrl)
          Deletes a file or folder, if it exists.
 java.util.Map getProperties(LoginSettings loginSettings, java.lang.String siteUrl, java.lang.String documentLibraryName, java.lang.String fileUrl)
          Returns all the properties of a document from a SharePoint document library.
 Document retrieveDocumentContent(LoginSettings loginSettings, java.lang.String siteUrl, java.lang.String documentLibraryName, java.lang.String fileUrl)
          Retrieves Document content as a com.adobe.Document object.
 SearchQueryResultType search(LoginSettings loginSettings, java.lang.String siteUrl, java.lang.String documentLibraryName, java.lang.String folderUrl, java.lang.String keyword, java.lang.String customScope, int maxResults)
          Queries at a given Microsoft SharePoint site.
 java.lang.String setDocumentContent(LoginSettings loginSettings, java.lang.String siteUrl, java.lang.String documentLibraryName, Document inputDoc, java.lang.String fileUrl)
          Updates the content of an existing document.
 void updateProperties(LoginSettings loginSettings, java.lang.String siteUrl, java.lang.String documentLibraryName, java.lang.String fileUrl, java.lang.Boolean updateInSameTransaction, java.util.Map propertiesMap)
          Updates the properties of an existing document.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MSSharePointContentRepositoryConnectorServiceClient

public MSSharePointContentRepositoryConnectorServiceClient(ServiceClientFactory serviceFactory)
Create a MSSharePointContentRepositoryConnectorServiceClient using the given service factory

Parameters:
serviceFactory - A ServiceClientFactory that contains connection properties. For information about connection properties, see Invoking LiveCycle Services.

MSSharePointContentRepositoryConnectorServiceClient

public MSSharePointContentRepositoryConnectorServiceClient(ServiceClientFactory serviceFactory,
                                                           java.lang.String serviceName)
Create a MSSharePointContentRepositoryConnectorServiceClient using the given service factory and specified service name

Parameters:
serviceFactory - A ServiceClientFactory that contains connection properties.
serviceName - The name of the MS SharePoint Content Repository Connector service.
Method Detail

checkInFile

public boolean checkInFile(LoginSettings loginSettings,
                           java.lang.String siteUrl,
                           java.lang.String documentLibraryName,
                           java.lang.String fileUrl,
                           java.lang.Boolean isMajor,
                           java.lang.String comment)
                    throws SharePointConnectorException
Description copied from interface: IMSSharePointContentRepositoryConnectorServiceClient
Checks-in an existing file to the SharePoint server.

Specified by:
checkInFile in interface IMSSharePointContentRepositoryConnectorServiceClient
Parameters:
loginSettings - Required. Configuration settings required to connect to the Microsoft SharePoint site.
siteUrl - Required. Microsoft SharePoint site URL.
documentLibraryName - Required. Document Library name.
fileUrl - Required. Relative URL for an existing file. If the file does not exist an exception is thrown.
isMajor - Optional. A flag that indicates how the version of the document is updated.
comment - Optional. Comment associated with the check-in.
Returns:
true, if the file is checked-in (the file was checked-out before this operation). false, if the file is not checked-in (because the file is already checked-in).
Throws:
SharePointConnectorException - Authentication failure.

checkOutFile

public boolean checkOutFile(LoginSettings loginSettings,
                            java.lang.String siteUrl,
                            java.lang.String documentLibraryName,
                            java.lang.String fileUrl)
                     throws SharePointConnectorException
Description copied from interface: IMSSharePointContentRepositoryConnectorServiceClient
Check-out a document identified by the file URL, from the SharePoint repository. If the file is already checked-out to the same user, this method returns false. If not already checked-out, the file is checked-out to the user, and the method returns true.

Specified by:
checkOutFile in interface IMSSharePointContentRepositoryConnectorServiceClient
Parameters:
loginSettings - Required. Configuration settings required to connect to the Microsoft SharePoint site.
siteUrl - Required. Microsoft SharePoint site URL.
documentLibraryName - Required. Document Library name.
fileUrl - Required. Relative URL for an existing file. If the file does not exist, an exception is thrown.
Returns:
A flag indicating if the operation successfully checked-out the file(true), or if the file is already checked-out to the user(false).
Throws:
SharePointConnectorException - Authentication failure.

createFolder

public java.lang.String createFolder(LoginSettings loginSettings,
                                     java.lang.String siteUrl,
                                     java.lang.String documentLibraryName,
                                     java.lang.String folderUrl,
                                     java.lang.String newFolderName)
                              throws SharePointConnectorException
Description copied from interface: IMSSharePointContentRepositoryConnectorServiceClient
Creates a new folder in SharePoint document library. Can also be used to create sub folders within an existing folder in the document library.

Specified by:
createFolder in interface IMSSharePointContentRepositoryConnectorServiceClient
Parameters:
loginSettings - Required. Configuration settings required to connect to the Microsoft SharePoint site.
siteUrl - Required. Microsoft SharePoint site URL.
documentLibraryName - Required. Document Library name.
folderUrl - Optional. Parent folder URL. If you want to create a folder directly within a document library, leave this paramter as blank.
newFolderName - Optional. Name of the new folder. The folder name should not be prefixed or suffixed with forward slash or backward slash.
Returns:
Returns the relative URL of the new folder. For example, folderURL + "/" + newFolderName.
Throws:
SharePointConnectorException - Authentication failure.

delete

public void delete(LoginSettings loginSettings,
                   java.lang.String siteUrl,
                   java.lang.String documentLibraryName,
                   java.lang.String fileUrl)
            throws SharePointConnectorException
Description copied from interface: IMSSharePointContentRepositoryConnectorServiceClient
Deletes a file or folder, if it exists. If the file or folder does not exist, no operation is performed.

Specified by:
delete in interface IMSSharePointContentRepositoryConnectorServiceClient
Parameters:
loginSettings - Required. Configuration settings required to connect to the Microsoft SharePoint site.
siteUrl - Required. Microsoft SharePoint site URL.
documentLibraryName - Required. Document Library name.
fileUrl - Required. Relative URL of an existing file or folder. The URL should not be prefixed or suffixed with forward slash or backward slash. No exception is thrown if the folder does not exist.
Throws:
SharePointConnectorException - Authentication failure.

getProperties

public java.util.Map getProperties(LoginSettings loginSettings,
                                   java.lang.String siteUrl,
                                   java.lang.String documentLibraryName,
                                   java.lang.String fileUrl)
                            throws SharePointConnectorException
Description copied from interface: IMSSharePointContentRepositoryConnectorServiceClient
Returns all the properties of a document from a SharePoint document library.

Specified by:
getProperties in interface IMSSharePointContentRepositoryConnectorServiceClient
Parameters:
loginSettings - Required. Configuration settings required to connect to the Microsoft SharePoint site.
siteUrl - Required. Microsoft SharePoint site URL.
documentLibraryName - Required. Document Library name.
fileUrl - Required. Relative URL of an existing file. If the file does not exist, an exception is thrown.
Returns:
A map containing name-value pairs of document properties.
Throws:
SharePointConnectorException - Authentication failure.

retrieveDocumentContent

public Document retrieveDocumentContent(LoginSettings loginSettings,
                                        java.lang.String siteUrl,
                                        java.lang.String documentLibraryName,
                                        java.lang.String fileUrl)
                                 throws SharePointConnectorException
Description copied from interface: IMSSharePointContentRepositoryConnectorServiceClient
Retrieves Document content as a com.adobe.Document object.

Specified by:
retrieveDocumentContent in interface IMSSharePointContentRepositoryConnectorServiceClient
Parameters:
loginSettings - Required. Configuration settings required to connect to the Microsoft SharePoint site.
siteUrl - Required. Microsoft SharePoint site URL.
documentLibraryName - Required. Document Library name.
fileUrl - Required. Relative URL of an existing file. If the file does not exist, an exception is thrown.
Returns:
A Document object with the content of the document specified in fileURL.
Throws:
SharePointConnectorException - Authentication failure.

setDocumentContent

public java.lang.String setDocumentContent(LoginSettings loginSettings,
                                           java.lang.String siteUrl,
                                           java.lang.String documentLibraryName,
                                           Document inputDoc,
                                           java.lang.String fileUrl)
                                    throws SharePointConnectorException
Description copied from interface: IMSSharePointContentRepositoryConnectorServiceClient
Updates the content of an existing document.

Specified by:
setDocumentContent in interface IMSSharePointContentRepositoryConnectorServiceClient
Parameters:
loginSettings - Required. Configuration settings required to connect to the Microsoft SharePoint site.
siteUrl - Required. Microsoft SharePoint site URL.
documentLibraryName - Required. Document Library name.
inputDoc - Required. Document object representing the new content of the file.
fileUrl - Required. Relative URL of an existing file. If the file does not exist, an exception is thrown.
Returns:
Returns the absolute URL of the document.
Throws:
SharePointConnectorException - Authentication failure.

updateProperties

public void updateProperties(LoginSettings loginSettings,
                             java.lang.String siteUrl,
                             java.lang.String documentLibraryName,
                             java.lang.String fileUrl,
                             java.lang.Boolean updateInSameTransaction,
                             java.util.Map propertiesMap)
                      throws SharePointConnectorException
Description copied from interface: IMSSharePointContentRepositoryConnectorServiceClient
Updates the properties of an existing document. Note: Property names provided in this operation and those in SharePoint must be an exact match.

Specified by:
updateProperties in interface IMSSharePointContentRepositoryConnectorServiceClient
Parameters:
loginSettings - Required. Configuration settings required to connect to the Microsoft SharePoint site.
siteUrl - Required. Microsoft SharePoint site URL.
documentLibraryName - Required. Document Library name.
fileUrl - Required. Relative URL of an existing file. If the file does not exist, an exception is thrown.
updateInSameTransaction - Optional. Flag that specifies whether to set all or none of the properties.
propertiesMap - Required. A hash map containing name-value pairs of file properties.
Throws:
SharePointConnectorException - Authentication failure.

search

public SearchQueryResultType search(LoginSettings loginSettings,
                                    java.lang.String siteUrl,
                                    java.lang.String documentLibraryName,
                                    java.lang.String folderUrl,
                                    java.lang.String keyword,
                                    java.lang.String customScope,
                                    int maxResults)
                             throws SharePointConnectorException
Description copied from interface: IMSSharePointContentRepositoryConnectorServiceClient
Queries at a given Microsoft SharePoint site.

Specified by:
search in interface IMSSharePointContentRepositoryConnectorServiceClient
Parameters:
loginSettings - Required. Configuration settings required to connect to the Microsoft SharePoint site.
siteUrl - Required. Microsoft SharePoint site URL.
documentLibraryName - Optional. Document library name. Specify a document library name if you want the search to be restricted to a specific document library.
folderUrl - Optional. Parent folder URL. Specify a folder URL if you want your search to be restricted to the specific document library and its subfolders only.
keyword - Required. Keyword to search for in SharePoint.
customScope - Optional. Name of the custom scope used to perform the search operation. When specified, results returned are those custom scope results that satisfy all the four criteria of:
  • SiteUrl,
  • documentLibraryName,
  • folderURL,
  • and
  • customScope.
maxResults - Optional. Maximum results to return after search. Default value is 10.
Returns:
An object of type SearchQueryResultType which contains the total search counts, total available, search status (Successful or UnSuccessful) and a list of searchDocuments. Each search document represents one document in SharePoint with following information about it:
  • Author
  • Absolute URL (absolute HTTP location of the document)
  • Relative URL (Parent folder and sub-folder path of the document)
  • Title
  • isDocument property
If the value of search counts equals the value of total available, it indicates that all results have been returned by this operation. The parameter 'total available' indicates the total available results for the search query on the SharePoint site. You can increase maxResults if the value of search counts is lesser than the value of total available.
Throws:
SharePointConnectorException - Authentication failure.

advancedSearch

public SearchQueryResultType advancedSearch(LoginSettings loginSettings,
                                            java.lang.String siteUrl,
                                            java.lang.String documentLibraryName,
                                            java.lang.String folderUrl,
                                            java.lang.String keyword,
                                            java.lang.String customScope,
                                            SearchFilter searchFilter)
                                     throws SharePointConnectorException
Description copied from interface: IMSSharePointContentRepositoryConnectorServiceClient
Queries at a given Microsoft SharePoint site with paginated results.

Specified by:
advancedSearch in interface IMSSharePointContentRepositoryConnectorServiceClient
Parameters:
loginSettings - Required. Configuration settings required to connect to the Microsoft SharePoint site.
siteUrl - Required. Microsoft SharePoint site URL.
documentLibraryName - Optional. Document library name. Specify a document library name if you want the search to be restricted to a specific document library.
folderUrl - Optional. Parent folder URL. Specify a folder URL if you want your search to be restricted to the specific document library and its subfolders only.
keyword - Required. Keyword to search for in SharePoint.
customScope - Optional. Name of the custom scope used to perform the search operation. When specified, results returned are those custom scope results that satisfy all the four criteria of:
  • SiteUrl,
  • documentLibraryName,
  • folderURL,
  • and
  • customScope.
searchFilter - Optional. An Object of type SearchFilter which allows a paginated search. The SearchFilter comprises of the following properties which are all optional.
  • StartAt - the the initial result in the response from the search query
  • Count - the maximum number of results to return in the response from the search query
  • SortByProperty - sorting the search results returned by the query
  • TrimDuplicates - remove duplicates before the search results are returned by the query
Returns:
An object of type SearchQueryResultType which contains the total search counts, total available, search status (Successful or UnSuccessful) and a list of searchDocuments. Each search document represents one document in SharePoint with following information about it:
  • Author
  • Absolute URL (absolute HTTP location of the document)
  • Relative URL (Parent folder and sub-folder path of the document)
  • Title
  • isDocument property
If the value of search counts equals the value of total available, it indicates that all results have been returned by this operation. The parameter 'total available' indicates the total available results for the search query on the SharePoint site. You can increase count if the value of search counts is lesser than the value of total available.
Throws:
SharePointConnectorException - Authentication failure.

cancelFileCheckOut

public boolean cancelFileCheckOut(LoginSettings loginSettings,
                                  java.lang.String siteUrl,
                                  java.lang.String documentLibraryName,
                                  java.lang.String fileUrl)
                           throws SharePointConnectorException
Description copied from interface: IMSSharePointContentRepositoryConnectorServiceClient
Cancels the check-out of the document identified by the file URL. If the file is checked-in, this method returns false and performs no further actions. If the file is already checked-out, this operation reverts the check-out operation and returns true.

Specified by:
cancelFileCheckOut in interface IMSSharePointContentRepositoryConnectorServiceClient
Parameters:
loginSettings - Required. Configuration settings required to connect to the Microsoft SharePoint site.
siteUrl - Required. Microsoft SharePoint site URL.
documentLibraryName - Required. Document Library name.
fileUrl - Required. Relative URL for an existing file. If the file does not exist an exception is thrown.
Returns:
A flag indicating if the check-out was successfully reverted (true), or if the file was not checked-out (false)
Throws:
SharePointConnectorException - Authentication failure.

createDocument

public CreateDocumentResultType createDocument(LoginSettings loginSettings,
                                               java.lang.String siteUrl,
                                               java.lang.String documentLibraryName,
                                               Document inputDoc,
                                               java.lang.String folderUrl,
                                               java.lang.String newFileName,
                                               java.lang.Boolean updateInSameTransaction,
                                               java.util.Map properties)
                                        throws SharePointConnectorException
Description copied from interface: IMSSharePointContentRepositoryConnectorServiceClient
Creates a new document in a SharePoint Document library. If the doucment being created already exists, this operation has no effect. Note: You cannot update document properties using this method. Use updateProperties instead.

Specified by:
createDocument in interface IMSSharePointContentRepositoryConnectorServiceClient
Parameters:
loginSettings - Required. Configuration settings required to connect to the Microsoft SharePoint site.
siteUrl - Required. Microsoft SharePoint site URL.
documentLibraryName - Required. Document Library name.
inputDoc - Required. Contents of the file being created.
folderUrl - Optional. Parent folder of the new document. If the new document is required to be created directly at the document library level, do not provide a value for this parameter.
newFileName - Required. Name of the new file. This name is also used to identify if the file exists or not.
updateInSameTransaction - Optional. Flag that specifies whether to set either all or none of the properties. When set to True, either all properties or none are set (No properties are set if even a single property fails to be set). When set to False, all correct properties are set, and incorrect properties are not set.
properties - Optional. A hash map containing name-value pair of document properties.
Returns:
An object of CreateDocumentResultType. CreateDocumentResultType is a complex object containing:
  • absoluteUrl . The absolute URL of the created file.
  • relativeURL. The relative URL of the of the created file. The relative URL is relative to the document library, and does not contain the siteUrl and the documentLibraryName
  • fileUploadSuccess. A flag that indicates if the operation to create the document was a success or not.
Throws:
SharePointConnectorException - Authentication failure