com.starteam
Class PromotionState

java.lang.Object
  extended by com.starteam.TypedResource
      extended by com.starteam.LiveObject
          extended by com.starteam.PromotionState
All Implemented Interfaces:
ISecurable, java.lang.Cloneable

public final class PromotionState
extends LiveObject
implements ISecurable

This class represents a promotion state associated with a promotion model. This class has no update() method so to save new or modified promotion states you must use PromotionModel.update()

See Also:
PromotionModel

Nested Class Summary
static class PromotionState.Type
          The Type of Promotion State
 
Nested classes/interfaces inherited from class com.starteam.LiveObject
LiveObject.WebCacheLiveObject
 
Nested classes/interfaces inherited from class com.starteam.TypedResource
TypedResource.BranchState
 
Constructor Summary
PromotionState(PromotionModel model)
          Create a new PromotionState for the specified model.
 
Method Summary
 boolean equals(java.lang.Object another)
          Returns true if the specified Object identifies the same exact Project.
 User getCreatedBy()
          Returns the User object that created the state.
 DateTime getCreatedOn()
          Returns the time at which the state was created.
 User getDeletedBy()
          Returns the user who deleted the state.
 DateTime getDeletedOn()
          Returns the time at which the state was deleted.
 java.lang.String getDescription()
          Returns the description of the PromotionState.
 int getID()
          Returns the object ID for the PromotionState.
 Label getLabel()
          Returns the Label that defines this PromotionState.
 java.lang.String getName()
          Returns the name of the PromotionState.
 int getObjectID()
          Returns the object ID for the PromotionState.
 ISecurableContainer getParentContainer()
          If there are no access rights explicitly assigned to this object, then the effective access rights come from a parent container.
 PromotionModel getPromotionModel()
          Returns the "owning" PromotionModel object for this PromotionState.
 PromotionState.Type.PropertyCollection getProperties()
          Gets the PropertyCollection for this Promotion State.
 ACE[] getRights()
          Returns the Access Control List for this object.
 int hashCode()
          Returns a hash code for this PromotionState.
 boolean hasPermissions(PermissionCollection permissions)
          Returns true if desired permissions are granted
 boolean isDeleted()
          determines whether this PromotionState instance has been deleted
 void setDescription(java.lang.String description)
          Sets the description of the PromotionState.
 void setLabel(Label label)
          Sets the Label that defines this PromotionState.
 void setName(java.lang.String name)
          Sets the name of the PromotionState.
 void setRights(ACE[] acl)
          Modify the Access Control List for this object.
 java.lang.String toString()
          Returns the name of this promotion state.
 
Methods inherited from class com.starteam.LiveObject
getCreatedTime, toStarTeamURL
 
Methods inherited from class com.starteam.TypedResource
addToIntegerArray, getBooleanValue, getByteArrayValue, getCachedProperties, getContentValue, getDateTimeValue, getDateValue, getDisplayName, getDoubleValue, getEnumDisplayName, getEnumeratedValues, getIntegerArrayValue, getIntegerValue, getLinkValue, getLongValue, getPossibleValues, getServer, getStringValue, getTimeSpanValue, getType, getValue, hasCachedProperties, hasValue, isDirty, isNew, removeFromIntegerArray, setBooleanValue, setByteArrayValue, setContentValue, setDateTimeValue, setDateValue, setDoubleValue, setEnumeratedValue, setEnumeratedValues, setIntegerArrayValue, setIntegerValue, setLinkValue, setLongValue, setStringValue, setTimeSpanValue, setValue
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.starteam.ISecurable
getServer, getType
 

Constructor Detail

PromotionState

public PromotionState(PromotionModel model)
Create a new PromotionState for the specified model.

Parameters:
model - the owning PromotionModel
Method Detail

getProperties

public PromotionState.Type.PropertyCollection getProperties()
Gets the PropertyCollection for this Promotion State.

Returns:
the PropertyCollection for this Promotion State.

getPromotionModel

public PromotionModel getPromotionModel()
Returns the "owning" PromotionModel object for this PromotionState.

Returns:
the "owning" PromotionModel object for this PromotionState.

getObjectID

public int getObjectID()
Returns the object ID for the PromotionState.

Overrides:
getObjectID in class TypedResource
Returns:
the object ID for the PromotionState.

getID

public int getID()
Returns the object ID for the PromotionState.

Specified by:
getID in interface ISecurable
Overrides:
getID in class TypedResource
Returns:
the object ID for the PromotionState. Same as getObjectID.

equals

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

Overrides:
equals in class java.lang.Object
Parameters:
another - the object to be compared with
Returns:
true if this PromotionState is the same as the argument

hashCode

public int hashCode()
Returns a hash code for this PromotionState.

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code for this PromotionState.

getName

public java.lang.String getName()
Returns the name of the PromotionState.

Returns:
the name of the PromotionState.

setName

public void setName(java.lang.String name)
Sets the name of the PromotionState.

Parameters:
name - the new name for this promotion state.

getDescription

public java.lang.String getDescription()
Returns the description of the PromotionState.

Returns:
this state's description

setDescription

public void setDescription(java.lang.String description)
Sets the description of the PromotionState.

Parameters:
description - the new description for this state

getLabel

public Label getLabel()
Returns the Label that defines this PromotionState. It may return NULL for PromotionStates defined as "current".

Returns:
the label for this state

setLabel

public void setLabel(Label label)
Sets the Label that defines this PromotionState. May set it to NULL if you want the state to be defined as "current".

Parameters:
label - the label to associate with this state

getCreatedOn

public DateTime getCreatedOn()
Returns the time at which the state was created.

Returns:
the time at which the state was created.

getCreatedBy

public User getCreatedBy()
Returns the User object that created the state.

Overrides:
getCreatedBy in class LiveObject
Returns:
the User object that created the state.

getDeletedOn

public DateTime getDeletedOn()
Returns the time at which the state was deleted.

Returns:
the time at which the state was deleted.

getDeletedBy

public User getDeletedBy()
Returns the user who deleted the state. Will return null for non-deleted states.

Returns:
the user who deleted this state

isDeleted

public boolean isDeleted()
determines whether this PromotionState instance has been deleted

Specified by:
isDeleted in interface ISecurable
Returns:
true if this promotion state has been deleted

getRights

public ACE[] getRights()
Returns the Access Control List for this object. This will return null if this object has not access control list. 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.
See Also:
ACE

setRights

public void setRights(ACE[] acl)
Modify the Access Control List for this object. 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.
See Also:
ACE

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.
See Also:
Permission

toString

public java.lang.String toString()
Returns the name of this promotion state.

Overrides:
toString in class TypedResource
Returns:
the name of this promotion state.


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