org.loom.converter
Class AbstractFormatConverter
java.lang.Object
org.loom.converter.AbstractConverter
org.loom.converter.AbstractStringConverter
org.loom.converter.AbstractFormatConverter
- All Implemented Interfaces:
- Converter, FormInputDecorator
- Direct Known Subclasses:
- AbstractDecimalConverter, DateConverter, MinutesConverter
public abstract class AbstractFormatConverter
- extends AbstractStringConverter
Converter that is based in a Format
Method Summary |
protected abstract java.text.Format |
createFormat(MessagesRepository messagesRepository)
Creates a new format instance. |
java.lang.Object |
getAsObjectImpl(java.lang.String paramName,
java.lang.String paramValue,
Messages messages,
MessagesRepository repository)
This method is the getAsObject implementation, and has the guarantee that the value is not null |
java.lang.String |
getAsTextImpl(java.lang.Object value,
MessagesRepository repository)
This method is the getAsText implementation, and has the guarantee that the value is not null |
java.lang.String |
getFormatKey()
|
protected java.lang.Object |
parse(java.lang.String text,
java.text.ParsePosition pos,
MessagesRepository repository)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractFormatConverter
public AbstractFormatConverter(java.lang.Class<?> convertedClass,
java.lang.String formatKey,
java.lang.String errorKey)
AbstractFormatConverter
public AbstractFormatConverter(java.lang.Class<?> convertedClass,
java.lang.String formatKey)
getAsObjectImpl
public java.lang.Object getAsObjectImpl(java.lang.String paramName,
java.lang.String paramValue,
Messages messages,
MessagesRepository repository)
- Description copied from class:
AbstractStringConverter
- This method is the getAsObject implementation, and has the guarantee that the value is not null
- Specified by:
getAsObjectImpl
in class AbstractStringConverter
parse
protected java.lang.Object parse(java.lang.String text,
java.text.ParsePosition pos,
MessagesRepository repository)
getAsTextImpl
public java.lang.String getAsTextImpl(java.lang.Object value,
MessagesRepository repository)
- Description copied from class:
AbstractStringConverter
- This method is the getAsText implementation, and has the guarantee that the value is not null
- Overrides:
getAsTextImpl
in class AbstractStringConverter
createFormat
protected abstract java.text.Format createFormat(MessagesRepository messagesRepository)
- Creates a new format instance. Format instances may be different per locale and will be cached in the MessagesRepository
getFormatKey
public java.lang.String getFormatKey()