|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.milyn.javabean.decoders.LocaleAwareDecoder
public abstract class LocaleAwareDecoder
LocaleAwareDecoder is a decoder 'helper' that can be subclassed by any DataDecoder
implementation that relies on Locale information to perform
Data Decoding.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.milyn.javabean.DataDecoder |
|---|
DataDecoder.Factory |
| Field Summary | |
|---|---|
static String |
LOCALE
Locale. |
static String |
LOCALE_COUNTRY_CODE
ISO Country Code. |
static String |
LOCALE_LANGUAGE_CODE
ISO Language Code. |
static String |
VERIFY_LOCALE
True or false(default). |
| Constructor Summary | |
|---|---|
LocaleAwareDecoder()
|
|
| Method Summary | |
|---|---|
Properties |
getConfiguration()
Get the component configuration. |
Locale |
getLocale()
Get the configured Locale. |
protected Locale |
getLocale(String languageCode,
String countryCode)
Returns a Locale matching the passed in languageCode, and countryCode |
protected boolean |
isLocalInstalled(Locale locale)
|
void |
setConfiguration(Properties resourceConfig)
Set the component configuration. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.milyn.javabean.DataDecoder |
|---|
decode |
| Field Detail |
|---|
public static final String LOCALE
public static final String LOCALE_LANGUAGE_CODE
public static final String LOCALE_COUNTRY_CODE
public static final String VERIFY_LOCALE
| Constructor Detail |
|---|
public LocaleAwareDecoder()
| Method Detail |
|---|
public void setConfiguration(Properties resourceConfig)
throws SmooksConfigurationException
Configurable
setConfiguration in interface ConfigurableresourceConfig - The component configuration properties.
SmooksConfigurationException - Bad component configuration.public Properties getConfiguration()
Configurable
getConfiguration in interface Configurablepublic Locale getLocale()
Locale.
Does not return the default locale if locale is not configured. The implementation
can interpret non-configuration in whatever way makes sense to that implementation,
including defaulting it to the default locale.
Locale, or null if the locale
is not configured.
protected Locale getLocale(String languageCode,
String countryCode)
languageCode - lowercase two-letter ISO-639 code.countryCode - uppercase two-letter ISO-3166 code.
SmooksConfigurationException - if the Locale is not installed on the systemprotected boolean isLocalInstalled(Locale locale)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||