|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectwt.fc.EnumeratedType
public abstract class EnumeratedType
A type that has a defined list of valid values, which may change over time. May optionally have a constant associated to one or more of the valid values (instances) of a sub-type.
The constructors for EnumeratedTypes are protected so that instances
can only be constructed internally. The data needed for construction
will be obtained from a resource and used to construct the instances,
in the static initializer.
Supported API: true
Extendable: true
| Field Summary |
|---|
| Fields inherited from interface wt.meta.EnumeratedType |
|---|
DEFAULT_VALUE, ORDER, SELECTABLE |
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Determine if two instances are considered equal. |
String |
getAbbreviatedDisplay()
Gets the abbreviated display for the metadata element. |
String |
getDisplay()
Gets the "standard" display for the metadata element. |
String |
getDisplay(Locale locale)
Returns the display text for the specified Locale. |
String |
getFullDisplay()
Gets the full display for the metadata element. |
String |
getLocalizedMessage(Locale locale)
Obtain a message, localized for the specified locale. |
String |
getLongDescription()
Gets the long description for the metadata element. |
int |
getOrder()
Gets the value of the attribute: order; The order of a particular instance, when placed in a collection of all valid instances. |
EnumeratedType[] |
getSelectableValueSet()
Gets the set of selectable instances for the concrete type of this instance. |
String |
getShortDescription()
Gets the short description for the metadata element. |
String |
getStringValue()
Gets the string representation of this object, which can later be used to get this instance again. |
static String |
getStringValue(String classname,
String internal_value)
Deprecated. Replaced by wt.fc.EnumeratedTypeUtil.getStringValue(String,String) |
abstract EnumeratedType[] |
getValueSet()
Returns the array of possible values (instances) for any specific (derived) EnumeratedType class. |
int |
hashCode()
Returns the hasCode() of the internal value. |
boolean |
isDefaultValue()
Gets the value of the attribute: defaultValue; Specifies which one of all the valid instances, would be the default value. |
boolean |
isDefaultValue(Locale locale)
Determines if instance is the default value for a specific locale; Specifies which one of all the valid instances, would be the default value. |
boolean |
isSelectable()
Gets the value of the attribute: selectable; Indicates that the instance is available for selection. |
static void |
main(String[] args)
Deprecated. Replaced by wt.fc.EnumeratedTypeUtil.main(String[]) |
static EnumeratedType |
toEnumeratedType(String stringValue)
Deprecated. Replaced by wt.fc.EnumeratedTypeUtil.toEnumeratedType(String) |
static EnumeratedType |
toEnumeratedType(String classname,
String internal_value)
Deprecated. Replaced by wt.fc.EnumeratedTypeUtil.toEnumeratedType(String,String) |
String |
toString()
Returns the internal (persistent) value. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public int getOrder()
getOrder in interface EnumeratedTypepublic boolean isDefaultValue()
isDefaultValue in interface EnumeratedTypepublic boolean isSelectable()
As an example, it may have been valid to select in the past, but is
no longer valid to select, even though is it still a valid value to
have because of historical selections.
Supported API: true
isSelectable in interface EnumeratedTypepublic boolean equals(Object obj)
equals in class Objectobj - another EnumeratedType object to compare against
public String getDisplay(Locale locale)
getDisplay in interface EnumeratedTypelocale - the locale for which a display value is requested
public abstract EnumeratedType[] getValueSet()
public int hashCode()
hashCode in class Objectpublic String toString()
toString in class Objectpublic String getAbbreviatedDisplay()
getAbbreviatedDisplay in interface LocalizableMetadatapublic String getDisplay()
getDisplay in interface LocalizableMetadatapublic String getFullDisplay()
getFullDisplay in interface LocalizableMetadatapublic String getShortDescription()
getShortDescription in interface LocalizableMetadatapublic String getLongDescription()
getLongDescription in interface LocalizableMetadatapublic static void main(String[] args)
Example Usage:
// for current user's locale
java wt.fc.EnumeratedType wt.lifecycle.State
// for FRENCH locale
java wt.fc.EnumeratedType wt.lifecycle.State fr
// for CANADA_FRENCH locale
java wt.fc.EnumeratedType wt.lifecycle.State fr CA
args - a String[] containing the following elements:
[0] fully qualified classname of EnumeratedType sub class
[1] two character language code (optional)
[2] two character country code (optional)
[3] two character variant code (optional)
Localepublic String getStringValue()
toEnumeratedType(String),
getStringValue(String,String)
public static String getStringValue(String classname,
String internal_value)
The format of the string representation is: classname.internal_value
Supported API: true
String - The fully qualified name of the concrete EnumeratedType class.String - The internal value for a instance of that type.
getStringValue()
public static EnumeratedType toEnumeratedType(String classname,
String internal_value)
throws WTInvalidParameterException
String - The fully qualified name of the concrete EnumeratedType class.String - The internal value for a instance of that type.
WTInvalidParameterExceptiongetStringValue()
public static EnumeratedType toEnumeratedType(String stringValue)
throws WTInvalidParameterException
String - The string representation of an EnumeratedType instance.
WTInvalidParameterExceptiongetStringValue()public String getLocalizedMessage(Locale locale)
getLocalizedMessage in interface LocalizableMessageThe - locale for which a display name is desired.
public boolean isDefaultValue(Locale locale)
isDefaultValue in interface EnumeratedTypelocale - the locale for which a display value is requested
public EnumeratedType[] getSelectableValueSet()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||