|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.microsoft.tfs.core.PreFrameworkServerDataProvider
public class PreFrameworkServerDataProvider
Gets server configuration information from Team Foundation Servers which predate the TFS 2010 framework services (TFS 2005, TFS 2008).
| Constructor Summary | |
|---|---|
PreFrameworkServerDataProvider(TFSTeamProjectCollection teamProjectCollection)
Constructs a PreFrameworkServerDataProvider using a
TFSTeamProjectCollection. |
|
| Method Summary | |
|---|---|
void |
authenticate()
|
AccessMapping |
configureAccessMapping(java.lang.String moniker,
java.lang.String displayName,
java.lang.String accessPoint,
boolean makeDefault)
Configures the AccessMapping with the provided moniker to have the provided display name and access point. |
void |
connect(ConnectOptions connectOptions)
Performs all of the steps that are necessary for setting up a connection with a Team Foundation Server. |
void |
ensureAuthenticated()
|
java.lang.String |
findServerLocation(com.microsoft.tfs.util.GUID serverGUID)
The function finds the location of the server that has the guid passed. |
ServiceDefinition |
findServiceDefinition(java.lang.String serviceType,
com.microsoft.tfs.util.GUID serviceIdentifier)
Finds the ServiceDefinition with the specified service type and service identifier. |
ServiceDefinition[] |
findServiceDefinitions(java.lang.String serviceType)
Finds the ServiceDefinitions for all of the services with the specified service type. |
ServiceDefinition[] |
findServiceDefinitionsByToolType(java.lang.String toolType)
Finds the ServiceDefinitions for all of the services with the specified tool type. |
java.lang.String |
findServiceLocation(java.lang.String serviceType,
java.lang.String toolID)
Finds the location of the service with the provided service type. |
AccessMapping |
getAccessMapping(java.lang.String moniker)
Gets the AccessMapping with the specified moniker. |
TeamFoundationIdentity |
getAuthenticatedIdentity()
|
TeamFoundationIdentity |
getAuthorizedIdentity()
|
com.microsoft.tfs.util.GUID |
getCatalogResourceID()
|
AccessMapping |
getClientAccessMapping()
The AccessMapping for the current connection to the server. |
AccessMapping[] |
getConfiguredAccessMappings()
All of the AccessMappings that this location service knows about. |
AccessMapping |
getDefaultAccessMapping()
All of the AccessMappings that this location service knows about. |
com.microsoft.tfs.util.GUID |
getInstanceID()
|
ServerCapabilities |
getServerCapabilities()
The capabilities of the TFS server. |
boolean |
hasAuthenticated()
|
java.lang.String |
locationForAccessMapping(ServiceDefinition serviceDefinition,
AccessMapping accessMapping)
Returns the location for the ServiceDefinition for the provided AccessMapping. |
java.lang.String |
locationForAccessMapping(ServiceDefinition serviceDefinition,
AccessMapping accessMapping,
boolean encodeRelativeComponents)
Returns the location for the ServiceDefinition for the provided AccessMapping. |
java.lang.String |
locationForAccessMapping(java.lang.String serviceType,
com.microsoft.tfs.util.GUID serviceIdentifier,
AccessMapping accessMapping)
Returns the location for the ServiceDefinition that has the specified service type and service identifier for the provided AccessMapping. |
java.lang.String |
locationForCurrentConnection(ServiceDefinition serviceDefinition)
Returns the location for the ServiceDefintion that should be used based on the current connection. |
java.lang.String |
locationForCurrentConnection(java.lang.String serviceType,
com.microsoft.tfs.util.GUID serviceIdentifier)
Returns the location for the ServiceDefintion associated with the ServiceType and ServiceIdentifier that should be used based on the current connection. |
void |
reactToPossibleServerUpdate(int serverLastChangeId)
Clears any caches that it has if the server has been updated. |
void |
removeAccessMapping(java.lang.String moniker)
Removes an AccessMapping and all of the locations that are mapped to it within ServiceDefinitions. |
void |
removeServiceDefinition(ServiceDefinition serviceDefinition)
Removes the specified ServiceDefinition from the location service. |
void |
removeServiceDefinition(java.lang.String serviceType,
com.microsoft.tfs.util.GUID serviceIdentifier)
Removes the ServiceDefinition with the specified service type and service identifier from the location service. |
void |
removeServiceDefinitions(ServiceDefinition[] serviceDefinitions)
Removes the specified ServiceDefinitions from the location service. |
void |
saveServiceDefinition(ServiceDefinition serviceDefinition)
Saves the provided ServiceDefinition within the location service. |
void |
saveServiceDefinitions(ServiceDefinition[] serviceDefinitions)
Saves the provided ServiceDefinitions within the location service. |
void |
setDefaultAccessMapping(AccessMapping accessMapping)
Sets the default AccessMapping to the AccessMapping passed in. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PreFrameworkServerDataProvider(TFSTeamProjectCollection teamProjectCollection)
PreFrameworkServerDataProvider using a
TFSTeamProjectCollection. TFSTeamProjectCollection is
required, instead of TFSConnection, because this is the only kind
of connection whose services are available in a TFS 2005/2008 server.
teamProjectCollection - a TFSTeamProjectCollection configured to point to the
correct server (must not be null)| Method Detail |
|---|
public com.microsoft.tfs.util.GUID getInstanceID()
getInstanceID in interface ServerDataProviderpublic com.microsoft.tfs.util.GUID getCatalogResourceID()
getCatalogResourceID in interface ServerDataProviderpublic TeamFoundationIdentity getAuthenticatedIdentity()
getAuthenticatedIdentity in interface ServerDataProviderpublic TeamFoundationIdentity getAuthorizedIdentity()
getAuthorizedIdentity in interface ServerDataProviderpublic boolean hasAuthenticated()
hasAuthenticated in interface ServerDataProviderpublic void ensureAuthenticated()
ensureAuthenticated in interface ServerDataProviderpublic void authenticate()
authenticate in interface ServerDataProviderpublic java.lang.String locationForCurrentConnection(ServiceDefinition serviceDefinition)
locationForCurrentConnection in interface ILocationServiceserviceDefinition - The ServiceDefinition to find the location for.
public java.lang.String locationForCurrentConnection(java.lang.String serviceType,
com.microsoft.tfs.util.GUID serviceIdentifier)
locationForCurrentConnection in interface ILocationServiceserviceType - The service type of the ServiceDefinition to find the location
for.serviceIdentifier - The service identifier of the ServiceDefinition to find the
location for.
public java.lang.String findServiceLocation(java.lang.String serviceType,
java.lang.String toolID)
LocationService, the bis
name will be ignored.
serviceType - The service type (or service interface) being requested (must not
be null)toolID - The toolId of the service definition (must not be
null)
public void connect(ConnectOptions connectOptions)
ServerDataProvider
connect in interface ServerDataProviderconnectOptions - Specifies what information that should be returned from the
server.public java.lang.String findServerLocation(com.microsoft.tfs.util.GUID serverGUID)
ServerDataProvider
findServerLocation in interface ServerDataProviderserverGUID - the GUID for the server we are looking up
null if this server does not have a child with the
provided GUIDpublic void reactToPossibleServerUpdate(int serverLastChangeId)
ServerDataProvider
reactToPossibleServerUpdate in interface ServerDataProvider
public AccessMapping configureAccessMapping(java.lang.String moniker,
java.lang.String displayName,
java.lang.String accessPoint,
boolean makeDefault)
ILocationService
configureAccessMapping in interface ILocationServicemoniker - A string that uniquely identifies this AccessMapping. This value
cannot be null or empty.displayName - Display name for this AccessMapping. This value cannot be null or
empty.accessPoint - This is the base URL for the server that will map to this
AccessMapping. This value cannot be null or empty.
The access point should consist of the scheme, authority, port and
web application virtual path of the target-able server address.
For example, an access point will most commonly look like this:
http://server:8080/tfs/makeDefault - If true, this AccessMapping will be made the default
AccessMapping. If false, the default AccessMapping will not
change.
public ServiceDefinition findServiceDefinition(java.lang.String serviceType,
com.microsoft.tfs.util.GUID serviceIdentifier)
ILocationService
findServiceDefinition in interface ILocationServiceserviceType - The service type of the ServiceDefinition to find.serviceIdentifier - The service identifier of the ServiceDefinition to find.
public ServiceDefinition[] findServiceDefinitions(java.lang.String serviceType)
ILocationService
findServiceDefinitions in interface ILocationServiceserviceType - The case-insensitive string that identifies what type of service
is being requested. If this value is null, ServiceDefinitions for
all services registered with this location service will be
returned.
public ServiceDefinition[] findServiceDefinitionsByToolType(java.lang.String toolType)
ILocationService
findServiceDefinitionsByToolType in interface ILocationServicetoolType - The case-insensitive string that will match the tool type of a set
of ServiceDefinitions. If null or empty is passed in for this
value then all of the ServiceDefinitions will be returned.
public AccessMapping getAccessMapping(java.lang.String moniker)
ILocationService
getAccessMapping in interface ILocationServicemoniker - The moniker for the desired AccessMapping. This value cannot be
null or empty.
public AccessMapping getClientAccessMapping()
ILocationService
getClientAccessMapping in interface ILocationServicepublic AccessMapping[] getConfiguredAccessMappings()
ILocationService
getConfiguredAccessMappings in interface ILocationServicepublic AccessMapping getDefaultAccessMapping()
ILocationService
getDefaultAccessMapping in interface ILocationService
public java.lang.String locationForAccessMapping(java.lang.String serviceType,
com.microsoft.tfs.util.GUID serviceIdentifier,
AccessMapping accessMapping)
ILocationService
locationForAccessMapping in interface ILocationServiceserviceType - The service type of the ServiceDefinition to find the location
for.serviceIdentifier - The service identifier of the ServiceDefinition to find the
location for.accessMapping - The AccessMapping to find the location for.
public java.lang.String locationForAccessMapping(ServiceDefinition serviceDefinition,
AccessMapping accessMapping)
ILocationService
locationForAccessMapping in interface ILocationServiceserviceDefinition - The ServiceDefinition to find the location for.accessMapping - The AccessMapping to find the location for.
public java.lang.String locationForAccessMapping(ServiceDefinition serviceDefinition,
AccessMapping accessMapping,
boolean encodeRelativeComponents)
ILocationService
locationForAccessMapping in interface ILocationServiceserviceDefinition - The ServiceDefinition to find the location for.accessMapping - The AccessMapping to find the location for.encodeRelativeComponents - If true, URI-encode any relative URI path components before
appending to the root URI.
public void removeAccessMapping(java.lang.String moniker)
ILocationService
removeAccessMapping in interface ILocationServicemoniker - The moniker for the AccessMapping to remove.
public void removeServiceDefinition(java.lang.String serviceType,
com.microsoft.tfs.util.GUID serviceIdentifier)
ILocationService
removeServiceDefinition in interface ILocationServiceserviceType - The service type of the ServiceDefinition to remove.serviceIdentifier - The service identifier of the ServiceDefinition to remove.public void removeServiceDefinition(ServiceDefinition serviceDefinition)
ILocationService
removeServiceDefinition in interface ILocationServiceserviceDefinition - The ServiceDefinition to remove. This must be a ServiceDefinition
that is already registered in the location service. Equality is
decided by matching the service type and the identifier.public void removeServiceDefinitions(ServiceDefinition[] serviceDefinitions)
ILocationService
removeServiceDefinitions in interface ILocationServiceserviceDefinitions - The ServiceDefinitions to remove. These must be ServiceDefinitions
that are already registered in the location service. Equality is
decided by matching the service type and the identifier.public void saveServiceDefinition(ServiceDefinition serviceDefinition)
ILocationService
saveServiceDefinition in interface ILocationServiceserviceDefinition - The ServiceDefinition to save. This object will be updated with a
new Identifier if one is not already assigned.public void saveServiceDefinitions(ServiceDefinition[] serviceDefinitions)
ILocationService
saveServiceDefinitions in interface ILocationServiceserviceDefinitions - The ServiceDefinitions to save. These objects will be updated with
a new Identifier if one is not already assigned.public void setDefaultAccessMapping(AccessMapping accessMapping)
ILocationService
setDefaultAccessMapping in interface ILocationServiceaccessMapping - The AccessMapping that should become the default AccessMapping.
This AccessMapping must already be configured with this location
service.public ServerCapabilities getServerCapabilities()
ServerDataProvider
getServerCapabilities in interface ServerDataProvider
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||