public class MonthEnumerator extends Object implements Enumerator<String>, Serviceable, Component, Enumerator
Modifier and Type | Field and Description |
---|---|
private static String |
__CATALOGUE |
private static Map<String,I18nizableText> |
__MONTHS |
protected I18nUtils |
_i18nUtils
i18n utils
|
static String |
ROLE
Avalon Role
|
Constructor and Description |
---|
MonthEnumerator() |
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
getConfiguration()
Get the configuration of this enumerator
|
Map<Object,I18nizableText> |
getEntries()
Provides the enumerated values with their optional label.
|
I18nizableText |
getEntry(String value)
Retrieves a single label from a value.
|
String |
getLabel(String code,
String language)
Get the translated label for the given code
|
Map<String,I18nizableText> |
getTypedEntries()
Provides the enumerated values with their optional label.
|
void |
service(ServiceManager manager) |
private static final String __CATALOGUE
private static final Map<String,I18nizableText> __MONTHS
protected I18nUtils _i18nUtils
public MonthEnumerator()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public Map<Object,I18nizableText> getEntries() throws Exception
Enumerator
getEntries
in interface Enumerator
Exception
- if an error occurs.public Map<String,I18nizableText> getTypedEntries() throws Exception
Enumerator
Exception
- if an error occurs.
TODO NEWATTRIBUTEAPI: rename this method when Enumerator
will be removedpublic I18nizableText getEntry(String value)
Enumerator
getEntry
in interface Enumerator
value
- the value.null
if not found.public String getLabel(String code, String language)
code
- The code to retrievelanguage
- The language for the translationpublic Map<String,Object> getConfiguration()
Enumerator
getConfiguration
in interface Enumerator