com.microsoft.tfs.core.clients.sharepoint
Class WSSClient

java.lang.Object
  extended by com.microsoft.tfs.core.clients.sharepoint.WSSClient

public class WSSClient
extends java.lang.Object

A read-only client for the Windows Sharepoint Services web services. The client supports listing document libraries for a project, listing documents within a library, and retrieving detailed information about documents.

Since:
TEE-SDK-10.1
Thread-safety:
thread-compatible

Constructor Summary
WSSClient(TFSTeamProjectCollection connection, ms.wss._ListsSoap webService, java.lang.String projectName)
          Creates a WSSClient with the given TFSTeamProjectCollection and web service proxy.
 
Method Summary
 WSSDocumentLibrary[] getDocumentLibraries(boolean refresh)
          Gets the document libraries available for a project.
 com.microsoft.tfs.core.ws.runtime.types.DOMAnyContentType getFields()
           Get the view fields.
 java.lang.String getFixedURI(java.lang.String uri)
           TEE will automatically correct the endpoints registered URL when creating the web service, however we must provide a mechansim to correct fully qualified URI's provided as additional URI from the same webservice.
 com.microsoft.tfs.core.ws.runtime.types.DOMAnyContentType getListItemQuery(WSSDocumentLibrary docLib)
           Generate the list item query.
 com.microsoft.tfs.core.ws.runtime.types.DOMAnyContentType getQueryOptions()
           Get the query options containing a single message element for the following:-
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WSSClient

public WSSClient(TFSTeamProjectCollection connection,
                 ms.wss._ListsSoap webService,
                 java.lang.String projectName)
Creates a WSSClient with the given TFSTeamProjectCollection and web service proxy.

Parameters:
connection - a valid TFSTeamProjectCollection (must not be null)
webService - the _ListsSoapService web service (must not be null)
projectName - the Sharepoint project name (must not be null or empty)
Method Detail

getFixedURI

public java.lang.String getFixedURI(java.lang.String uri)

TEE will automatically correct the endpoints registered URL when creating the web service, however we must provide a mechansim to correct fully qualified URI's provided as additional URI from the same webservice.

We compare the passed uri with the registered web service endpoint, if they share the same root (i.e. http://TFSERVER) then we correct the passed uri to be the same as the corrected web service enpoint (i.e. http://tfsserver.mycompany.com)

See Also:
ReportingClient.getFixedURI(String)

getDocumentLibraries

public WSSDocumentLibrary[] getDocumentLibraries(boolean refresh)
Gets the document libraries available for a project.

Returns:
an array of populated WSSDocumentLibrary objects for a project. May be empty but never null.

getListItemQuery

public com.microsoft.tfs.core.ws.runtime.types.DOMAnyContentType getListItemQuery(WSSDocumentLibrary docLib)

Generate the list item query. The query will contain one message element representing the following XML.

 <Query xmlns=""> <Where> <Contains> <FieldRef Name="FileRef" /> <Value
 Type="Text">/Development/</Value> </Contains> <OrderBy> <FieldRef
 Name="FileDirRef" Ascending="true" /> </OrderBy> </Where> </Query>
 

Parameters:
docLib - the document library to generate the query for (must not be null)
Returns:
the query to list items for the specified document library

getFields

public com.microsoft.tfs.core.ws.runtime.types.DOMAnyContentType getFields()

Get the view fields. Will return object containing one message element representing the following XML.

 <ViewFields xmlns=""> <ViewFields> <FieldRef Name="ID" /> <FieldRef
 Name="FSObjType" /> <FieldRef Name="FileRef" /> <FieldRef
 Name="FileLeafRef" /> </ViewFields> </ViewFields>
 

Returns:
the view fields

getQueryOptions

public com.microsoft.tfs.core.ws.runtime.types.DOMAnyContentType getQueryOptions()

Get the query options containing a single message element for the following:-

 <QueryOptions xmlns="">
 <IncludeMandatoryColumns>false</IncludeMandatoryColumns> <ViewAttributes
 Scope="RecursiveAll" /> </QueryOptions>
 

Returns:
the query options


© 2015 Microsoft. All rights reserved.