public abstract class ViewMember extends VersionedObject implements LockableObject, ISecurable
Modifier and Type | Class and Description |
---|---|
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
|
VersionedObject.WebCacheVersionedObject
TrackedObject.WebCacheTrackedObject
LiveObject.WebCacheLiveObject
TypedResource.BranchState
Modifier and Type | Method and Description |
---|---|
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. |
Share[] |
getDeletedShares()
Returns deleted shares, if any, for this view member, in this view.
|
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 |
isDiscarded()
Returns true if all of the cached properties for this Item have been
discarded They will be re-fetched from the server on demand (even when
MPX is enabled).
|
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 |
isFloating()
returns true if this artifact is floating
|
boolean |
isPinned()
returns true if this artifact is pinned
|
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 |
remove(ConnectionPool cp,
User u)
Remove this ViewMember from the repository This is an atomic
operation, not executed in a transaction
but running in the context of a ConnectionPool
|
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 . |
java.lang.String |
toRESTUrl()
Resolves this StarTeam view member to a corresponding URL using an ID
based scheme
|
void |
unlock()
Removes the current user's lock from this resource.
|
void |
update()
Stores the underlying entity in the server.
|
void |
update(ConnectionPool cp,
User u)
Save this ViewMember to the Repository If the underlying SDK object
is new, create it; otherwise, if it has changed, update it
This is an atomic operation, not executed in a transaction,
but running in the context of a ConnectionPool
|
void |
updateRevisionComment(java.lang.String comment)
This method changes the stored revision comment on the specified item
revision.
|
getBranchRevision, getRevisionNumber, getShortComment, getViewVersion, isFromHistory, setShortComment
getModifiedBy, getModifiedTime
getCreatedBy, getCreatedTime, toStarTeamURL
addToIntegerArray, getBooleanValue, getByteArrayValue, getCachedProperties, getContentValue, getDateTimeValue, getDateValue, getDisplayName, getDoubleValue, getEnumDisplayName, getEnumeratedValues, getIntegerValue, getLinkValue, getLongValue, getObjectID, getPossibleValues, getServer, getStringValue, getTimeSpanValue, getType, hasCachedProperties, hasValue, isDirty, isDirty, isNew, removeFromIntegerArray, setBooleanValue, setByteArrayValue, setContentValue, setDateTimeValue, setDateValue, setDoubleValue, setEnumeratedValue, setEnumeratedValues, setIntegerArrayValue, setIntegerValue, setLinkValue, setLongValue, setStringValue, setTimeSpanValue, toString
getServer, getType
public ViewMember copy()
ViewMember.isEqualTo(com.starteam.ViewMember)
public boolean equals(java.lang.Object another)
Object
identifies the same
exact Item
.equals
in class java.lang.Object
another
- the object to be compared to for equalitypublic int hashCode()
hashCode
in class java.lang.Object
public boolean isEqualTo(ViewMember viewMember)
viewMember
- The ViewMember to be compared to this one.ViewMember.copy()
public View getView()
View
containing this ViewMember.View
containing this ViewMember.ViewMember.isDisembodied()
public int getVMID()
public int getID()
getID
in interface ISecurable
getID
in class TypedResource
public int getPresentationID()
public boolean isReadOnly()
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.
public int[] getIntegerArrayValue(Property property)
getIntegerArrayValue
in class TypedResource
property
- the property to be retrievedpublic void updateRevisionComment(java.lang.String comment)
comment
- the new revision comment (may not be null)TypedResource.getObjectID()
,
VersionedObject.getRevisionNumber()
public ViewMemberBehavior getBehavior()
DisembodiedException
- if the ViewMember is disembodiedViewMember.isDisembodied()
public void setBehavior(ViewMemberBehavior behavior)
behavior
- The new behavior.DisembodiedException
- if the ViewMember is disembodied.ViewMemberBehavior.setFloatingConfiguration()
,
ViewMemberBehavior
,
ViewMember.isDisembodied()
public void setFloatingConfiguration()
DisembodiedException
- if the ViewMember is disembodied.ViewMember.setFixedConfiguration(com.starteam.ViewConfiguration)
,
ViewMember.setBehavior(com.starteam.ViewMemberBehavior)
,
ViewMember.isDisembodied()
public void setFixedConfiguration(ViewConfiguration config)
config
- The fixed configuration to be set.DisembodiedException
- if the ViewMember is disembodied.ViewMember.setFloatingConfiguration()
,
ViewMember.setBehavior(com.starteam.ViewMemberBehavior)
,
ViewMember.isDisembodied()
public void setBranchOnChange(boolean bBranchOnChange)
bBranchOnChange
- true to pin the behaviorDisembodiedException
- if the ViewMember is disembodiedViewMember.isDisembodied()
public Content[] getAttachments()
public void setAttachments(Content[] content)
content
- an array of attachments to save. A subsequent call to update
is neccessary to save the attachments on the server.public boolean isBranchable()
public int getViewVersion()
getViewVersion
in class VersionedObject
public int getRootObjectID()
getRootObjectID
in class VersionedObject
ViewMember.Type.RootObjectIDProperty.NAME
public int getParentRevision()
ViewMember.Type.ParentBranchLengthProperty.NAME
public ViewMember.LockType getMyLockType()
getMyLockType
in interface LockableObject
ViewMember.LockType.EXCLUSIVE
,
ViewMember.LockType.NON_EXCLUSIVE
,
ViewMember.LockType.UNLOCKED
,
ViewMember.Type.ExclusiveLockerProperty.NAME
public User getLocker()
User
object of the user who has this item
exclusively locked, or null if no one has it locked.getLocker
in interface LockableObject
User
object of the exclusive locker of this
item.ViewMember.Type.ExclusiveLockerProperty.NAME
public User getExclusiveLocker()
ViewMember.Type.ExclusiveLockerProperty.NAME
public void lockExclusive()
lockExclusive
in interface Lockable
public void lockExclusive(boolean breakLock)
lockExclusive
in interface Lockable
breakLock
- true to break an existing exclusive lock owned by another userpublic void lockNonExclusive()
lockNonExclusive
in interface Lockable
public void unlock()
public void putLock(ViewMember.LockType lockType, boolean breakLock)
lockType
- the type of lock to be obtainedbreakLock
- true if the server should break an exclusive lockViewMember.LockType
public Label[] getAttachedLabels()
DisembodiedException
- if the ViewMember is disembodiedViewMember.isDisembodied()
public Label[] getAllLabels()
null
but an empty array if no labels are
attached.DisembodiedException
- if the ViewMember is disembodiedViewMember.isDisembodied()
public ViewMember getFromHistory(Label label)
null
if no version has the given label.label
- The desired label.null
.Label
,
ViewMember.getHistory()
public ViewMember getFromHistory(PromotionState ps)
null
if no version can be found at that promotion
state.ps
- The desired promotion state.null
.Label
,
PromotionState
,
ViewMember.getHistory()
public ViewMember getFromHistory(DateTime date)
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 parameterdate
- The date specifying which historical version to return.null
if the date is prior to the first version of
this resource.public ViewMember getFromHistory(int viewVersion)
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.viewVersion
- The desired version of the item.null
if not
found.ViewMember.getViewVersion()
,
ViewMember.getHistory()
public ViewMemberCollection getHistory()
public boolean isDisembodied()
View.getDisembodiedItem(com.starteam.Item.Type, int)
,
View.getHistory(com.starteam.ViewMember)
,
ViewMember.getView()
public void remove()
public void update()
public java.lang.Object getValue(Property property) throws NoSuchPropertyException
getValue
in class TypedResource
property
- the desired propertyjava.lang.Object
com.starteam.NoSuchPropertyException
- if the specified property is not valid for this itemNoSuchPropertyException
public java.lang.Object setValue(Property property, java.lang.Object propertyValue) throws java.lang.ClassCastException, NoSuchPropertyException
propertyName
.setValue
in class TypedResource
property
- the property to setpropertyValue
- the value of the property to setjava.lang.ClassCastException
- if the Object
passed in is not an instance of
a type appropriate for the specified propertycom.starteam.NoSuchPropertyException
- if no valid property of this item is identified by the
string propertyName
NoSuchPropertyException
public TraceCollection getTraces(boolean includeLinks)
includeLinks
- if true, links that have this view member as the end point are
also included and surface them as if they were traces.Link
public Link[] findLinks()
public java.lang.String getDisplayValue(Property prop)
prop
- A property of this item.public boolean isDiscarded()
ViewMember.refresh()
,
ViewMember.discard()
public boolean isFloating()
public boolean isPinned()
public boolean isDeleted()
As of StarTeam 9.0, we can determine from a ViewMember's properties whether or not it has been deleted.
isDeleted
in interface ISecurable
public DateTime getDeletedTime()
DateTimeProperty.VALUE_NOT_SET
,
ViewMember.Type.ItemDeletedTimeProperty
,
ViewMember.isDeleted()
,
ViewMember.getDeletedBy()
public DotNotation getDotNotation()
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.
public java.lang.String getComment()
public void setComment(java.lang.String comment)
comment
- The comment for the next revision of this item.public java.lang.String getExternalID()
public void setExternalID(java.lang.String externalID)
externalID
- The external ID for the next revision of this item.public java.lang.String getExternalURL()
public void setExternalURL(java.lang.String externalURL)
externalURL
- The external URL for the next revision of this item.public User getDeletedBy()
User
object who
deleted the view member. For other view members, returns null.
User
object of the user who deleted this view
member, or null.ViewMember.isDeleted()
,
ViewMember.getDeletedTime()
public CacheService getCache()
public ACE[] getRights()
getRights
in interface ISecurable
DisembodiedException
- if the Item is disembodiedViewMember.isDisembodied()
,
AccessRightsManager.getRights(ISecurable)
public ISecurableContainer getParentContainer()
getParentContainer
in interface ISecurable
ISecurableContainer
public boolean hasPermissions(PermissionCollection permissions)
hasPermissions
in interface ISecurable
permissions
- the desired permissionsDisembodiedException
- if the Item is disembodiedViewMember.isDisembodied()
,
Permission
public void setRights(ACE[] acl)
setRights
in interface ISecurable
acl
- the new access control list or null if to be dropped.DisembodiedException
- if the Item is disembodiedViewMember.isDisembodied()
public boolean isRootShare()
public Share getShare(ViewConfiguration config)
config
- the ItemConfig that describes the desired configuration, only
"Current" and "Time" configurations are supported.DisembodiedException
- if the Item is disembodiedViewMember.isDisembodied()
,
ViewMember.getAllShares()
,
ViewConfiguration
public Share getShare()
public Share[] getAllShares()
public Share[] getDeletedShares()
public boolean isUnread()
public void modifyReadStatus(boolean bSetAsRead)
bSetAsRead
- this item's new read statusViewMember.Type.UnreadByUsersProperty.NAME
public boolean isBookmarked()
public void modifyBookmark(boolean setFlagged)
setFlagged
- this item's new flag valueViewMember.Type.IsBookmarkedProperty.NAME
public ViewMemberRevision[] getViewMemberRevisions()
DisembodiedException
- if the ViewMember is disembodiedViewMember.isDisembodied()
,
TypedResource.getObjectID()
,
ViewConfiguration
,
ViewMemberRevision
public java.lang.String toRESTUrl()
public void update(ConnectionPool cp, User u)
cp
- the connection poolu
- the user in whose context the update occurs#ConnectionPool
public void remove(ConnectionPool cp, User u)
u
- the user in whose context the remove occurs#ConnectionPool
StarTeam SDK 17.0, Build 34
Copyright © 2019 Micro Focus or one of its affiliates. All rights reserved.