com.starteam
Class Item.WebCacheItem

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
All Implemented Interfaces:
ArtifactCacheManager.Securable
Direct Known Subclasses:
ChangeRequest.WebCacheChangeRequest, Concept.WebCacheConcept, File.WebCacheFile, Folder.WebCacheFolder, Sprint.WebCacheSprint, TreeItem.WebCacheTreeItem, WhiteBoard.WebCacheWhiteBoard
Enclosing class:
Item

public static class Item.WebCacheItem
extends ViewMember.WebCacheViewMember

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


Method Summary
static Item.WebCacheItem create(ArtifactCacheManager.Context cntxt, Folder.WebCacheFolder parent, Item.Type.WebCacheItemType typ)
          Creates a Item on the server.
 Label.WebCacheLabel[] getLabels()
          given a view member from the cache, return all labels attached to any version of this view member
 Trace.WebCacheTrace[] getLinks()
          given a view member from the cache, return all Traces and (old style) internal Links (adapted as pseudo Traces) for which this view member is an end point.
 Folder.WebCacheFolder getParentFolder()
          Returns the folder in which this item exists.
 void moveTo(Folder.WebCacheFolder parent)
          Re-parent this item, moving it to the specified Folder as an immediate child This is an 'immediate' operation, executed using the connection pool Note that moving a leaf tree item to a folder has the effect of changing the tree item to a root in the new parent folder.
 void moveTo(View.WebCacheView parent)
          Re-parent this item, moving it to the specified View as an immediate child This is an 'immediate' operation, executed using the connection pool
 
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 Item.WebCacheItem create(ArtifactCacheManager.Context cntxt,
                                       Folder.WebCacheFolder parent,
                                       Item.Type.WebCacheItemType typ)
Creates a Item on the server. This item may be saved by assigning the various properties and then calling update() on the WebCacheItem 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 item will be created. The parent folder should be from the artifact cache
typ - The type of item to create
Returns:
the newly created Item.WebCacheItem, wrapping a new Item

moveTo

public void moveTo(Folder.WebCacheFolder parent)
Re-parent this item, moving it to the specified Folder as an immediate child This is an 'immediate' operation, executed using the connection pool Note that moving a leaf tree item to a folder has the effect of changing the tree item to a root in the new parent folder. However, children of the leaf (if any) continue to be leaf tree items.

Parameters:
parent - the new parent
See Also:
for performing transacted moves to folders

moveTo

public void moveTo(View.WebCacheView parent)
Re-parent this item, moving it to the specified View as an immediate child This is an 'immediate' operation, executed using the connection pool

Parameters:
parent - the new parent view (really, the root folder of the specified view)
See Also:
for performing transacted moves to views or folders

getLabels

public Label.WebCacheLabel[] getLabels()
given a view member from the cache, return all labels attached to any version of this view member

Returns:
an array of labels

getLinks

public Trace.WebCacheTrace[] getLinks()
given a view member from the cache, return all Traces and (old style) internal Links (adapted as pseudo Traces) for which this view member is an end point. Note that this method will issue a server command on the connection pool to find the links (which are not cached in the artifact cache) Note that the returned (pseudo) Traces are not objects from the ArtifactCache, so an application should be careful in working with them. Specifically, api's like getSource() and getTarget() may return null. Additionally, if these api's do not return null, it is likely that the returned objects (from the tip) are at revisions that are not necessarily those of the link endpoints. However, getSourceLink() and getTargetLink() return WebCacheLinkValue objects adapter to the underlying link end points, which provide the correct revision information. These 'Traces are essentially read-only. Attempts to change them will have unforseen consequences

Returns:
an array of web cache trace objects

getParentFolder

public Folder.WebCacheFolder getParentFolder()
Returns the folder in which this item exists.

Returns:
the folder in which this item exists.
Throws:
DisembodiedException - if the Item is disembodied
See Also:
ViewMember.isDisembodied()


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