|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.microsoft.tfs.core.clients.registration.RegistrationClient
public class RegistrationClient
A client for accessing the registration data available from a Team Foundation server.
This client provides several services on top of the Registration web service:
A RegistrationClient
should normally be obtained from a
TFSTeamProjectCollection
instead of being manually constructed.
Note: RegistrationClient is unlike other clients. TFSConnection calls into this client, and this calls back. Thus you need to be very careful of locking between TFSConnection and this.
Constructor Summary | |
---|---|
RegistrationClient(TFSTeamProjectCollection connection)
Creates a new RegistrationClient with a default refresh interval
and disk caching enabled. |
|
RegistrationClient(TFSTeamProjectCollection connection,
long refreshIntervalMillis,
boolean enableDiskCache)
Creates a new RegistrationClient , specifying the refresh interval
and disk caching policy. |
Method Summary | |
---|---|
ArtifactType |
getArtifactType(java.lang.String toolId,
java.lang.String artifactTypeName)
Gets the specified ArtifactType for the specified tool. |
ArtifactType |
getArtifactType(java.lang.String toolId,
java.lang.String artifactTypeName,
boolean forceRefresh)
Gets the specified ArtifactType for the specified tool,
specifying whether to force a refresh of the registration data from the
TF server. |
ArtifactType[] |
getArtifactTypes(java.lang.String toolId)
Gets all of the ArtifactType s for the specified tool. |
ArtifactType[] |
getArtifactTypes(java.lang.String toolId,
boolean forceRefresh)
Gets all of the ArtifactType s for the specified tool, specifying
whether to force a refresh of the registration data from the TF server. |
RegistrationExtendedAttribute |
getExtendedAttribute(java.lang.String toolId,
java.lang.String attributeName)
Gets the specified RegistrationExtendedAttribute for the
specified tool. |
RegistrationExtendedAttribute |
getExtendedAttribute(java.lang.String toolId,
java.lang.String attributeName,
boolean forceRefresh)
Gets the specified RegistrationExtendedAttribute for the
specified tool, specifying whether to force a refresh of the registration
data from the TF server. |
RegistrationExtendedAttribute[] |
getExtendedAttributes(java.lang.String toolId)
Gets all of the RegistrationExtendedAttribute s for the specified
tool. |
RegistrationExtendedAttribute[] |
getExtendedAttributes(java.lang.String toolId,
boolean forceRefresh)
Gets all of the RegistrationExtendedAttribute s for the specified
tool, specifying whether to force a refresh of the registration data from
the TF server. |
java.lang.String |
getExtendedAttributeValue(java.lang.String toolId,
java.lang.String attributeName)
Gets the specified extended attribute value for the specified tool. |
java.lang.String |
getExtendedAttributeValue(java.lang.String toolId,
java.lang.String attributeName,
boolean forceRefresh)
Gets the specified extended attribute value for the specified tool, specifying whether to force a refresh of the registration data from the TF server. |
com.microsoft.tfs.util.GUID |
getInstanceID()
Obtains the instance ID (server GUID) from the registration data. |
com.microsoft.tfs.util.GUID |
getInstanceID(boolean forceRefresh)
Obtains the instance ID (server GUID) from the registration data, specifying whether to force a refresh of the registration data from the TF server. |
OutboundLinkType[] |
getOutboundLinkTypes(java.lang.String toolId,
java.lang.String artifactTypeName)
Gets all of the OutboundLinkType s for the specified tool and
artifact type. |
OutboundLinkType[] |
getOutboundLinkTypes(java.lang.String toolId,
java.lang.String artifactTypeName,
boolean forceRefresh)
Gets all of the OutboundLinkType s for the specified tool and
artifact type, specifying whether to force a refresh of the registration
data from the TF server. |
RegistrationEntry[] |
getRegistrationEntries()
Gets all of the RegistrationEntry s. |
RegistrationEntry[] |
getRegistrationEntries(boolean forceRefresh)
Gets all of the RegistrationEntry s, specifying whether to force a
refresh of the registration data from the TF server. |
RegistrationEntry |
getRegistrationEntry(java.lang.String toolId)
Gets the RegistrationEntry for the specified tool. |
RegistrationEntry |
getRegistrationEntry(java.lang.String toolId,
boolean forceRefresh)
Gets the RegistrationEntry for the specified tool, specifying
whether to force a refresh of the registration data from the TF server. |
java.lang.String |
getRosarioURLForTeamProject(java.lang.String interfaceName,
java.lang.String projectName)
|
ServiceInterface |
getServiceInterface(java.lang.String toolId,
java.lang.String serviceInterfaceName)
Gets the specified ServiceInterface for the specified tool. |
ServiceInterface |
getServiceInterface(java.lang.String toolId,
java.lang.String serviceInterfaceName,
boolean forceRefresh)
Gets the specified ServiceInterface for the specified tool,
specifying whether to force a refresh of the registration data from the
TF server. |
ServiceInterface[] |
getServiceInterfaces(java.lang.String toolId)
Gets all of the ServiceInterface s for the specified tool. |
ServiceInterface[] |
getServiceInterfaces(java.lang.String toolId,
boolean forceRefresh)
Gets all of the ServiceInterface s for the specified tool,
specifying whether to force a refresh of the registration data from the
TF server. |
java.lang.String |
getServiceInterfaceURL(java.lang.String toolId,
java.lang.String serviceInterfaceName)
Gets the specified service interface URL for the specified tool. |
java.lang.String |
getServiceInterfaceURL(java.lang.String toolId,
java.lang.String serviceInterfaceName,
boolean forceRefresh,
boolean relative)
Gets the specified service interface URL for the specified tool, specifying whether to force a refresh of the registration data from the TF server. |
void |
refresh(boolean force)
Called to ensure that the registration data is up to date, specifying whether to force a refresh of the data from the TF server. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RegistrationClient(TFSTeamProjectCollection connection)
RegistrationClient
with a default refresh interval
and disk caching enabled.
connection
- the TFSTeamProjectCollection
to use (must not be
null
)public RegistrationClient(TFSTeamProjectCollection connection, long refreshIntervalMillis, boolean enableDiskCache)
RegistrationClient
, specifying the refresh interval
and disk caching policy.
connection
- the TFSTeamProjectCollection
to use (must not be
null
)refreshIntervalMillis
- specifies the amount of time between refreshes of the registration
data from the serverenableDiskCache
- true
to enable caching of registration data to diskMethod Detail |
---|
public RegistrationEntry[] getRegistrationEntries()
RegistrationEntry
s. The returned array is safe -
no references to the returned RegistrationEntry
s are held by this
class.
RegistrationEntry
s (never null
)public RegistrationEntry[] getRegistrationEntries(boolean forceRefresh)
RegistrationEntry
s, specifying whether to force a
refresh of the registration data from the TF server. The returned array
is safe - no references to the returned RegistrationEntry
s are
held by this class.
forceRefresh
- true
to force a call to the server to refresh the
registration data
RegistrationEntry
s (never null
)public RegistrationEntry getRegistrationEntry(java.lang.String toolId)
RegistrationEntry
for the specified tool. The returned
RegistrationEntry is safe - no reference to it is held by this class.
toolId
- specifies the tool to get the RegistrationEntry
for (case
insensitive) (must not be null
)
RegistrationEntry
for the specified tool, or
null
if the specified tool does not have a
registration entrypublic RegistrationEntry getRegistrationEntry(java.lang.String toolId, boolean forceRefresh)
RegistrationEntry
for the specified tool, specifying
whether to force a refresh of the registration data from the TF server.
The returned RegistrationEntry is safe - no reference to it is held by
this class.
toolId
- specifies the tool to get the RegistrationEntry
for (case
insensitive) (must not be null
)forceRefresh
- true
to force a call to the server to refresh the
registration data
RegistrationEntry
for the specified tool, or
null
if the specified tool does not have a
registration entrypublic ServiceInterface[] getServiceInterfaces(java.lang.String toolId)
ServiceInterface
s for the specified tool. The
returned array is safe - no references to the ServiceInterface
s
are held by this class.
toolId
- specifies the tool to get ServiceInterface
s for (case
insensitive) (must not be null
)
ServiceInterface
s for the specified tool, or
null
if the specified tool does not have a
registration entrypublic ServiceInterface[] getServiceInterfaces(java.lang.String toolId, boolean forceRefresh)
ServiceInterface
s for the specified tool,
specifying whether to force a refresh of the registration data from the
TF server. The returned array is safe - no references to the
ServiceInterface
s are held by this class.
toolId
- specifies the tool to get ServiceInterface
s for (case
insensitive) (must not be null
)forceRefresh
- true
to force a call to the server to refresh the
registration data
ServiceInterface
s for the specified tool, or
null
if the specified tool does not have a
registration entrypublic ServiceInterface getServiceInterface(java.lang.String toolId, java.lang.String serviceInterfaceName)
ServiceInterface
for the specified tool. The
returned ServiceInterface
is safe - no reference to it is held by
this class.
toolId
- specifies the tool to get the ServiceInterface
for (case
insensitive) (must not be null
)serviceInterfaceName
- specifies the service interface to get (case insensitive) (must
not be null
)
ServiceInterface
for the specified tool, or
null
if the requested service interface does not
existpublic ServiceInterface getServiceInterface(java.lang.String toolId, java.lang.String serviceInterfaceName, boolean forceRefresh)
ServiceInterface
for the specified tool,
specifying whether to force a refresh of the registration data from the
TF server. The returned ServiceInterface
is safe - no reference
to it is held by this class.
toolId
- specifies the tool to get the ServiceInterface
for (case
insensitive) (must not be null
)serviceInterfaceName
- specifies the service interface to get (case insensitive) (must
not be null
)forceRefresh
- true
to force a call to the server to refresh the
registration data
ServiceInterface
for the specified tool, or
null
if the requested service interface does not
existpublic java.lang.String getServiceInterfaceURL(java.lang.String toolId, java.lang.String serviceInterfaceName)
toolId
- specifies the tool to get the ServiceInterface
for (case
insensitive) (must not be null
)serviceInterfaceName
- specifies the service interface to get (case insensitive) (must
not be null
)
null
if no such
service interface existspublic java.lang.String getServiceInterfaceURL(java.lang.String toolId, java.lang.String serviceInterfaceName, boolean forceRefresh, boolean relative)
toolId
- specifies the tool to get the ServiceInterface
for (case
insensitive) (must not be null
)serviceInterfaceName
- specifies the service interface to get (case insensitive) (must
not be null
)forceRefresh
- true
to force a call to the server to refresh the
registration data
null
if no such
service interface existspublic ArtifactType[] getArtifactTypes(java.lang.String toolId)
ArtifactType
s for the specified tool. The
returned array is safe - no references to the ArtifactType
s are
held by this class.
toolId
- specifies the tool to get ArtifactType
s for (case
insensitive) (must not be null
)
ArtifactType
s for the specified tool, or
null
if the specified tool does not have a
registration entrypublic ArtifactType[] getArtifactTypes(java.lang.String toolId, boolean forceRefresh)
ArtifactType
s for the specified tool, specifying
whether to force a refresh of the registration data from the TF server.
The returned array is safe - no references to the ArtifactType
s
are held by this class.
toolId
- specifies the tool to get ArtifactType
s for (case
insensitive) (must not be null
)forceRefresh
- true
to force a call to the server to refresh the
registration data
ArtifactType
s for the specified tool, or
null
if the specified tool does not have a
registration entrypublic ArtifactType getArtifactType(java.lang.String toolId, java.lang.String artifactTypeName)
ArtifactType
for the specified tool. The
returned ArtifactType
is safe - no reference to it is held by
this class.
toolId
- specifies the tool to get the ArtifactType
for (case
insensitive) (must not be null
)artifactTypeName
- specifies the artifact type to get (case insensitive) (must not be
null
)
ArtifactType
for the specified tool, or
null
if the requested artifact type does not existpublic ArtifactType getArtifactType(java.lang.String toolId, java.lang.String artifactTypeName, boolean forceRefresh)
ArtifactType
for the specified tool,
specifying whether to force a refresh of the registration data from the
TF server. The returned ArtifactType
is safe - no reference to it
is held by this class.
toolId
- specifies the tool to get the ArtifactType
for (case
insensitive) (must not be null
)artifactTypeName
- specifies the artifact type to get (case insensitive) (must not be
null
)forceRefresh
- true
to force a call to the server to refresh the
registration data
ArtifactType
for the specified tool, or
null
if the requested artifact type does not existpublic OutboundLinkType[] getOutboundLinkTypes(java.lang.String toolId, java.lang.String artifactTypeName)
OutboundLinkType
s for the specified tool and
artifact type. The returned array is safe - no references to the
OutboundLinkType
s are held by this class.
toolId
- specifies the tool to get OutboundLinkType
s for (case
insensitive) (must not be null
)artifactTypeName
- specifies the artifact type to get (case insensitive) (must not be
null
)
OutboundLinkType
s for the specified tool and
artifact type, or null
if there is no such tool and
artifact typepublic OutboundLinkType[] getOutboundLinkTypes(java.lang.String toolId, java.lang.String artifactTypeName, boolean forceRefresh)
OutboundLinkType
s for the specified tool and
artifact type, specifying whether to force a refresh of the registration
data from the TF server. The returned array is safe - no references to
the OutboundLinkType
s are held by this class.
toolId
- specifies the tool to get OutboundLinkType
s for (case
insensitive) (must not be null
)artifactTypeName
- specifies the artifact type to get (case insensitive) (must not be
null
)forceRefresh
- true
to force a call to the server to refresh the
registration data
OutboundLinkType
s for the specified tool and
artifact type, or null
if there is no such tool and
artifact typepublic RegistrationExtendedAttribute[] getExtendedAttributes(java.lang.String toolId)
RegistrationExtendedAttribute
s for the specified
tool. The returned array is safe - no references to the
RegistrationExtendedAttribute
s are held by this class.
toolId
- specifies the tool to get RegistrationExtendedAttribute
s
for (case insensitive) (must not be null
)
RegistrationExtendedAttribute
s for the
specified tool, or null
if the specified tool does
not have a registration entrypublic RegistrationExtendedAttribute[] getExtendedAttributes(java.lang.String toolId, boolean forceRefresh)
RegistrationExtendedAttribute
s for the specified
tool, specifying whether to force a refresh of the registration data from
the TF server. The returned array is safe - no references to the
RegistrationExtendedAttribute
s are held by this class.
toolId
- specifies the tool to get RegistrationExtendedAttribute
s
for (case insensitive) (must not be null
)forceRefresh
- true
to force a call to the server to refresh the
registration data
RegistrationExtendedAttribute
s for the
specified tool, or null
if the specified tool does
not have a registration entrypublic RegistrationExtendedAttribute getExtendedAttribute(java.lang.String toolId, java.lang.String attributeName)
RegistrationExtendedAttribute
for the
specified tool. The returned RegistrationExtendedAttribute
is
safe - no reference to it is held by this class.
toolId
- specifies the tool to get the
RegistrationExtendedAttribute
for (case insensitive) (must
not be null
)attributeName
- specifies the attribute to get (case sensitive) (must not be
null
)
RegistrationExtendedAttribute
for the
specified tool, or null
if no such attribute existspublic RegistrationExtendedAttribute getExtendedAttribute(java.lang.String toolId, java.lang.String attributeName, boolean forceRefresh)
RegistrationExtendedAttribute
for the
specified tool, specifying whether to force a refresh of the registration
data from the TF server. The returned
RegistrationExtendedAttribute
is safe - no reference to it is
held by this class.
toolId
- specifies the tool to get the
RegistrationExtendedAttribute
for (case insensitive) (must
not be null
)attributeName
- specifies the attribute to get (case sensitive) (must not be
null
)forceRefresh
- true
to force a call to the server to refresh the
registration data
RegistrationExtendedAttribute
for the
specified tool, or null
if no such attribute existspublic java.lang.String getExtendedAttributeValue(java.lang.String toolId, java.lang.String attributeName)
toolId
- specifies the tool to get the
RegistrationExtendedAttribute
for (case insensitive) (must
not be null
)attributeName
- specifies the attribute to get (case sensitive) (must not be
null
)
null
if no such
value existspublic java.lang.String getExtendedAttributeValue(java.lang.String toolId, java.lang.String attributeName, boolean forceRefresh)
toolId
- specifies the tool to get the
RegistrationExtendedAttribute
for (case insensitive) (must
not be null
)attributeName
- specifies the attribute to get (case sensitive) (must not be
null
)forceRefresh
- true
to force a call to the server to refresh the
registration data
null
if no such
value existspublic com.microsoft.tfs.util.GUID getInstanceID()
null
if the instance ID
could not be determinedpublic com.microsoft.tfs.util.GUID getInstanceID(boolean forceRefresh)
forceRefresh
- true
to force a call to the server to refresh the
registration data
null
if the instance ID
could not be determinedpublic void refresh(boolean force)
false
and the cached data not stale, this method does
nothing. Otherwise, the TF server is contacted to get the latest
registration data.
force
- true
to force a server refresh even if the cached
data is not stalepublic java.lang.String getRosarioURLForTeamProject(java.lang.String interfaceName, java.lang.String projectName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |