|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.starteam.EnumeratedValue
public class EnumeratedValue
A simple integer/String pair object to be used for adding new custom
enumerated fields (Property) and modifying existing enumerated
fields (Property).
| Constructor Summary | |
|---|---|
EnumeratedValue(int code,
java.lang.String displayName)
Creates a new enumerated value with the specified code and display name The default sort order is assigned the value of the code The internal name is set to the value of the display name but can subsequently be overridden. |
|
EnumeratedValue(int code,
Translations translations)
Creates a new enumerated value with the specified code and translations for its display name. |
|
| Method Summary | |
|---|---|
void |
addChild(EnumeratedValue child)
Assign a new child to the hierarchy of this Enumerated Value. |
void |
assignParent(EnumeratedValue parent)
Assign this Enumerated Value to a different parent This enumerated value may either be a root or a child of a different hierarchy The hierarchy tree is changed in accordance with this assignment This method is equivalent to EnumeratedValue.addChild(EnumeratedValue)
However, if NULL is passed in as the parent parameter, then this
EnumeratedValue is promoted to become a root. |
EnumeratedValue |
copy()
Returns a deep copy of this object. |
void |
disable()
Disable this enumerated value |
void |
enable()
Enable this enumerated value |
boolean |
equals(java.lang.Object obj)
Compares this EnumeratedValue instance with another one. |
EnumeratedValue |
findChild(java.lang.String internalName)
return a child with the given internal name |
EnumeratedValue[] |
getChildValues()
return the children of this Enumerated Value or an empty set if there are none The returned children are sorted by the specified sort order |
int |
getCode()
Return the enum code for this object. |
java.lang.String |
getDebugString()
returns a string used mainly for debugging |
int |
getDepthInHierarchy()
Returns the depth of this enumerated value in the presentation hierarchy. |
java.lang.String |
getDisplayName()
Returns the locale appropriate display name for the enumerated value. |
Translations |
getDisplayNameTranslations()
Returns the display name translations for this enumerated value. |
java.lang.String |
getInternalName()
Return the internal name for this object. |
EnumeratedValue |
getParentValue()
Returns the parent value of this enumerated value, or null if this is a root value. |
int |
getSortOrder()
Get the sort order of this enumerated value. |
boolean |
hasChildValues()
Returns true if this enumerated value has any child values (that is, if it is not a leaf value). |
int |
hashCode()
returns a unique hash for this instance |
boolean |
isClosedState()
Returns true if this Enumerated Value represents the Closed State for its Property Note that the closed state is only meaningful if the property is the status property Note also that only 1 enumerated value may represent the closed state of a status property This property was first introduced in the 12.0 server Changing the closed state on a pre 12.0 server has no effect Querying for the Closed State on a 11.0 server is meaningless since the Process Types are restricted to Task, Requirement & ChangeRequest, and their Closed States are fixed |
boolean |
isDisabled()
Return true if this enumerated value is disabled. |
boolean |
isEnabled()
Return true if this enumerated value is enabled. |
boolean |
isEqualTo(EnumeratedValue ev)
Compares this EnumeratedValue instance with another one. |
boolean |
isLeafValue()
Returns true if this enumerated value has no child values. |
boolean |
isRootValue()
Returns true if this enumerated value has no parent value. |
boolean |
isSelectable()
Gets the IsSelectable attribute of this enumerated value. |
void |
setAfter(EnumeratedValue predecessor)
Place (position) this Enumerated Value immediately after the specified predecessor An illegal state exception will be thrown if this Enumerated Value and the specified predecessor belong to different hierarchies If the context of the owning EnumeratedProperty is known to this and its predecessor, then the sort order of the entire forest of values is realigned in accordance with this assignment. |
void |
setChildValues(EnumeratedValue[] children)
Set the children for this EnumeratedValue. |
void |
setClosedState(boolean closed)
Set this Enumerated Value to represent a closed state for its property Note that the closed state is only meaningful if the property is the status property This property was first introduced in the 12.0 server. |
void |
setDisplayName(java.lang.String displayName)
Sets the locale appropriate display name for this enumerated value |
void |
setDisplayNameTranslations(Translations translations)
Sets the display name translations for this enumerated value. |
void |
setEnabled(boolean enabled)
Enable or disable this enumerated value. |
void |
setInternalName(java.lang.String internalName)
Change the internal name for this enumerated value. |
void |
setSelectable(boolean bSelectable)
Sets the IsSelectable attribute of this enumerated value. |
void |
setSortOrder(int i)
Set the sort order for this enumerated value. |
java.lang.String |
toString()
returns the display name |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public EnumeratedValue(int code,
Translations translations)
EnumeratedProperty.setValues(EnumeratedValue[])
code - the enum code valuetranslations - the display names for this enumerated value. May not be null.
public EnumeratedValue(int code,
java.lang.String displayName)
EnumeratedProperty.setValues(EnumeratedValue[])
code - intdisplayName - StringEnumeratedValue.setInternalName(String),
EnumeratedValue.setDisplayNameTranslations(Translations)| Method Detail |
|---|
public EnumeratedValue getParentValue()
public boolean isRootValue()
public boolean hasChildValues()
public boolean isLeafValue()
public int getDepthInHierarchy()
public EnumeratedValue[] getChildValues()
public void setChildValues(EnumeratedValue[] children)
children - the children of this EnumeratedValuepublic EnumeratedValue findChild(java.lang.String internalName)
internalName - the name of the child to find
public void addChild(EnumeratedValue child)
child - a child of this enumerated valuepublic void assignParent(EnumeratedValue parent)
EnumeratedValue.addChild(EnumeratedValue)
However, if NULL is passed in as the parent parameter, then this
EnumeratedValue is promoted to become a root.
parent - the new parent of this enumerated valuepublic void setAfter(EnumeratedValue predecessor)
predecessor - the predecessor Enumerated Valuepublic int getCode()
public java.lang.String getInternalName()
EnumeratedProperty.findValue(String)public void setInternalName(java.lang.String internalName)
internalName - the internal name for this objectEnumeratedProperty.findValue(String)public boolean isEnabled()
public boolean isDisabled()
public boolean isClosedState()
public void setClosedState(boolean closed)
closed - true to represent an open state for the owning propertypublic void setEnabled(boolean enabled)
enabled - true if this enumerated value should be enabledpublic void disable()
public void enable()
public boolean isSelectable()
public void setSelectable(boolean bSelectable)
bSelectable - boolean true if this EnumeratedValue should be selectablepublic Translations getDisplayNameTranslations()
public void setDisplayNameTranslations(Translations translations)
translations - the new translationspublic java.lang.String getDisplayName()
public void setDisplayName(java.lang.String displayName)
displayName - String a locale appropriate display namepublic int getSortOrder()
public void setSortOrder(int i)
i - The sort order of this enumerated value.public java.lang.String toString()
toString in class java.lang.Objectpublic EnumeratedValue copy()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - The other EnumeratedValue instance
public int hashCode()
hashCode in class java.lang.Objectpublic boolean isEqualTo(EnumeratedValue ev)
ev - The other EnumeratedProperty instance
public java.lang.String getDebugString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||