com.starbase.starteam
Class TreeItem

java.lang.Object
  |
  +--com.starbase.starteam.CacheRef
        |
        +--com.starbase.starteam.NamedCacheRef
              |
              +--com.starbase.starteam.TypedResource
                    |
                    +--com.starbase.starteam.SimpleTypedResource
                          |
                          +--com.starbase.starteam.Item
                                |
                                +--com.starbase.starteam.TreeItem
All Implemented Interfaces:
java.lang.Cloneable, ISecurable, ISecurableObject
Direct Known Subclasses:
Task, Topic

public class TreeItem
extends Item

A type of item with children.


Nested Class Summary
 
Nested classes inherited from class com.starbase.starteam.Item
Item.LockType
 
Method Summary
 TreeItem createChild()
          Creates a new child item.
 int getParentID()
          Gets the ObjectID of this item's parent.
 void move(Folder toFolder)
          Deprecated. Use moveTo(). Note that move() does not work correctly for TreeItems, because it does not move child items or update the parent object IDs correctly.
 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.
 Item shareTo(Folder toFolder)
          Shares this item to a new folder.
 
Methods inherited from class com.starbase.starteam.Item
acquireOwnership, addAttachment, copy, createAttachment, createAttachmentFromFile, createItem, deleteMergePoint, discard, equals, get, getACL, getAllLabels, getAttachedLabels, getAttachment, getAttachmentIDs, getAttachmentNames, getAttachmentToFile, getBehavior, getBranchRevisionFromDotNotation, getByProperty, getByPropertyID, getByteArray, getCachedProperties, getComment, getCommonAncestor, getCreatedBy, getCreatedTime, getDeletedTime, getDeletedUserID, getDisplayValue, getDotNotation, getDouble, getEnumDisplayName, getFlag, getFlagDisplayName, getFromHistoryByDate, getFromHistoryByLabelID, getFromHistoryByVersion, getHistory, getID, getInt, getIntArray, getItemID, getItemRevisions, getLocker, getMergeHistory, getModifiedBy, getModifiedTime, getMyLock, getNewRevisionComment, getObjectID, getOLEDate, getOwner, getParentContainer, getParentFolder, getParentFolderHierarchy, getParentFolderName, getParentFolderPath, getParentFolderQualifiedName, getParentRevision, getPossibleFlag, getPossibleReadStatus, getPossibleValues, getPropertyNames, getReadStatus, getReadStatusDisplayName, getReference, getReferences, getRevisionNumber, getRootObjectID, getServer, getString, getType, getTypeNames, getView, getViewVersion, getViewVersionFromDotNotation, hashCode, hasPermission, hasValues, isBranchable, isDeleted, isDirty, isDisembodied, isEqualTo, isFromHistory, isNew, isRefreshRequired, isRefreshRequired, isReverseShareRecommended, isRootShare, lock, modifyFlagForUser, modifyReadStatusForUser, populate, populate, put, putByPropertyID, putLock, recordMergePoint, refresh, refresh, removeAttachment, resolveMergePoint, reverseShareTo, setACL, setBehavior, setBranchOnChange, setComment, setFixedConfig, setFloatingConfig, smartShareTo, toDebugString, toString, unlock, update, updateRevisionComment
 
Methods inherited from class com.starbase.starteam.TypedResource
addToIntArray, removeFromIntArray
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

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:
DisembodiedItemException - If this is a disembodied item.

getParentID

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

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

move

public void move(Folder toFolder)
Deprecated. Use moveTo(). Note that move() does not work correctly for TreeItems, because it does not move child items or update the parent object IDs correctly.

Moves this item to the specified folder. Child items, if any, are also moved.

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

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:
DisembodiedItemException - if the Item is disembodied
See Also:
Item.isDisembodied()

moveTo

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

Parameters:
parent - The new parent to which this item is to be moved.
Throws:
DisembodiedItemException - if the Item is disembodied
See Also:
Item.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:
DisembodiedItemException - if the Folder is disembodied.
See Also:
Item.isDisembodied(), Item.moveTo(com.starbase.starteam.Folder), Item.reverseShareTo(com.starbase.starteam.Folder), Item.isDeleted(), RecycleBin

remove

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

Overrides:
remove in class Item


StarTeam SDK 10.4, Build 36
Copyright © 2003-2008 Borland Software Corporation. All rights reserved.