com.starteam
Class PromotionModel

java.lang.Object
  extended by com.starteam.TypedResource
      extended by com.starteam.LiveObject
          extended by com.starteam.PromotionModel
All Implemented Interfaces:
java.lang.Cloneable

public final class PromotionModel
extends LiveObject

This class represents the Promotion model for a view. Each view has a single promotion model. The PromotionModel class primarily acts as the owner of an ordered list of PromotionStates.

See Also:
PromotionState

Nested Class Summary
static class PromotionModel.Type
          The Type of Promotion Model
 
Nested classes/interfaces inherited from class com.starteam.LiveObject
LiveObject.WebCacheLiveObject
 
Nested classes/interfaces inherited from class com.starteam.TypedResource
TypedResource.BranchState
 
Method Summary
 PromotionState findPromotionState(int ID)
          Find a Promotion State with this ID
 PromotionState findPromotionState(java.lang.String name)
          find a Promotion State by Name.
 User getCreatedBy()
          Returns the User who created this PromotionModel.
 DateTime getCreatedOn()
          Returns the time at which the PromotionModel was created.
 java.lang.String getDebugString()
          Return a debug string for this model.
 java.lang.String getDescription()
          Returns the description of the PromotionModel.
 int getID()
          Return the object ID for the PromotionModel.
 java.lang.String getName()
          Returns the name of the PromotionModel.
 int getObjectID()
          Return the object ID for the PromotionModel.
 PromotionState[] getPromotionStates()
          Returns an array of PromotionStates for this model.
 PromotionModel.Type.PropertyCollection getProperties()
          Gets the PropertyCollection for this Promotion Model.
 View getView()
          Returns the View that owns this PromotionModel.
 void setDescription(java.lang.String description)
          Sets the description of the PromotionModel.
 void setName(java.lang.String name)
          Sets the name of the PromotionModel.
 void setPromotionStates(PromotionState[] states)
          Changes the list of PromotionStates for this model.
 java.lang.String toString()
          Returns the name of this promotion model.
 void update()
          Stores the modified PromotionModel in the repository.
 
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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getProperties

public PromotionModel.Type.PropertyCollection getProperties()
Gets the PropertyCollection for this Promotion Model.

Returns:
the PropertyCollection for this Promotion Model.

getView

public View getView()
Returns the View that owns this PromotionModel.

Returns:
the view for this model.

getObjectID

public int getObjectID()
Return the object ID for the PromotionModel.

Overrides:
getObjectID in class TypedResource
Returns:
the model's object ID

getID

public int getID()
Return the object ID for the PromotionModel.

Overrides:
getID in class TypedResource
Returns:
the model's object ID. Same as getObjectID.

getName

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

Returns:
the name of the model

setName

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

Parameters:
name - the new name for this promotion model

getDescription

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

Returns:
a description string for this model

setDescription

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

Parameters:
description - the new description for this model

getCreatedOn

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

Returns:
the time at which this model was created

getCreatedBy

public User getCreatedBy()
Returns the User who created this PromotionModel.

Overrides:
getCreatedBy in class LiveObject
Returns:
the User who created this Promotion model

getPromotionStates

public PromotionState[] getPromotionStates()
Returns an array of PromotionStates for this model. The ordering of states is significant.

Returns:
an array of promotion states defining this model
See Also:
PromotionModel.setPromotionStates(com.starteam.PromotionState[])

findPromotionState

public PromotionState findPromotionState(int ID)
Find a Promotion State with this ID

Parameters:
ID - the ID of the Promotion State
Returns:
a PromotionState if one exists, or NULL

findPromotionState

public PromotionState findPromotionState(java.lang.String name)
find a Promotion State by Name. This is a case sensitive match

Parameters:
name - the name of the promotion state
Returns:
a PromotionState if one exists, or NULL

setPromotionStates

public void setPromotionStates(PromotionState[] states)
Changes the list of PromotionStates for this model. The array can contain new states and/or the array can be a re-ording of states.

Parameters:
states - the new array of promotion states
See Also:
PromotionModel.getPromotionStates()

update

public void update()
Stores the modified PromotionModel in the repository. Until this is called all changes to the model are local.


getDebugString

public java.lang.String getDebugString()
Return a debug string for this model.

Returns:
a debug string for this model.

toString

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

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


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