|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ILocationService
The service responsible for providing a connection to a Team Foundation Server as well as the locations of other services that are available on it.
Method Summary | |
---|---|
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. |
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. |
AccessMapping |
getAccessMapping(java.lang.String moniker)
Gets the AccessMapping with the specified moniker. |
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. |
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 |
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. |
Method Detail |
---|
AccessMapping getClientAccessMapping()
AccessMapping getDefaultAccessMapping()
AccessMapping[] getConfiguredAccessMappings()
void saveServiceDefinition(ServiceDefinition serviceDefinition)
serviceDefinition
- The ServiceDefinition to save. This object will be updated with a
new Identifier if one is not already assigned.
InvalidServiceDefinitionException
- The ServiceDefinition being saved is not valid.
AccessMappingNotRegisteredException
- The ServiceDefinition references an AccessMapping that has not
been registered.
DuplicateLocationMappingException
- Thrown if a given AccessMapping has two or more
LocationMappings on a ServiceDefinition.void saveServiceDefinitions(ServiceDefinition[] serviceDefinitions)
serviceDefinitions
- The ServiceDefinitions to save. These objects will be updated with
a new Identifier if one is not already assigned.
InvalidServiceDefinitionException
- The ServiceDefinition being saved is not valid.
AccessMappingNotRegisteredException
- The ServiceDefinition references an AccessMapping that has not
been registered.
DuplicateLocationMappingException
- Thrown if a given AccessMapping has two or more
LocationMappings on a ServiceDefinitionvoid removeServiceDefinition(java.lang.String serviceType, com.microsoft.tfs.util.GUID serviceIdentifier)
serviceType
- The service type of the ServiceDefinition to remove.serviceIdentifier
- The service identifier of the ServiceDefinition to remove.
IllegalDeleteSelfReferenceServiceDefinitionExceptio
- Thrown if the caller tries to delete the self-reference
(location service) ServiceDefinition.void removeServiceDefinition(ServiceDefinition serviceDefinition)
serviceDefinition
- 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.
IllegalDeleteSelfReferenceServiceDefinitionException
- Thrown if the caller tries to delete the self-reference
(location service) ServiceDefinition.void removeServiceDefinitions(ServiceDefinition[] serviceDefinitions)
serviceDefinitions
- 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.
IllegalDeleteSelfReferenceServiceDefinitionException
- Thrown if the caller tries to delete the self-reference
(location service) ServiceDefinition.ServiceDefinition findServiceDefinition(java.lang.String serviceType, com.microsoft.tfs.util.GUID serviceIdentifier)
serviceType
- The service type of the ServiceDefinition to find.serviceIdentifier
- The service identifier of the ServiceDefinition to find.
ServiceDefinition[] findServiceDefinitions(java.lang.String serviceType)
serviceType
- 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.
ServiceDefinition[] findServiceDefinitionsByToolType(java.lang.String toolType)
toolType
- 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.
java.lang.String locationForCurrentConnection(java.lang.String serviceType, com.microsoft.tfs.util.GUID serviceIdentifier)
serviceType
- The service type of the ServiceDefinition to find the location
for.serviceIdentifier
- The service identifier of the ServiceDefinition to find the
location for.
InvalidServiceDefinitionException
- The associated ServiceDefinition is not valid and no location
can be found.java.lang.String locationForCurrentConnection(ServiceDefinition serviceDefinition)
serviceDefinition
- The ServiceDefinition to find the location for.
InvalidServiceDefinitionException
- The ServiceDefinition passed in is not valid and no location
can be found.java.lang.String locationForAccessMapping(java.lang.String serviceType, com.microsoft.tfs.util.GUID serviceIdentifier, AccessMapping accessMapping)
serviceType
- 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.
InvalidServiceDefinitionException
- The associated ServiceDefinition is not valid and no location
can be found.
ServiceDefinitionDoesNotExistException
- A ServiceDefinition with the provided service type and
identifier does not exist.
InvalidAccessPointException
- The AccessMapping passed in does not have a valid access
point.java.lang.String locationForAccessMapping(ServiceDefinition serviceDefinition, AccessMapping accessMapping)
serviceDefinition
- The ServiceDefinition to find the location for.accessMapping
- The AccessMapping to find the location for.
InvalidServiceDefinitionException
- The ServiceDefinition passed in is not valid.
InvalidAccessPointException
- The AccessMapping passed in does not have a valid access
point.java.lang.String locationForAccessMapping(ServiceDefinition serviceDefinition, AccessMapping accessMapping, boolean encodeRelativeComponents)
serviceDefinition
- 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.
InvalidServiceDefinitionException
- The ServiceDefinition passed in is not valid.
InvalidAccessPointException
- The AccessMapping passed in does not have a valid access
point.AccessMapping configureAccessMapping(java.lang.String moniker, java.lang.String displayName, java.lang.String accessPoint, boolean makeDefault)
moniker
- 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.
InvalidAccessPointException
- Thrown if the access point for this AccessMapping is invalid
or if it conflicts with an already registered access point.void setDefaultAccessMapping(AccessMapping accessMapping)
accessMapping
- The AccessMapping that should become the default AccessMapping.
This AccessMapping must already be configured with this location
service.
AccessMappingNotRegisteredException
- The AccessMapping being set to the default has not been
registered.AccessMapping getAccessMapping(java.lang.String moniker)
moniker
- The moniker for the desired AccessMapping. This value cannot be
null or empty.
void removeAccessMapping(java.lang.String moniker)
moniker
- The moniker for the AccessMapping to remove.
RemoveAccessMappingException
- Thrown if the caller tries to remove the default AccessMapping
and this location service cannot inherit its default
AccessMapping from a parent.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |