|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.milyn.javabean.decoders.LocaleAwareDateDecoder
public class LocaleAwareDateDecoder
LocaleAwareDateDecoder is a decoder 'helper' that can be subclassed by Date decoders to enable them to use locale specific date formats.
Usage:
<resource-config selector="decoder:DecoderName">
<resource>org.milyn.javabean.decoders.DateDecoder</resource>
<param name="format">EEE MMM dd HH:mm:ss z yyyy</param>
</resource-config>
Optional parameters:
<param name="locale-language">sv</param>
<param name="locale-country">SE</param>
<param name="verify-locale">false</param>
| Field Summary | |
|---|---|
protected SimpleDateFormat |
decoder
|
static String |
DEFAULT_DATE_FORMAT
Default date format string |
protected String |
format
|
static String |
FORMAT
Date format configuration key. |
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 | |
|---|---|
LocaleAwareDateDecoder()
|
|
| Method Summary | |
|---|---|
protected Locale |
getLocale(String languageCode,
String countryCode)
Returns a Locale matching the passed in languageCode, and countryCode |
protected boolean |
isLocalInstalled(Locale locale)
|
void |
setConfiguration(SmooksResourceConfiguration resourceConfig)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String FORMAT
public static final String DEFAULT_DATE_FORMAT
public static final String LOCALE_LANGUAGE_CODE
public static final String LOCALE_COUNTRY_CODE
public static final String VERIFY_LOCALE
protected String format
protected SimpleDateFormat decoder
| Constructor Detail |
|---|
public LocaleAwareDateDecoder()
| Method Detail |
|---|
public void setConfiguration(SmooksResourceConfiguration resourceConfig)
throws SmooksConfigurationException
SmooksConfigurationException
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 | |||||||||