com.starteam
Class ViewMember

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
All Implemented Interfaces:
ISecurable, Lockable, LockableObject, java.lang.Cloneable
Direct Known Subclasses:
ChangePackage, Item, Trace

public abstract class ViewMember
extends VersionedObject
implements LockableObject, ISecurable

A VersionedObject that lives in a View.


Nested Class Summary
static class ViewMember.LockType
          A representation of the available lock types.
static class ViewMember.MyLock
          The set of enumerations for a Locked View Member
static class ViewMember.ShareState
          The enumeration of all Share States
static class ViewMember.Type
          The type of the View
static class ViewMember.WebCacheViewMember
          ViewMember accessor for cached SDK ViewMembers contained objects are obtained from the artifact cache
 
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
 ViewMember copy()
          Creates a copy of the ViewMember and all of its properties.
 boolean equals(java.lang.Object another)
          Returns true if the specified Object identifies the same exact Item.
 Link[] findLinks()
          Gets the links that have this view member as an endpoint.
 Label[] getAllLabels()
          Returns all labels attached to any version of this resource.
 Share[] getAllShares()
          Returns the shares for this view member.
 Label[] getAttachedLabels()
          Gets the labels attached to any version of this resource.
 Content[] 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
 ViewMemberBehavior getBehavior()
          Returns ViewMemberBehavior object associated with this ViewMember.
 CacheService getCache()
          Gets a cache service that can be used to populate, refresh or discard this ViewMember.
 java.lang.String getComment()
          Gets the comment describing this revision of the item.
 User getDeletedBy()
          For deleted view members, returns the User object who deleted the view member.
 DateTime getDeletedTime()
          For deleted view members, returns the time the item was deleted.
 java.lang.String getDisplayValue(Property prop)
          Gets the value of a property in a form suitable for display.
 DotNotation getDotNotation()
          Gets the dot notation identification of this resource version.
 User getExclusiveLocker()
          Gets the User that has this resource exclusively locked, or null if no one has it locked.
 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 getFromHistory(DateTime date)
          Returns the most recent version of this resource as of the specified date.
 ViewMember getFromHistory(int viewVersion)
          Returns the specified version of this item based on the view version number.
 ViewMember getFromHistory(Label label)
          Gets the version of this resource to which the given label is attached.
 ViewMember getFromHistory(PromotionState ps)
          Gets the version of this resource based on the PromotionState specified.
 ViewMemberCollection getHistory()
          Returns the past versions of this ViewMember.
 int getID()
          Gets the unique identifier for this resource.
 int[] getIntegerArrayValue(Property property)
          A type-safe accessor method for returning int[] valued properties.
 User getLocker()
          Returns the User object of the user who has this item exclusively locked, or null if no one has it locked.
 ViewMember.LockType getMyLockType()
          Returns the lock status of this ViewMember for the currently logged in user.
 ISecurableContainer getParentContainer()
          If there are no access rights explicitly assigned to this object, then the effective access rights come from a parent container.
 int getParentRevision()
          Returns the revision number at which this resource was branched.
 int getPresentationID()
          Returns the unique integer identifier for this resource.
 ACE[] getRights()
          Returns the Access Control List for this item.
 int getRootObjectID()
          Gets the root object ID for this resource.
 Share getShare()
          Get the share for this view member.
 Share getShare(ViewConfiguration config)
          Returns the Share for this item, as of the configuration specified by the config argument, whether the item is live or deleted.
 TraceCollection getTraces(boolean includeLinks)
          Gets all traces that reference any revision of this view member either as the source or the target that are stored on the same server as this view member.
 java.lang.Object getValue(Property property)
          Returns the value of the property.
 View getView()
          Gets the View containing this ViewMember.
 ViewMemberRevision[] getViewMemberRevisions()
          Returns the ViewMember revisions for this item.
 int getViewVersion()
          The version number of this item calculated by counting direct ancestors of this viewmember from this version to the initial version.
 int getVMID()
          Gets the unique identifier for this ViewMember.
 int hashCode()
          Return a hashcode for this view member.
 boolean hasPermissions(PermissionCollection permissions)
          Returns true if desired permissions are granted
 boolean isBookmarked()
          Determines whether or not this artifact has been flagged by the currently logged-in user.
 boolean isBranchable()
          Returns true if this item is a type that is branchable.
 boolean isDeleted()
          Determines whether or not this item has been deleted.
 boolean isDisembodied()
          A disembodied Item is one which does not have its full View and Folder context.
 boolean isEqualTo(ViewMember viewMember)
          Compares two ViewMembers.
 boolean isReadOnly()
          Determines whether or not the given ViewMember is read-only.
 boolean isRootShare()
          Determines whether or not this item is the root share of its share tree.
 boolean isUnread()
          Determines whether or not this artifact has been marked read by the currently logged-in user.
 void lockExclusive()
          Obtains an exclusive lock on this resource without attempting to break an existing lock.
 void lockExclusive(boolean breakLock)
          Obtains an exclusive lock on this resource.
 void lockNonExclusive()
          Obtains a non-exclusive lock on this resource without attempting to break an existing lock.
 void modifyBookmark(boolean setFlagged)
          Modifies this item's flag for the logged-in user.
 void modifyReadStatus(boolean bSetAsRead)
          Modifies this item's read status for the logged-in user.
 void putLock(ViewMember.LockType lockType, boolean breakLock)
          Sets the current user's lock for this item.
 void remove()
          Removes this ViewMember from the view.
 void setAttachments(Content[] content)
          Save the attachments for this ViewMember This set must contain existing attachments, for which nothing will change i.e.
 void setBehavior(ViewMemberBehavior behavior)
          Changes the behavior of this ViewMember.
 void setBranchOnChange(boolean bBranchOnChange)
          Sets the "Branch On Change" behavior.
 void setComment(java.lang.String comment)
          Sets the comment describing this revision of the item.
 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 setFixedConfiguration(ViewConfiguration config)
          Changes the behavior of this ViewMember such that it is fixed at the given configuration.
 void setFloatingConfiguration()
          Changes the behavior of this ViewMember to "floating".
 void setRights(ACE[] acl)
          Modify the Access Control List for this item.
 java.lang.Object setValue(Property property, java.lang.Object propertyValue)
          Sets the value of the property specified by propertyName.
 void unlock()
          Removes the current user's lock from this resource.
 void update()
          Stores the underlying entity in the server.
 void updateRevisionComment(java.lang.String comment)
          This method changes the stored revision comment on the specified item revision.
 
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, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.starteam.ISecurable
getServer, getType
 

Method Detail

copy

public ViewMember copy()
Creates a copy of the ViewMember and all of its properties. Does not copy the type, etc. Useful to applications that want to save a snapshot of the ViewMember in a given state, for example, before calling refresh().

Returns:
A copy of the ViewMember and all of its properties.
See Also:
ViewMember.isEqualTo(com.starteam.ViewMember)

equals

public boolean equals(java.lang.Object another)
Returns true if the specified Object identifies the same exact Item.

Overrides:
equals in class java.lang.Object
Parameters:
another - the object to be compared to for equality
Returns:
true if the specified object identifies the same viewmember as this.

hashCode

public int hashCode()
Return a hashcode for this view member.

Overrides:
hashCode in class java.lang.Object
Returns:
a hashcode for this view member.

isEqualTo

public boolean isEqualTo(ViewMember viewMember)
Compares two ViewMembers. They are considered equal if: They have the same Type. Types are compared by ClassID. They have the same VMID, or are both new ViewMembers. They belong to the same view. Views are compared by ID. For all properties, the property values must be equal.

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

getView

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

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

getVMID

public int getVMID()
Gets the unique identifier for this ViewMember. The VMID is different for each share of the underlying object.

Returns:
The unique identifier for this ViewMember.

getID

public int getID()
Gets the unique identifier for this resource.

Specified by:
getID in interface ISecurable
Overrides:
getID in class TypedResource
Returns:
The unique identifier for this resource.

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.

isReadOnly

public boolean isReadOnly()
Determines whether or not the given ViewMember is read-only.

A ViewMember is read-only if it has a read-only configuration, or if it belongs to a view that is read-only or that has a read-only configuration.

Returns:
true if this ViewMember is read-only.

getIntegerArrayValue

public int[] getIntegerArrayValue(Property property)
A type-safe accessor method for returning int[] valued properties.

Overrides:
getIntegerArrayValue in class TypedResource
Parameters:
property - the property to be retrieved
Returns:
the int array value of the specified property

updateRevisionComment

public void updateRevisionComment(java.lang.String comment)
This method changes the stored revision comment on the specified item revision. Its effects are immediate, there is no need to call update(). The changed revision is based on the item's object ID and revision number. This method may not be called on an item not yet stored in the repository.

Parameters:
comment - the new revision comment (may not be null)
See Also:
TypedResource.getObjectID(), VersionedObject.getRevisionNumber()

getBehavior

public ViewMemberBehavior getBehavior()
Returns ViewMemberBehavior object associated with this ViewMember.

Returns:
ViewMemberBehavior object associated with this ViewMember
Throws:
DisembodiedException - if the ViewMember is disembodied
See Also:
ViewMember.isDisembodied()

setBehavior

public void setBehavior(ViewMemberBehavior behavior)
Changes the behavior of this ViewMember. The change is saved to the repository immediately; no call to update() is required.

Parameters:
behavior - The new behavior.
Throws:
DisembodiedException - if the ViewMember is disembodied.
See Also:
ViewMemberBehavior.setFloatingConfiguration(), ViewMemberBehavior, ViewMember.isDisembodied()

setFloatingConfiguration

public void setFloatingConfiguration()
Changes the behavior of this ViewMember to "floating". The change is saved to the repository immediately; no call to update() is required.

Throws:
DisembodiedException - if the ViewMember is disembodied.
See Also:
ViewMember.setFixedConfiguration(com.starteam.ViewConfiguration), ViewMember.setBehavior(com.starteam.ViewMemberBehavior), ViewMember.isDisembodied()

setFixedConfiguration

public void setFixedConfiguration(ViewConfiguration config)
Changes the behavior of this ViewMember such that it is fixed at the given configuration. The change is saved to the repository immediately; no call to update() is required.

Parameters:
config - The fixed configuration to be set.
Throws:
DisembodiedException - if the ViewMember is disembodied.
See Also:
ViewMember.setFloatingConfiguration(), ViewMember.setBehavior(com.starteam.ViewMemberBehavior), ViewMember.isDisembodied()

setBranchOnChange

public void setBranchOnChange(boolean bBranchOnChange)
Sets the "Branch On Change" behavior.

Parameters:
bBranchOnChange - true to pin the behavior
Throws:
DisembodiedException - if the ViewMember is disembodied
See Also:
ViewMember.isDisembodied()

getAttachments

public Content[] 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[] content)
Save the attachments for this ViewMember 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 or null has the effect of removing any existing attachments from this View Member Throws an SDKRuntimeException if this ViewMember does not subscribe to the Attachment Service

Parameters:
content - an array of attachments to save. A subsequent call to update is neccessary to save the attachments on the server.

isBranchable

public boolean isBranchable()
Returns true if this item is a type that is branchable.

Returns:
true if this item is a type that is branchable.

getViewVersion

public int getViewVersion()
The version number of this item calculated by counting direct ancestors of this viewmember from this version to the initial version. The first revision will have a view version number of (1).

Overrides:
getViewVersion in class VersionedObject
Returns:
The view version number of this item.

getRootObjectID

public int getRootObjectID()
Gets the root object ID for this resource. All resources with the same root object ID were derived from the same underlying object. Revisions with the same object ID are all on the same branch.

Overrides:
getRootObjectID in class VersionedObject
Returns:
The root object ID for this resource.
See Also:
ViewMember.Type.RootObjectIDProperty.NAME

getParentRevision

public int getParentRevision()
Returns the revision number at which this resource was branched. For example, if this number is 8, then the resource's revision number in the parent view was 8 at the time it was branched. The history would then show that revision 9 was the first revision in the current view. The ParentRevision is zero if this resource was not inherited from the parent view.

Returns:
The revision number at which this resource was branched.
See Also:
ViewMember.Type.ParentBranchLengthProperty.NAME

getMyLockType

public ViewMember.LockType getMyLockType()
Returns the lock status of this ViewMember for the currently logged in user. It will be one of EXCLUSIVE, NON_EXCLUSIVE, or UNLOCKED.

Specified by:
getMyLockType in interface LockableObject
Returns:
the lock status of the ViewMember for the currently logged in user.
See Also:
ViewMember.LockType.EXCLUSIVE, ViewMember.LockType.NON_EXCLUSIVE, ViewMember.LockType.UNLOCKED, ViewMember.Type.ExclusiveLockerProperty.NAME

getLocker

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

Specified by:
getLocker in interface LockableObject
Returns:
The User object of the exclusive locker of this item.
See Also:
ViewMember.Type.ExclusiveLockerProperty.NAME

getExclusiveLocker

public User getExclusiveLocker()
Gets the User that has this resource exclusively locked, or null if no one has it locked.

Returns:
The User who is the exclusive locker of this resource.
See Also:
ViewMember.Type.ExclusiveLockerProperty.NAME

lockExclusive

public void lockExclusive()
Obtains an exclusive lock on this resource without attempting to break an existing lock. A server exception will be thrown if the lock cannot be obtained.

Specified by:
lockExclusive in interface Lockable

lockExclusive

public void lockExclusive(boolean breakLock)
Obtains an exclusive lock on this resource. If breakLock is true, and another user has this resource locked, then an attempt will be made to break that lock. A server exception will be thrown if the lock cannot be obtained.

Specified by:
lockExclusive in interface Lockable
Parameters:
breakLock - true to break an existing exclusive lock owned by another user

lockNonExclusive

public void lockNonExclusive()
Obtains a non-exclusive lock on this resource without attempting to break an existing lock. Other StarTeam users can also acquire a non-exclusive lock on this resource. A server exception will be thrown if the lock cannot be obtained.

Specified by:
lockNonExclusive in interface Lockable

unlock

public void unlock()
Removes the current user's lock from this resource. If another user has an exclusive lock on the resource this method will not remove that lock.

Specified by:
unlock in interface Lockable

putLock

public void putLock(ViewMember.LockType lockType,
                    boolean breakLock)
Sets the current user's lock for this item. This method can be used to break another user's exclusive lock on the item. An exception will be thrown if a break is attempted for a user who does not have sufficient rights to break locks.

Parameters:
lockType - the type of lock to be obtained
breakLock - true if the server should break an exclusive lock
See Also:
ViewMember.LockType

getAttachedLabels

public Label[] getAttachedLabels()
Gets the labels attached to any version of this resource. This includes both view labels and revision labels. Does not include any deleted labels.

Returns:
The labels attached to any version of this resource.
Throws:
DisembodiedException - if the ViewMember is disembodied
See Also:
ViewMember.isDisembodied()

getAllLabels

public Label[] getAllLabels()
Returns all labels attached to any version of this resource. This includes both view labels and revision labels.

Returns:
an array of labels attached to any version of this resource. Will not return null but an empty array if no labels are attached.
Throws:
DisembodiedException - if the ViewMember is disembodied
See Also:
ViewMember.isDisembodied()

getFromHistory

public ViewMember getFromHistory(Label label)
Gets the version of this resource to which the given label is attached. Returns null if no version has the given label.

Parameters:
label - The desired label.
Returns:
The version of this resource to which the given label is attached, or null.
See Also:
Label, ViewMember.getHistory()

getFromHistory

public ViewMember getFromHistory(PromotionState ps)
Gets the version of this resource based on the PromotionState specified. typically, the time at which a label was applied to the promotion state Returns null if no version can be found at that promotion state.

Parameters:
ps - The desired promotion state.
Returns:
The version of this resource based on the PromotionState, or null.
See Also:
Label, PromotionState, ViewMember.getHistory()

getFromHistory

public ViewMember getFromHistory(DateTime date)
Returns the most recent version of this resource as of the specified date. Returns null if a version is not found that existed as of the given date. Note that this query is not view specific. So it is possible to retrieve a newer revision than the specified one, depending upon the value of the DateTime parameter

Parameters:
date - The date specifying which historical version to return.
Returns:
The most recent version as of the specified date, or null if the date is prior to the first version of this resource.

getFromHistory

public ViewMember getFromHistory(int viewVersion)
Returns the specified version of this item based on the view version number. Returns null if a version is not found matching the specified version number. The view version number starts with 1 for the first version of the item and monotonically increases for each new version of the item, even across branches.

Parameters:
viewVersion - The desired version of the item.
Returns:
The specified version of the item or null if not found.
See Also:
ViewMember.getViewVersion(), ViewMember.getHistory()

getHistory

public ViewMemberCollection getHistory()
Returns the past versions of this ViewMember.

Returns:
the past versions of this ViewMember.

isDisembodied

public boolean isDisembodied()
A disembodied Item is one which does not have its full View and Folder context. Consequently many Item operations are not supported. It is possible to get and set Item property values as well as get Item history for a disembodied item. The most common way to obtain a disembodied Item is through the Link APIs or the View methods getDisembodiedItem and getHistoryForItemID.

Returns:
true if this is a disembodied item
See Also:
View.getDisembodiedItem(com.starteam.Item.Type, int), View.getHistory(com.starteam.ViewMember), ViewMember.getView()

remove

public void remove()
Removes this ViewMember from the view. This does not affect other shares of the view member.


update

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


getValue

public java.lang.Object getValue(Property property)
                          throws NoSuchPropertyException
Returns the value of the property. Retrieves value from persistent store if not already cached.

Overrides:
getValue in class TypedResource
Parameters:
property - the desired property
Returns:
the value of this property as a java.lang.Object
Throws:
com.starteam.NoSuchPropertyException - if the specified property is not valid for this item
NoSuchPropertyException

setValue

public java.lang.Object setValue(Property property,
                                 java.lang.Object propertyValue)
                          throws java.lang.ClassCastException,
                                 NoSuchPropertyException
Sets the value of the property specified by propertyName.

Overrides:
setValue in class TypedResource
Parameters:
property - the property to set
propertyValue - the value of the property to set
Returns:
the previous value of the specified property
Throws:
java.lang.ClassCastException - if the Object passed in is not an instance of a type appropriate for the specified property
com.starteam.NoSuchPropertyException - if no valid property of this item is identified by the string propertyName
NoSuchPropertyException

getTraces

public TraceCollection getTraces(boolean includeLinks)
Gets all traces that reference any revision of this view member either as the source or the target that are stored on the same server as this view member.

Parameters:
includeLinks - if true, links that have this view member as the end point are also included and surface them as if they were traces.
Returns:
collection of traces that reference the given view member
See Also:
Link

findLinks

public Link[] findLinks()
Gets the links that have this view member as an endpoint.

Returns:
Link[]

getDisplayValue

public java.lang.String getDisplayValue(Property 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.

Specified by:
isDeleted in interface ISecurable
Returns:
True if this view member is known to have been deleted; false otherwise.

getDeletedTime

public DateTime getDeletedTime()
For deleted view members, returns the time the item was deleted. For other view members, returns DateTimeProperty.VALUE_NOT_SET.

Returns:
The time when this item was deleted, or DateTimeProperty.VALUE_NOT_SET.
See Also:
DateTimeProperty.VALUE_NOT_SET, ViewMember.isDeleted(), ViewMember.getDeletedBy()

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.

getComment

public java.lang.String getComment()
Gets the comment describing this revision of the item.

Returns:
The comment describing this revision of the item.

setComment

public void setComment(java.lang.String comment)
Sets the comment describing this revision of the item.

Parameters:
comment - The comment for the next revision of this item.

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. This property was introduced with the 14.0 version of the StarTeam server

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. This property was introduced with the 14.0 version of the StarTeam server

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

getDeletedBy

public User getDeletedBy()
For deleted view members, returns the User object who deleted the view member. For other view members, returns null.

Returns:
The User object of the user who deleted this view member, or null.
See Also:
ViewMember.isDeleted(), ViewMember.getDeletedTime()

getCache

public CacheService getCache()
Gets a cache service that can be used to populate, refresh or discard this ViewMember.

Returns:
CacheService

getRights

public ACE[] getRights()
Returns the Access Control List for this item. This will return null if this item has no access control list. From 12.0 release of the server onwards, MPX events are sent by the server upon ACL updates. So, the server calls are optimized when mpx is enabled. For servers prior to 12.0 release, The access control list is not cached, and will be fetched from the server on demand. Cached lists are accessible via the AccessRightsManager

Specified by:
getRights in interface ISecurable
Returns:
the access control list for this item or NULL.
Throws:
DisembodiedException - if the Item is disembodied
See Also:
ViewMember.isDisembodied(), AccessRightsManager.getRights(ISecurable)

getParentContainer

public ISecurableContainer getParentContainer()
If there are no access rights explicitly assigned to this object, then the effective access rights come from a parent container.

Specified by:
getParentContainer in interface ISecurable
Returns:
This object's parent container.
See Also:
ISecurableContainer

hasPermissions

public boolean hasPermissions(PermissionCollection permissions)
Returns true if desired permissions are granted

Specified by:
hasPermissions in interface ISecurable
Parameters:
permissions - the desired permissions
Returns:
true if all the requested permissions are granted; false if at least one of the requested permissions is denied.
Throws:
DisembodiedException - if the Item is disembodied
See Also:
ViewMember.isDisembodied(), Permission

setRights

public void setRights(ACE[] acl)
Modify the Access Control List for this item. If the input parameter is null then the access control list will be dropped.

Specified by:
setRights in interface ISecurable
Parameters:
acl - the new access control list or null if to be dropped.
Throws:
DisembodiedException - if the Item is disembodied
See Also:
ViewMember.isDisembodied()

isRootShare

public boolean isRootShare()
Determines whether or not this item is the root share of its share tree.

Returns:
true if this item is the root share; false otherwise.

getShare

public Share getShare(ViewConfiguration config)
Returns the Share for this item, as of the configuration specified by the config argument, whether the item is live or deleted. Note that the Share that is returned is "disembodied", containing no information about its parent or children.

Parameters:
config - the ItemConfig that describes the desired configuration, only "Current" and "Time" configurations are supported.
Returns:
the Share for this item, as of the configuration specified by the config argument, whether the item is live or deleted.
Throws:
DisembodiedException - if the Item is disembodied
See Also:
ViewMember.isDisembodied(), ViewMember.getAllShares(), ViewConfiguration

getShare

public Share getShare()
Get the share for this view member.

Returns:
The share for this view member.

getAllShares

public Share[] getAllShares()
Returns the shares for this view member.

Returns:
All shares of this view member

isUnread

public boolean isUnread()
Determines whether or not this artifact has been marked read by the currently logged-in user.

Returns:
boolean

modifyReadStatus

public void modifyReadStatus(boolean bSetAsRead)
Modifies this item's read status for the logged-in user. Note that this is an "immediate" command, i.e., no update() call is required. Note also that only the currently logged-in user is affected. The result of isUnread() after this call may not be changed because its value will be based on cached information. To get the most up to date property values you should first call discard() on the item. This is not supported for File or Folder items.

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

isBookmarked

public boolean isBookmarked()
Determines whether or not this artifact has been flagged by the currently logged-in user.

Returns:
boolean

modifyBookmark

public void modifyBookmark(boolean setFlagged)
Modifies this item's flag for the logged-in user. Note that this is an "immediate" command, i.e., no update() call is required. Note also that only the currently logged-in user is affected. The result of getFlag() after this call may not be changed because its value will be based on cached information. To get the most up to date property values you should first call discard() on the item. This is not supported for Folder items.

Parameters:
setFlagged - this item's new flag value
See Also:
ViewMember.Type.IsBookmarkedProperty.NAME

getViewMemberRevisions

public ViewMemberRevision[] getViewMemberRevisions()
Returns the ViewMember revisions for this item. The revisions are based on the specific historical revisions identified by this item using getObjectID() and the ViewConfiguration of the view to which it belongs.

Returns:
all the revisions for the view member
Throws:
DisembodiedException - if the ViewMember is disembodied
See Also:
ViewMember.isDisembodied(), TypedResource.getObjectID(), ViewConfiguration, ViewMemberRevision


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