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

All Known Subinterfaces:
QueryDefinition, QueryFolder, QueryHierarchy

public interface QueryItem

Base query item class, representing any hierarchical query node (a QueryFolder or a QueryDefinition).

Since:
TEE-SDK-10.1

Method Summary
 void delete()
          Deletes this query item from the server.
 com.microsoft.tfs.util.GUID getID()
          Returns the unique ID for this QueryItem.
 java.lang.String getName()
          Gets the name of this query item.
 java.lang.String getOriginalName()
          Gets the original name of this query item, before any unsaved modifications were made to the hierarchy.
 IdentityDescriptor getOriginalOwnerDescriptor()
          Gets the original owner's IdentityDescriptor for this query item, before any unsaved modifications were made to the hierarchy.
 QueryFolder getOriginalParent()
          Gets the original parent folder of this query item, before any unsaved modifications were made to the hierarchy.
 IdentityDescriptor getOwnerDescriptor()
          Gets the owner's IdentityDescriptor for this query item.
 QueryFolder getParent()
          Gets the parent folder of this query item.
 Project getProject()
          Returns the Project that this QueryItem is associated with.
 QueryItemType getType()
          Gets the QueryItemType for this query item, determining whether it is a Team Project (ie, the query hierarchy root), a query folder or a query definition.
 boolean isDeleted()
          Queries the deletion state of this query item.
 boolean isDirty()
          Determines whether this query item is dirty and has changes that have not been saved to the server, including creation or deletion.
 boolean isNew()
          Determines whether this query item is newly created and has not yet been saved to the server.
 boolean isPersonal()
          Determines whether this is a personal (private to the owner) query item.
 void setName(java.lang.String name)
          Sets the name of this item.
 void setOwnerDescriptor(IdentityDescriptor ownerDescriptor)
          Sets the owner of this query item to be the given IdentityDescriptor.
 

Method Detail

getID

com.microsoft.tfs.util.GUID getID()
Returns the unique ID for this QueryItem.

Returns:
The id for this QueryItem.

getProject

Project getProject()
Returns the Project that this QueryItem is associated with. Will return null if this is a newly created QueryItem with no project associated.

Returns:
The Project this QueryItem is associated with, or null.

getName

java.lang.String getName()
Gets the name of this query item.

Returns:
The name of this query item.

getOriginalName

java.lang.String getOriginalName()
Gets the original name of this query item, before any unsaved modifications were made to the hierarchy.

Returns:
The original name of this query item.

setName

void setName(java.lang.String name)
Sets the name of this item.

Parameters:
name - The new name for this item (not null).

getParent

QueryFolder getParent()
Gets the parent folder of this query item.

Returns:
The parent QueryFolder, or null if this item is the hierarchy root.

getOriginalParent

QueryFolder getOriginalParent()
Gets the original parent folder of this query item, before any unsaved modifications were made to the hierarchy.

Returns:
The parent QueryFolder, or null if this item is the hierarchy root.

getOwnerDescriptor

IdentityDescriptor getOwnerDescriptor()
Gets the owner's IdentityDescriptor for this query item.

Returns:
This query item's owner's IdentityDescriptor.

getOriginalOwnerDescriptor

IdentityDescriptor getOriginalOwnerDescriptor()
Gets the original owner's IdentityDescriptor for this query item, before any unsaved modifications were made to the hierarchy.

Returns:
This query item's original owner's IdentityDescriptor.

setOwnerDescriptor

void setOwnerDescriptor(IdentityDescriptor ownerDescriptor)
Sets the owner of this query item to be the given IdentityDescriptor.

Parameters:
ownerDescriptor - The new owner's IdentityDescriptor.
Throws:
WorkItemException - if this server does not support permissions on query items.

delete

void delete()
Deletes this query item from the server.

Throws:
WorkItemException - if this query item cannot be deleted because it has already been deleted or it is the query hierarchy root.

isDeleted

boolean isDeleted()
Queries the deletion state of this query item.

Returns:
true if this query item has been removed from the hierarchy, false otherwise.

isPersonal

boolean isPersonal()
Determines whether this is a personal (private to the owner) query item.

Returns:
true if this query item is personal, false otherwise.

isNew

boolean isNew()
Determines whether this query item is newly created and has not yet been saved to the server.

Returns:
true if this query item is new, false otherwise.

isDirty

boolean isDirty()
Determines whether this query item is dirty and has changes that have not been saved to the server, including creation or deletion.

Returns:
true if this query item is dirty, false otherwise.

getType

QueryItemType getType()
Gets the QueryItemType for this query item, determining whether it is a Team Project (ie, the query hierarchy root), a query folder or a query definition.

Returns:
The QueryItemType for this query item.


© 2015 Microsoft. All rights reserved.