com.starteam
Class TreeItem.WebCacheTreeItem

java.lang.Object
  extended by com.starteam.LiveObject.WebCacheLiveObject
      extended by com.starteam.TrackedObject.WebCacheTrackedObject
          extended by com.starteam.VersionedObject.WebCacheVersionedObject
              extended by com.starteam.ViewMember.WebCacheViewMember
                  extended by com.starteam.Item.WebCacheItem
                      extended by com.starteam.TreeItem.WebCacheTreeItem
All Implemented Interfaces:
ArtifactCacheManager.Securable
Direct Known Subclasses:
Requirement.WebCacheRequirement, Story.WebCacheStory, Task.WebCacheTask, Topic.WebCacheTopic
Enclosing class:
TreeItem

public static class TreeItem.WebCacheTreeItem
extends Item.WebCacheItem

TreeItem accessor for cached SDK Items contained objects are obtained from the artifact cache


Method Summary
static TreeItem.WebCacheTreeItem create(ArtifactCacheManager.Context cntxt, Folder.WebCacheFolder parent, TreeItem.Type.WebCacheTreeItemType typ)
          Creates a TreeItem on the server.
static TreeItem.WebCacheTreeItem create(ArtifactCacheManager.Context cntxt, TreeItem.WebCacheTreeItem parent)
          Creates a TreeItem on the server.
 TreeItem.WebCacheTreeItem[] getChildren(Filter.WebCacheFilter fltr)
          given a TreeItem from the ArtifactCache, return all those of its children visible to the specified user Note that this is probably a subset of all the children of this TreeItem
 TreeItem.WebCacheTreeItem getParent()
          Returns the TreeItem which is the Parent of this instance, or NULL if this is a root
 boolean hasChildren()
          Returns true if the TreeItem has at least one child.
 void moveTo(TreeItem.WebCacheTreeItem parent)
          Re-parent this tree item, moving it to the specified TreeItem as an immediate child This is an 'immediate' operation, executed using the connection pool Currently, moving tree items to new tree item parents is not supported through the WebCacheViewMemberCollection
 void setAfter(TreeItem.WebCacheTreeItem prev)
          place this tree item after prev this and prev must both be children of a common parent tree item or must be root tree items in the same folder
 void setBefore(TreeItem.WebCacheTreeItem next)
          place this tree item before next this and next must both be children of a common parent tree item or must be root tree items in the same folder
 void setBetween(TreeItem.WebCacheTreeItem prev, TreeItem.WebCacheTreeItem next)
          place this tree item in between prev and next.
 void setFirst()
          place this tree item at the head of the set of all children of its parent treeitem or folder
 void setLast()
          place this tree item at the end of the set of all children of its parent treeitem or folder
 
Methods inherited from class com.starteam.Item.WebCacheItem
create, getLabels, getLinks, getParentFolder, moveTo, moveTo
 
Methods inherited from class com.starteam.ViewMember.WebCacheViewMember
getAttachments, getComment, getDisplayValue, getDotNotation, getExternalID, getExternalURL, getHistory, getLocker, getPresentationID, getRights, getShareTree, getTraces, getView, isDeleted, isFloating, isPinned, isUnread, lock, lock, modifyReadStatus, pinTo, setAttachments, setExternalID, setExternalURL, setRights, unlock, unpin, updateRevisionComment
 
Methods inherited from class com.starteam.VersionedObject.WebCacheVersionedObject
getRevisionNumber, getRootObjectID, getViewVersion, isFromHistory
 
Methods inherited from class com.starteam.TrackedObject.WebCacheTrackedObject
getModifiedBy, getModifiedTime
 
Methods inherited from class com.starteam.LiveObject.WebCacheLiveObject
addTo, equals, getContext, getCreatedBy, getCreatedTime, getDisplayName, getID, getObjectID, getServer, getType, getValue, getValue, hashCode, hasValue, isDirty, isNew, refresh, remove, removeFrom, setValue, setValue, toStarTeamURL, update
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static TreeItem.WebCacheTreeItem create(ArtifactCacheManager.Context cntxt,
                                               Folder.WebCacheFolder parent,
                                               TreeItem.Type.WebCacheTreeItemType typ)
Creates a TreeItem on the server. This item may be saved by assigning the various properties and then calling update() on the WebCacheTreeItem object, or it may be added to a WebCacheViewMemberCollection, which is then saved in a transacted context.

Parameters:
cntxt - the ArtifactCacheManager User Session Context
parent - the parent folder in which this new treeitem will be created. The parent folder should be from the artifact cache
typ - The type of tree item to create
Returns:
the newly created TreeItem.WebCacheTreeItem, wrapping a new TreeItem

create

public static TreeItem.WebCacheTreeItem create(ArtifactCacheManager.Context cntxt,
                                               TreeItem.WebCacheTreeItem parent)
Creates a TreeItem on the server. This item may be saved by assigning the various properties and then calling update() on the WebCacheTreeItem object, or it may be added to a WebCacheViewMemberCollection, which is then saved in a transacted context.

Parameters:
cntxt - the ArtifactCacheManager User Session Context
parent - the parent Tree Item to this new treeitem . The parent tree item should be from the artifact cache
Returns:
the newly created TreeItem.WebCacheTreeItem, wrapping a new TreeItem

moveTo

public void moveTo(TreeItem.WebCacheTreeItem parent)
Re-parent this tree item, moving it to the specified TreeItem as an immediate child This is an 'immediate' operation, executed using the connection pool Currently, moving tree items to new tree item parents is not supported through the WebCacheViewMemberCollection

Parameters:
parent - the new parent

getParent

public TreeItem.WebCacheTreeItem getParent()
Returns the TreeItem which is the Parent of this instance, or NULL if this is a root

Returns:
the TreeItem which is the Parent of this instance, or NULL if this is a root

hasChildren

public boolean hasChildren()
Returns true if the TreeItem has at least one child.

Returns:
True if at least one child exists, false if no children
Throws:
DisembodiedException - if the Tree Item is disembodied
See Also:
ViewMember.isDisembodied()

getChildren

public TreeItem.WebCacheTreeItem[] getChildren(Filter.WebCacheFilter fltr)
given a TreeItem from the ArtifactCache, return all those of its children visible to the specified user Note that this is probably a subset of all the children of this TreeItem

Parameters:
fltr - the Filter to be applied for sorting or NULL.
Returns:
an array of visible children (may be empty, but never NULL)

setBetween

public void setBetween(TreeItem.WebCacheTreeItem prev,
                       TreeItem.WebCacheTreeItem next)
place this tree item in between prev and next. this, prev, next must all be children of a common parent

Parameters:
prev - the tree item to precede this one
next - the tree item to succeed this one

setAfter

public void setAfter(TreeItem.WebCacheTreeItem prev)
place this tree item after prev this and prev must both be children of a common parent tree item or must be root tree items in the same folder

Parameters:
prev - the tree item to precede this one

setBefore

public void setBefore(TreeItem.WebCacheTreeItem next)
place this tree item before next this and next must both be children of a common parent tree item or must be root tree items in the same folder

Parameters:
next - the tree item to succeed this one

setFirst

public void setFirst()
place this tree item at the head of the set of all children of its parent treeitem or folder


setLast

public void setLast()
place this tree item at the end of the set of all children of its parent treeitem or folder



StarTeam SDK 14.0, Build 21
Copyright © 2003-2012 Borland Software Corporation. All rights reserved.