|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.microsoft.tfs.core.clients.framework.catalog.CatalogService
public class CatalogService
The TFS catalog service. Implements the ICatalogService
interface.
Constructor Summary | |
---|---|
CatalogService(TFSConfigurationServer connection)
Construct the TFS Catalog Service. |
Method Summary | |
---|---|
CatalogChangeContext |
createChangeContext()
Creates a change context in which many changes can be batched |
ILocationService |
getLocationService()
Returns the location service that this catalog uses for its service definition references. |
CatalogNode[] |
getRootNodes()
|
CatalogNode[] |
queryNodes(java.lang.String[] pathSpecs,
com.microsoft.tfs.util.GUID[] resourceTypeFilters,
CatalogQueryOptions queryOptions)
Returns the catalog nodes that exist below the parentPath and have a type that is listed in resourceTypeFilters. |
CatalogNode[] |
queryNodes(java.lang.String[] pathSpecs,
com.microsoft.tfs.util.GUID[] resourceTypeFilters,
CatalogResourceProperty[] propertyFilters,
CatalogQueryOptions queryOptions)
Returns the catalog nodes that exist below the parentPath and have a type that is listed in resourceTypeFilters. |
CatalogNode[] |
queryParents(com.microsoft.tfs.util.GUID resourceIdentifier,
java.lang.String[] pathFilters,
com.microsoft.tfs.util.GUID[] resourceTypeFilters,
boolean recurseToRoot,
CatalogQueryOptions queryOptions)
Returns the nodes for the resource provided as well as the parents. |
CatalogResource[] |
queryResources(com.microsoft.tfs.util.GUID[] resourceIdentifiers,
CatalogQueryOptions queryOptions)
Returns the resource that is associated with the identifier. |
CatalogResource[] |
queryResources(com.microsoft.tfs.util.GUID[] resourceTypeIdentifiers,
CatalogResourceProperty[] propertyFilters,
CatalogQueryOptions queryOptions)
Returns the resource that is associated with the identifier. |
CatalogResource[] |
queryResourcesByType(com.microsoft.tfs.util.GUID[] resourceTypeIdentifiers,
CatalogQueryOptions queryOptions)
Returns all of the catalog resources of the provided type. |
CatalogResourceType[] |
queryResourceTypes(com.microsoft.tfs.util.GUID[] resourceTypeIdentifiers)
Returns the resource types for all of the specified identifiers. |
CatalogNode |
queryRootNode(CatalogTree tree)
Returns the specified root node. |
CatalogNode[] |
queryUpTree(java.lang.String path,
com.microsoft.tfs.util.GUID[] resourceTypeFilters,
CatalogQueryOptions queryOptions)
Queries "up" the tree from the provided path looking for the provided types in its parent nodes' children. |
void |
saveDelete(CatalogNode node,
java.lang.Boolean recurse)
Deletes this node from the catalog. |
void |
saveMove(CatalogNode nodeToMove,
CatalogNode newParent)
Adds this move to the change context. |
void |
saveNode(CatalogNode node)
Saves the updated node and its resource in the catalog. |
void |
saveResource(CatalogResource resource)
Saves the updated resource in the catalog. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CatalogService(TFSConfigurationServer connection)
connection
- a TFSConfigurationServer
Method Detail |
---|
public ILocationService getLocationService()
getLocationService
in interface ICatalogService
public CatalogResourceType[] queryResourceTypes(com.microsoft.tfs.util.GUID[] resourceTypeIdentifiers)
queryResourceTypes
in interface ICatalogService
resourceTypeIdentifiers
- Identifiers for the resource types that should be returned. If
this has a value of null or empty, all resource types will be
returned.
public CatalogResource[] queryResources(com.microsoft.tfs.util.GUID[] resourceIdentifiers, CatalogQueryOptions queryOptions)
queryResources
in interface ICatalogService
resourceIdentifiers
- The identifiers for the resources that are being search for.queryOptions
- If ExpandDependencies is specified, the Dependencies property on
nodes will contain the nodes they are dependent on. If
IncludeParents is specified, the ParentNode property on the
CatalogNode will contain the parent node. Leaving a given option
will result in the returned catalog nodes to have null for that
value. Extra data should only be retrieved if it is needed since
computing and sending information can be expensive.
public CatalogResource[] queryResourcesByType(com.microsoft.tfs.util.GUID[] resourceTypeIdentifiers, CatalogQueryOptions queryOptions)
GUID.EMPTY
is passed in, all resources are returned.
queryResourcesByType
in interface ICatalogService
resourceTypeIdentifiers
- The identifier for the type of resource to filter on.queryOptions
- If ExpandDependencies is specified, the Dependencies property on
nodes will contain the nodes they are dependent on. If
IncludeParents is specified, the ParentNode property on the
CatalogNode will contain the parent node. Leaving a given option
will result in the returned catalog nodes to have null for that
value. Extra data should only be retrieved if it is needed since
computing and sending information can be expensive.
public CatalogResource[] queryResources(com.microsoft.tfs.util.GUID[] resourceTypeIdentifiers, CatalogResourceProperty[] propertyFilters, CatalogQueryOptions queryOptions)
queryResources
in interface ICatalogService
resourceTypeIdentifiers
- The identifiers for the resources that are being search for.propertyFilters
- The set of property filters to apply to the nodes found. Matches
will be based on both the key and the value of the property
matching. If the value of a certain filter is null or empty then
it will be assumed that all nodes with the supplied property
should be returned. A match consists of a node/resource that
matches all of the propertyFilters.queryOptions
- If ExpandDependencies is specified, the Dependencies property on
nodes will contain the nodes they are dependent on. If
IncludeParents is specified, the ParentNode property on the
CatalogNode will contain the parent node. Leaving a given option
will result in the returned catalog nodes to have null for that
value. Extra data should only be retrieved if it is needed since
computing and sending information can be expensive.
public CatalogNode[] getRootNodes()
getRootNodes
in interface ICatalogService
public CatalogNode queryRootNode(CatalogTree tree)
queryRootNode
in interface ICatalogService
tree
- The tree of the desired root.
public CatalogNode[] queryNodes(java.lang.String[] pathSpecs, com.microsoft.tfs.util.GUID[] resourceTypeFilters, CatalogQueryOptions queryOptions)
queryNodes
in interface ICatalogService
pathSpecs
- The paths of the element or elements that are being searched for.
This path can contain the wildcards "*", "**" and "..." where "*"
means one-level and "**" and "..." means any number of levels.resourceTypeFilters
- The list of types that this query should include. If this is null
or empty, all types will be included.queryOptions
- If ExpandDependencies is specified, the Dependencies property on
nodes will contain the nodes they are dependent on. If
IncludeParents is specified, the ParentNode property on the
CatalogNode will contain the parent node. Leaving a given option
will result in the returned catalog nodes to have null for that
value. Extra data should only be retrieved if it is needed since
computing and sending information can be expensive.
public CatalogNode[] queryNodes(java.lang.String[] pathSpecs, com.microsoft.tfs.util.GUID[] resourceTypeFilters, CatalogResourceProperty[] propertyFilters, CatalogQueryOptions queryOptions)
queryNodes
in interface ICatalogService
pathSpecs
- The paths of the element or elements that are being searched for.
This path can contain the wildcards "*", "**" and "..." where "*"
means one-level and "**" and "..." means any number of levels.resourceTypeFilters
- The list of types that this query should include. If this is null
or empty, all types will be included.propertyFilters
- The set of property filters to apply to the nodes found. Matches
will be based on both the key and the value of the property
matching. If the value of a certain filter is null or empty then
it will be assumed that all nodes with the supplied property
should be returned. A match consists of a node/resource that
matches all of the propertyFilters.queryOptions
- If ExpandDependencies is specified, the Dependencies property on
nodes will contain the nodes they are dependent on. If
IncludeParents is specified, the ParentNode property on the
CatalogNode will contain the parent node. Leaving a given option
will result in the returned catalog nodes to have null for that
value. Extra data should only be retrieved if it is needed since
computing and sending information can be expensive.
public CatalogNode[] queryParents(com.microsoft.tfs.util.GUID resourceIdentifier, java.lang.String[] pathFilters, com.microsoft.tfs.util.GUID[] resourceTypeFilters, boolean recurseToRoot, CatalogQueryOptions queryOptions)
queryParents
in interface ICatalogService
resourceIdentifier
- The identifier for the resource who's parents are being queried.
The resource and its nodes will only be returned if they are not
filtered out.pathFilters
- Nodes will only be returned if they live under one of the paths
provided here. If this value is null or empty it will be assumed
that parents from all places within the tree are valid.resourceTypeFilters
- The list of types that this query should include. If this is null
or empty, all types will be included.recurseToRoot
- If this is true then parent nodes will be enumerated all the way
to the root. If this is false then only the first level of parents
will be returned.queryOptions
- If ExpandDependencies is specified, the Dependencies property on
nodes will contain the nodes they are dependent on. If
IncludeParents is specified, the ParentNode property on the
CatalogNode will contain the parent node. Leaving a given option
will result in the returned catalog nodes to have null for that
value. Extra data should only be retrieved if it is needed since
computing and sending information can be expensive.
public CatalogNode[] queryUpTree(java.lang.String path, com.microsoft.tfs.util.GUID[] resourceTypeFilters, CatalogQueryOptions queryOptions)
queryUpTree
in interface ICatalogService
path
- The path of the item from where the "up" query should originate.
Wildcards cannot be used in this path.resourceTypeFilters
- The list of types that this query should include. If this is null
or empty, all types will be included.queryOptions
- If ExpandDependencies is specified, the Dependencies property on
nodes will contain the nodes they are dependent on. If
IncludeParents is specified, the ParentNode property on the
CatalogNode will contain the parent node. Leaving a given option
will result in the returned catalog nodes to have null for that
value. Extra data should only be retrieved if it is needed since
computing and sending information can be expensive.
public CatalogChangeContext createChangeContext()
createChangeContext
in interface ICatalogService
public void saveDelete(CatalogNode node, java.lang.Boolean recurse)
saveDelete
in interface ICatalogService
node
- The node to delete.recurse
- True if the children nodes of this node should be deleted.public void saveMove(CatalogNode nodeToMove, CatalogNode newParent)
saveMove
in interface ICatalogService
nodeToMove
- The node to move under the newParent.newParent
- The newParent to place nodeToMove under.public void saveNode(CatalogNode node)
saveNode
in interface ICatalogService
node
- The node that has been created or updated.public void saveResource(CatalogResource resource)
saveResource
in interface ICatalogService
resource
- The resource to update.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |