|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jcorporate.expresso.core.dbobj.ValidValue
com.jcorporate.expresso.core.dbobj.ISOValidValue
An ISO valid value is a enumerated collection very similar to a pure Struts label and value bean with internationalization (i18n) support. It typically represent an item of data that is displayed in a drop-down list box or a menu selection. A valid value has a real value as known as a key and description.
To support internationalisation (i18n) thedescription
field also has a dual role. The description field is used a look-up
key into a resource bundle during canonisation.
| Nested Class Summary |
| Nested classes inherited from class com.jcorporate.expresso.core.dbobj.ValidValue |
ValidValue.DescriptionComparator, ValidValue.ValueComparator |
| Field Summary |
| Fields inherited from class com.jcorporate.expresso.core.dbobj.ValidValue |
description, value |
| Constructor Summary | |
ISOValidValue()
Default constructor for creating a valid value. |
|
ISOValidValue(RequestContext request,
String schemaClass,
String prefix,
String value,
String description)
Constructor of valid value enumeration which automatically canonizes the description attribute if it can be found in�the schema resource bundle |
|
ISOValidValue(String schemaClass,
Locale locale,
String prefix,
String value,
String description)
Constructor of valid value enumeration which automatically canonizes the description attribute if it can be found in�the schema resource bundle |
|
ISOValidValue(String newValue,
String newDescrip)
Original constructor for creating a valid value. |
|
ISOValidValue(String schemaClass,
String prefix,
String value,
String description)
Constructor of valid value enumeration which automatically canonizes the description attribute if it can be found in�the schema resource bundle in�the default locale |
|
| Method Summary | |
String |
canonize(RequestContext request,
String schemaClass,
String prefix)
This is method will attempt to convert the description attribute into a localised value
string from a message resource bundle. |
String |
canonize(String schemaClass,
Locale locale,
String prefix)
This is method will attempt to convert the description attribute into a localised value
string from a message resource bundle. |
String |
canonize(String schemaClass,
String prefix)
This is method will attempt to convert the description attribute into a the default locale value
string from a message resource bundle. |
String |
getDescription()
Gets the description of the valid value |
String |
getKey()
Gets the real value of the valid value as a cache key |
String |
getValue()
Gets the real value of the valid value |
void |
setDescription(String description)
Sets the real description of the valid value |
void |
setValue(String value)
Sets the real value of the valid value |
String |
toString()
Human readable string for debugging |
| Methods inherited from class com.jcorporate.expresso.core.dbobj.ValidValue |
clone, equals, hashCode |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ISOValidValue()
public ISOValidValue(String newValue,
String newDescrip)
newValue - the real value of the enumerationnewDescrip - the description of the enumeration
public ISOValidValue(String schemaClass,
String prefix,
String value,
String description)
schemaClass - the fully qualified class name of the schemaprefix - the optional prefix argumentvalue - the real value string of the enumerationdescription - the description string of the enumeration
that is used as look-up key in�the resource bundlecanonize( String schemaClass, Locale locale, String prefix )
public ISOValidValue(String schemaClass,
Locale locale,
String prefix,
String value,
String description)
schemaClass - the fully qualified class name of the schemalocale - the localeprefix - the optional prefix argumentvalue - the real value string of the enumerationdescription - the description string of the enumeration
that is used as look-up key in�the resource bundlecanonize( String schemaClass, Locale locale, String prefix )
public ISOValidValue(RequestContext request,
String schemaClass,
String prefix,
String value,
String description)
schemaClass - the fully qualified class name of the schemarequest - the request contextprefix - the optional prefix argumentvalue - the real value string of the enumerationdescription - the description string of the enumeration
that is used as look-up key in�the resource bundlecanonize( RequestContext request, String schemaClass, String prefix )| Method Detail |
public String getValue()
getValue in class ValidValuesetValue(java.lang.String)public void setValue(String value)
setValue in class ValidValuevalue - the new value stringgetValue()public String getKey()
getKey in interface CacheablegetKey in class ValidValuegetValue()public String getDescription()
getDescription in class ValidValuepublic void setDescription(String description)
setDescription in class ValidValuedescription - the new description stringgetDescription()
public String canonize(String schemaClass,
String prefix)
description attribute into a the default locale value
string from a message resource bundle. If the
prefix parameter is not null then the
description attribute is prepended with a full
stop "." to the original description string to make a new look
up key. Otherwise if the prefix parameter is null
then original description is the look up key. The key value is
used to look up the description from a resource bundle.
schemaClass - the fully qualified class name of the schemaprefix - the optional prefix argument
canonize( String schemaClass, Locale locale, String prefix )
public String canonize(String schemaClass,
Locale locale,
String prefix)
description attribute into a localised value
string from a message resource bundle. If the
prefix parameter is not null then the
description attribute is prepended with a full
stop "." to the original description string to make a new look
up key. Otherwise if the prefix parameter is null
then original description is the look up key. The key value is
used to look up the description from a resource bundle.
schemaClass - the fully qualified class name of the schemalocale - the localeprefix - the optional prefix argument
getDescription()
public String canonize(RequestContext request,
String schemaClass,
String prefix)
description attribute into a localised value
string from a message resource bundle. If the
prefix parameter is not null then the
description attribute is prepended with a full
stop "." to the original description string to make a new look
up key. Otherwise if the prefix parameter is null
then original description is the look up key. The key value is
used to look up the description from a resource bundle.
schemaClass - the fully qualified class name of the schemarequest - the request context containing locale and dbcontextprefix - the optional prefix argument
Messages.getString(String schemaClass, Locale l, String stringCode, Object[] args),
canonize( String schemaClass, String prefix ),
canonize( String schemaClass, Locale locale, String prefix )public String toString()
toString in class ValidValue
|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||