com.starteam
Class ViewMember.WebCacheViewMember

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
All Implemented Interfaces:
ArtifactCacheManager.Securable
Direct Known Subclasses:
ChangePackage.WebCacheChangePackage, Item.WebCacheItem, Trace.WebCacheTrace
Enclosing class:
ViewMember

public static class ViewMember.WebCacheViewMember
extends VersionedObject.WebCacheVersionedObject
implements ArtifactCacheManager.Securable

ViewMember accessor for cached SDK ViewMembers contained objects are obtained from the artifact cache


Method Summary
 Content.WebCacheContent[] getAttachments()
          Returns an array of attachments for this ViewMember or an empty array if there are none or if this ViewMember does not subscribe to the Attachment Service
 java.lang.String getComment()
          returns the Comment attached to this view member
 java.lang.String getDisplayValue(Property.WebCacheProperty prop)
          Gets the value of a property in a form suitable for display.
 DotNotation getDotNotation()
          Gets the dot notation identification of this resource version.
 java.lang.String getExternalID()
          Gets the external ID describing this revision of the item.
 java.lang.String getExternalURL()
          Gets the external URL describing this revision of the item.
 ViewMember.WebCacheViewMember[] getHistory()
          given a ViewMember from the cache, return the history of all revisions for this view member
 User.WebCacheUser getLocker()
          Returns the User object of the user who has this item exclusively locked, or null if no one has it locked.
 int getPresentationID()
          Returns the unique integer identifier for this resource.
 ACE.WebCacheACE[] getRights()
          Return the access rights assigned to this filter
 Share.WebCacheShare[] getShareTree()
          given a ViewMember from the cache, return it's share tree
 Trace.WebCacheTrace[] getTraces()
          Given a ViewMember in this artifact cache, resolve it to a set of locally cached Traces.
 View.WebCacheView getView()
          Gets the View containing this ViewMember.
 boolean isDeleted()
          Determines whether or not this item has been deleted.
 boolean isFloating()
          returns true if this artifact is floating
 boolean isPinned()
          returns true if this artifact is pinned
 boolean isUnread()
          Determines whether or not this artifact has been marked read in the current user context.
 void lock()
          lock the underlying viewmember using a pooled connection An exclusive lock is acquired on this viewmember alone, and is not transacted In the process, break a lock owned by another user, if any.
 void lock(ViewMember.LockType lt, boolean breakLock)
          lock the underlying viewmember using a pooled connection The lock is acquired on this viewmember alone, and is not transacted
 void modifyReadStatus(boolean bSetAsRead)
          Modifies this item's read status for the user in this context.
 void pinTo(DateTime dt)
          Changes the behavior of this artifact such that it is pinned to the specified time.
 void setAttachments(Content.WebCacheContent[] content)
          Save the attachments for this ViewMember in a StarTeam Transaction, perhaps as part of a larger set of view members which need to be saved Note that this call does not save the content.
 void setExternalID(java.lang.String externalID)
          Sets the external ID describing this revision of the item.
 void setExternalURL(java.lang.String externalURL)
          Sets the external URL describing this revision of the item.
 void setRights(ACE.WebCacheACE[] aces)
          Assign the specified access rights to this view member
 void unlock()
          unlock the underlying viewmember using a pooled connection The lock is released on this viewmember alone, and is not transacted
 void unpin()
          Changes the behavior of this artifact such that it floats at the tip.
 void updateRevisionComment(java.lang.String comment)
          Change the revision comment for this view member
 
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

getView

public View.WebCacheView getView()
Gets the View containing this ViewMember.

Returns:
The WebCacheView containing this WebCacheViewMember.
See Also:
ViewMember.isDisembodied()

lock

public void lock(ViewMember.LockType lt,
                 boolean breakLock)
lock the underlying viewmember using a pooled connection The lock is acquired on this viewmember alone, and is not transacted

Parameters:
lt - the type of Lock to acquire - the most common lock type is an exclusive lock
breakLock - true to break a lock owned by another user
See Also:
for transacted locking i.e. lock acquisition for a set of view members taken together

lock

public void lock()
lock the underlying viewmember using a pooled connection An exclusive lock is acquired on this viewmember alone, and is not transacted In the process, break a lock owned by another user, if any.

See Also:
for transacted locking i.e. lock acquisition for a set of view members taken together

getLocker

public User.WebCacheUser getLocker()
Returns the User object of the user who has this item exclusively locked, or null if no one has it locked.

Returns:
The User object of the exclusive locker of this item.
See Also:
ViewMember.Type.ExclusiveLockerProperty.NAME

getDotNotation

public DotNotation getDotNotation()
Gets the dot notation identification of this resource version.

The first version added to the repository will have a dot notation of "1.0". Each new revision will increment the version number portion so the second revision would be "1.1".

When an item branches a new branch number will be issued and revision will start counting from 0 again. For example, branching from version "1.2" might result in "1.2.5.0" after which the next version will be "1.2.5.1".

The value 5 in the previous example was assigned by the server based on the number of branches already made from the revision being branched.

Returns:
The dot notation identification of this resource version.

getPresentationID

public int getPresentationID()
Returns the unique integer identifier for this resource. on pre 14.0 servers, it returns the VMID

Returns:
the unique integer identifier for this resource.

getComment

public java.lang.String getComment()
returns the Comment attached to this view member

Returns:
the Comment attached to this view member

getExternalID

public java.lang.String getExternalID()
Gets the external ID describing this revision of the item.

Returns:
The external ID describing this revision of the item.

setExternalID

public void setExternalID(java.lang.String externalID)
Sets the external ID describing this revision of the item.

Parameters:
externalID - The external ID for the next revision of this item.

getExternalURL

public java.lang.String getExternalURL()
Gets the external URL describing this revision of the item.

Returns:
The external URL describing this revision of the item.

setExternalURL

public void setExternalURL(java.lang.String externalURL)
Sets the external URL describing this revision of the item.

Parameters:
externalURL - The external URL for the next revision of this item.

unlock

public void unlock()
unlock the underlying viewmember using a pooled connection The lock is released on this viewmember alone, and is not transacted

See Also:
for transacted unlocking i.e. locks release for a set of view members taken together

setRights

public void setRights(ACE.WebCacheACE[] aces)
Assign the specified access rights to this view member

Parameters:
aces - the rights

getRights

public ACE.WebCacheACE[] getRights()
Return the access rights assigned to this filter

Returns:
the access rights assigned to this filter

getHistory

public ViewMember.WebCacheViewMember[] getHistory()
given a ViewMember from the cache, return the history of all revisions for this view member

Returns:
the ViewMemberCollection of historical revisions

getShareTree

public Share.WebCacheShare[] getShareTree()
given a ViewMember from the cache, return it's share tree

Returns:
the ShareTree of the view member

updateRevisionComment

public void updateRevisionComment(java.lang.String comment)
Change the revision comment for this view member

Parameters:
comment - the new revision comment

getAttachments

public Content.WebCacheContent[] getAttachments()
Returns an array of attachments for this ViewMember or an empty array if there are none or if this ViewMember does not subscribe to the Attachment Service

Returns:
an array of attachments for this ViewMember

setAttachments

public void setAttachments(Content.WebCacheContent[] content)
Save the attachments for this ViewMember in a StarTeam Transaction, perhaps as part of a larger set of view members which need to be saved Note that this call does not save the content. Rather it tracks the relationship between the specified attachments and this view member An explicit call to save view members inside a transaction is required both to save these attachments on the server and to reset the association between this view member and the attachments. This set must contain existing attachments, for which nothing will change i.e. no server command will be issued, and new attachments, which will be streamed to the server Attachments to be removed should be excluded from this array Note that passing in an empty array has the effect of removing any existing attachments from this View Member Passing in NULL will throw an SDKRuntimeException

Parameters:
content - an array of attachments to save in a transaction

getTraces

public Trace.WebCacheTrace[] getTraces()
Given a ViewMember in this artifact cache, resolve it to a set of locally cached Traces. The returned Traces should only be manipulated via the ArtifactCache. Optimized to find the traces without issuing any server commands. The ViewMember specified here must belong to this Artifact Cache

Returns:
a Trace[] of applicable Traces

getDisplayValue

public java.lang.String getDisplayValue(Property.WebCacheProperty prop)
Gets the value of a property in a form suitable for display.

Parameters:
prop - A property of this item.
Returns:
The value of the property in a form suitable for display.

isDeleted

public boolean isDeleted()
Determines whether or not this item has been deleted.

As of StarTeam 9.0, we can determine from a ViewMember's properties whether or not it has been deleted.

Returns:
True if this view member is known to have been deleted; false otherwise.

isFloating

public boolean isFloating()
returns true if this artifact is floating

Returns:
true if this artifact is floating

isPinned

public boolean isPinned()
returns true if this artifact is pinned

Returns:
true if this artifact is pinned

pinTo

public void pinTo(DateTime dt)
Changes the behavior of this artifact such that it is pinned to the specified time. Specify NULL to have the artifact float at the tip The change is saved to the repository immediately; No subsequent call to update() is required.

Parameters:
dt - The time at which the configuration is pinned or NULL for this artifact to float at the tip
See Also:
ViewMember.WebCacheViewMember.isFloating(), ViewMember.WebCacheViewMember.isPinned(), ViewMember.WebCacheViewMember.unpin()

unpin

public void unpin()
Changes the behavior of this artifact such that it floats at the tip. The change is saved to the repository immediately; No subsequent call to update() is required.

See Also:
ViewMember.WebCacheViewMember.isFloating(), ViewMember.WebCacheViewMember.isPinned(), ViewMember.WebCacheViewMember.pinTo(DateTime)

isUnread

public boolean isUnread()
Determines whether or not this artifact has been marked read in the current user context.

Returns:
boolean false if this artifact has been marked as read in this user context

modifyReadStatus

public void modifyReadStatus(boolean bSetAsRead)
Modifies this item's read status for the user in this context. Note that this is an "immediate" command, i.e., no update() call is required. Note also that only the user in this context is affected. File or Folder items cannot be marked as read.

Parameters:
bSetAsRead - this item's new read status
See Also:
ViewMember.Type.UnreadByUsersProperty.NAME


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