|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mentawai.converter.LocaleConverter
public abstract class LocaleConverter
A converter that needs to know the user locale to perform the conversion. You should override this class to implement your own converters.
| Constructor Summary | |
|---|---|
LocaleConverter()
|
|
| Method Summary | |
|---|---|
protected boolean |
allowNull()
Override this method if you want to convert null (not-present) values. |
abstract Object |
convert(Object value,
Locale loc)
Convert an object to another one using the use locale. |
Object |
convert(String field,
Action action)
Converts a input field from this action. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LocaleConverter()
| Method Detail |
|---|
public abstract Object convert(Object value,
Locale loc)
throws ConversionException
value - The object to convert.loc - The user locale to use in the convertion.
ConversionException - if the conversion fail for any reason.protected boolean allowNull()
public Object convert(String field,
Action action)
throws ConversionException
Converter
convert in interface Converterfield - The field to convert.action - The action from where to get the field.
ConversionException - if the field value cannot be converted.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||