org.loom.converter
Class AbstractSimpleConverter

java.lang.Object
  extended by org.loom.converter.AbstractConverter
      extended by org.loom.converter.AbstractStringConverter
          extended by org.loom.converter.AbstractSimpleConverter
All Implemented Interfaces:
Converter, LocaleUnawareConverter, FormInputDecorator
Direct Known Subclasses:
BooleanConverter, CharacterConverter, EnumConverter, StringConverter

public abstract class AbstractSimpleConverter
extends AbstractStringConverter
implements LocaleUnawareConverter

Default implementation of a Converter that returns a locale-independant conversion that may never produce a conversion error.

Author:
icoloma

Field Summary
 
Fields inherited from class org.loom.converter.AbstractConverter
convertedClass, cssClass
 
Constructor Summary
protected AbstractSimpleConverter(java.lang.Class<?> convertedClass)
           
 
Method Summary
abstract  java.lang.Object getAsObject(java.lang.String text)
          Perform the conversion.
 java.lang.Object getAsObjectImpl(ParameterValue value, Messages messages, MessagesRepository repository)
          This method is the getAsObject implementation, and has the guarantee that the value is not null
 
Methods inherited from class org.loom.converter.AbstractStringConverter
getAsObject, getAsText, getAsTextImpl
 
Methods inherited from class org.loom.converter.AbstractConverter
decorate, getConvertedClass, getCssClass, setConvertedClass, setCssClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.loom.converter.Converter
getAsObject, getAsText, getConvertedClass
 
Methods inherited from interface org.loom.validator.FormInputDecorator
decorate
 

Constructor Detail

AbstractSimpleConverter

protected AbstractSimpleConverter(java.lang.Class<?> convertedClass)
Method Detail

getAsObjectImpl

public java.lang.Object getAsObjectImpl(ParameterValue value,
                                        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

getAsObject

public abstract java.lang.Object getAsObject(java.lang.String text)
Description copied from interface: LocaleUnawareConverter
Perform the conversion. If the input data is not valid, will throw a RuntimeException.

Specified by:
getAsObject in interface LocaleUnawareConverter


The Loom Framework 1.6-SNAPSHOT.
Licensed under the Apache License, Version 2.0 by Extrema Sistemas de Informacion S.L.