com.microsoft.tfs.core.clients.workitem.queryhierarchy
Interface QueryHierarchy

All Superinterfaces:
QueryFolder, QueryItem

public interface QueryHierarchy
extends QueryFolder

A QueryHierarchy represents the tree of stored Work Item queries and folders that contain them.

Since:
TEE-SDK-10.1

Method Summary
 QueryItem find(com.microsoft.tfs.util.GUID id)
          Scans the query hierarchy recursively for a QueryItem with an id matching the given id.
 void refresh()
          Reloads the query hierarchy from the server.
 void reset()
          Resets the query hierarchy to its original data, removing any unsaved changes.
 void save()
          Saves any changes to the query hierarchy to the server.
 boolean supportsFolders()
          Determines whether the server supports folders in the query hierarchy.
 boolean supportsPermissions()
          Determines whether the server supports permissions on query items.
 
Methods inherited from interface com.microsoft.tfs.core.clients.workitem.queryhierarchy.QueryFolder
add, contains, containsID, containsName, getItemByID, getItemByName, getItems, newDefinition, newFolder
 
Methods inherited from interface com.microsoft.tfs.core.clients.workitem.queryhierarchy.QueryItem
delete, getID, getName, getOriginalName, getOriginalOwnerDescriptor, getOriginalParent, getOwnerDescriptor, getParent, getProject, getType, isDeleted, isDirty, isNew, isPersonal, setName, setOwnerDescriptor
 

Method Detail

supportsFolders

boolean supportsFolders()
Determines whether the server supports folders in the query hierarchy. (Team Foundation Server 2010 and newer support folders, older versions of Team Foundation Server do not.)

Returns:
true if the server supports folders, false otherwise.

supportsPermissions

boolean supportsPermissions()
Determines whether the server supports permissions on query items. (Team Foundation Server 2010 and newer support permissions, older versions of Team Foundation Server do not.)

Returns:
true if the server supports permissions, false otherwise.

find

QueryItem find(com.microsoft.tfs.util.GUID id)
Scans the query hierarchy recursively for a QueryItem with an id matching the given id.

Parameters:
id - The id of the QueryItem to query for (not null)
Returns:
The located QueryItem in the hierarchy, or null if no QueryItem exists in the hierarchy with the given id.

refresh

void refresh()
Reloads the query hierarchy from the server. Any unsaved changes to the query hierarchy will be lost.


reset

void reset()
Resets the query hierarchy to its original data, removing any unsaved changes.


save

void save()
Saves any changes to the query hierarchy to the server.

Throws:
InvalidQueryTextException - if any stored query's WIQL text is not valid


© 2015 Microsoft. All rights reserved.