com.starteam
Class TreeItem

java.lang.Object
  extended by com.starteam.TypedResource
      extended by com.starteam.LiveObject
          extended by com.starteam.TrackedObject
              extended by com.starteam.VersionedObject
                  extended by com.starteam.ViewMember
                      extended by com.starteam.Item
                          extended by com.starteam.TreeItem
All Implemented Interfaces:
ISecurable, Lockable, LockableObject, java.lang.Cloneable
Direct Known Subclasses:
Requirement, Story, Task, Topic

public class TreeItem
extends Item

A type of item with children.


Nested Class Summary
static class TreeItem.MoSCoW
          The MoSCoW value for a compliant TreeItem Type
static class TreeItem.Type
          The type of the TreeItem
static class TreeItem.WebCacheTreeItem
          TreeItem accessor for cached SDK Items contained objects are obtained from the artifact cache
 
Nested classes/interfaces inherited from class com.starteam.Item
Item.WebCacheItem
 
Nested classes/interfaces inherited from class com.starteam.ViewMember
ViewMember.LockType, ViewMember.MyLock, ViewMember.ShareState, ViewMember.WebCacheViewMember
 
Nested classes/interfaces inherited from class com.starteam.VersionedObject
VersionedObject.WebCacheVersionedObject
 
Nested classes/interfaces inherited from class com.starteam.TrackedObject
TrackedObject.WebCacheTrackedObject
 
Nested classes/interfaces inherited from class com.starteam.LiveObject
LiveObject.WebCacheLiveObject
 
Nested classes/interfaces inherited from class com.starteam.TypedResource
TypedResource.BranchState
 
Method Summary
 TreeItem createChild()
          Creates a new child item.
 TreeItem[] getChildren()
          Returns the tree items that are children of this one.
 DoubleProperty getOrderProperty()
          Returns a DoubleProperty used for ordering tree item instances Any TreeItem Type that intends to have the children of a particular parent ordered using a default numeric scheme must provide a double property to store the implicit order.
 TreeItem getParent()
          Returns the TreeItem which is the Parent of this instance, or NULL if this is a root
 int getParentID()
          Gets the ObjectID of this item's parent.
 boolean hasChildren()
          Returns true if the TreeItem has at least one child.
 boolean isEqualTo(TreeItem item)
          Compares two Items.
 void moveTo(Folder toFolder)
          Moves this item to the specified folder.
 void moveTo(TreeItem parent)
          Moves this item to the specified parent.
 void remove()
          Removes this item from its current folder.
 void setAfter(TreeItem prev)
          place this tree item after prev this and prev must both be children of a common parent
 void setBefore(TreeItem next)
          place this tree item before next this and next must both be children of a common parent
 void setBetween(TreeItem prev, TreeItem 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
 void setLast()
          place this tree item at the end of the set of all children of its parent
 Item shareTo(Folder toFolder)
          Shares this item to a new folder.
 Item smartShareTo(Folder target)
          Shares or reverse-shares this tree item to the given target folder, as appropriate.
 void update()
          Stores the underlying entity in the server.
 
Methods inherited from class com.starteam.Item
copy, deleteMergePoint, getCommonAncestor, getDebugString, getDisplayableProperties, getItemID, getMergeHistory, getNewRevisionComment, getParentContainer, getParentFolder, getParentFolderHierarchy, getParentFolderName, getParentFolderPath, getParentFolderQualifiedName, getSharedChangePackages, getSharedTraces, isEqualTo, isReverseShareRecommended, recordMergePoint, resolve, resolveMergePoint, resolveMergePointEx, reverseShareTo, reverseShareTo, toString
 
Methods inherited from class com.starteam.ViewMember
equals, findLinks, getAllLabels, getAllShares, getAttachedLabels, getAttachments, getBehavior, getCache, getComment, getDeletedBy, getDeletedTime, getDisplayValue, getDotNotation, getExclusiveLocker, getExternalID, getExternalURL, getFromHistory, getFromHistory, getFromHistory, getFromHistory, getHistory, getID, getIntegerArrayValue, getLocker, getMyLockType, getParentRevision, getPresentationID, getRights, getRootObjectID, getShare, getShare, getTraces, getValue, getView, getViewMemberRevisions, getViewVersion, getVMID, hashCode, hasPermissions, isBookmarked, isBranchable, isDeleted, isDisembodied, isEqualTo, isReadOnly, isRootShare, isUnread, lockExclusive, lockExclusive, lockNonExclusive, modifyBookmark, modifyReadStatus, putLock, setAttachments, setBehavior, setBranchOnChange, setComment, setExternalID, setExternalURL, setFixedConfiguration, setFloatingConfiguration, setRights, setValue, unlock, updateRevisionComment
 
Methods inherited from class com.starteam.VersionedObject
getBranchRevision, getRevisionNumber, getViewVersion, isFromHistory
 
Methods inherited from class com.starteam.TrackedObject
getModifiedBy, getModifiedTime
 
Methods inherited from class com.starteam.LiveObject
getCreatedBy, getCreatedTime, toStarTeamURL
 
Methods inherited from class com.starteam.TypedResource
addToIntegerArray, getBooleanValue, getByteArrayValue, getCachedProperties, getContentValue, getDateTimeValue, getDateValue, getDisplayName, getDoubleValue, getEnumDisplayName, getEnumeratedValues, getIntegerValue, getLinkValue, getLongValue, getObjectID, getPossibleValues, getServer, getStringValue, getTimeSpanValue, getType, hasCachedProperties, hasValue, isDirty, isNew, removeFromIntegerArray, setBooleanValue, setByteArrayValue, setContentValue, setDateTimeValue, setDateValue, setDoubleValue, setEnumeratedValue, setEnumeratedValues, setIntegerArrayValue, setIntegerValue, setLinkValue, setLongValue, setStringValue, setTimeSpanValue
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.starteam.ISecurable
getServer, getType
 

Method Detail

createChild

public TreeItem createChild()
Creates a new child item.

Returns:
A new child item of the appropriate type. The item is not saved to the repository until update() is called.
Throws:
DisembodiedException - If this is a disembodied item.

isEqualTo

public boolean isEqualTo(TreeItem item)
Compares two Items. The items are considered equal if:

Parameters:
item - The Item to be compared to this one.
Returns:
true if no differences were found.
See Also:
Item.copy()

getParentID

public int getParentID()
Gets the ObjectID of this item's parent. Returns -1 if this tree item has no parent.

Returns:
The ObjectID of this item's parent, or -1 if this is a root item.

getParent

public TreeItem 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

update

public void update()
Stores the underlying entity in the server. If the item is new it will be created otherwise an existing item will be modified.

Overrides:
update in class ViewMember

moveTo

public void moveTo(Folder toFolder)
Moves this item to the specified folder. Child items, if any, are also moved.

Overrides:
moveTo in class Item
Parameters:
toFolder - The new folder to which this item is to be moved.
Throws:
DisembodiedException - if the Item is disembodied
See Also:
ViewMember.isDisembodied()

moveTo

public void moveTo(TreeItem parent)
Moves this item to the specified parent. Child items, if any, are also moved. no call to update() is required.

Parameters:
parent - The new parent to which this item is to be moved.
Throws:
DisembodiedException - if the Item is disembodied
See Also:
ViewMember.isDisembodied()

shareTo

public Item shareTo(Folder toFolder)
Shares this item to a new folder. The shared item will still exist in its original folder as well as in the new one.

If this is a deleted item, shareTo() will create a new item with the same properties, but in the state it was in prior to being deleted. This provides a way to recover content from the recycle bin.

Overrides:
shareTo in class Item
Parameters:
toFolder - The new parent folder.
Returns:
The item object representing the newly shared item.
Throws:
DisembodiedException - if the Folder is disembodied.
See Also:
ViewMember.isDisembodied(), Item.moveTo(com.starteam.Folder), Item.reverseShareTo(com.starteam.Folder), ViewMember.isDeleted(), RecycleBin

smartShareTo

public Item smartShareTo(Folder target)
Shares or reverse-shares this tree item to the given target folder, as appropriate. The new share uses a time-based configuration.

Overrides:
smartShareTo in class Item
Parameters:
target - The target folder.
Returns:
The shared tree item.
See Also:
Item.isReverseShareRecommended(com.starteam.Folder)

remove

public void remove()
Removes this item from its current folder. Child items, if any, are also removed.

Overrides:
remove in class Item

getChildren

public TreeItem[] getChildren()
Returns the tree items that are children of this one.

Returns:
The tree items that are children of this one.
Throws:
DisembodiedException - if the Tree Item is disembodied
See Also:
ViewMember.isDisembodied()

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()

getOrderProperty

public DoubleProperty getOrderProperty()
Returns a DoubleProperty used for ordering tree item instances Any TreeItem Type that intends to have the children of a particular parent ordered using a default numeric scheme must provide a double property to store the implicit order. Order is computed by aggregating and dividing the order of the precedent and antecedent tree items w.r.t. the one being ordered

Returns:
a DoubleProperty used for ordering tree item instances

setBetween

public void setBetween(TreeItem prev,
                       TreeItem 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 prev)
place this tree item after prev this and prev must both be children of a common parent

Parameters:
prev - the tree item to precede this one

setBefore

public void setBefore(TreeItem next)
place this tree item before next this and next must both be children of a common parent

Parameters:
next - the tree item to succeed this one

setLast

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


setFirst

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



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