org.araneaframework.uilib.form
Interface Converter

All Superinterfaces:
FormElementAware, Serializable
All Known Implementing Classes:
BaseConverter

public interface Converter
extends Serializable, FormElementAware

Form data converter interface, for converting from one data type to another. See BaseConverter for description of Converter purpose in forms.


Method Summary
 Object convert(Object data)
          This method converts the data from one type to another.
 Converter newConverter()
          This method should return a new converter, of the same type that the class that overrides it, however freshly initialized.
 Object reverseConvert(Object data)
          This method converts the data from one type to another (though the types are exchanged in comparison with convert(Object)).
 void setFormElementCtx(FormElementContext feCtx)
           
 

Method Detail

setFormElementCtx

public void setFormElementCtx(FormElementContext feCtx)
Specified by:
setFormElementCtx in interface FormElementAware

convert

public Object convert(Object data)
This method converts the data from one type to another.

Parameters:
data - Data to convert.
Returns:
Converted data.

reverseConvert

public Object reverseConvert(Object data)
This method converts the data from one type to another (though the types are exchanged in comparison with convert(Object)).

Parameters:
data - Data to convert.
Returns:
Converted data.

newConverter

public Converter newConverter()
This method should return a new converter, of the same type that the class that overrides it, however freshly initialized.

Returns:
a new converter, of the same type that the class that overrides it, however freshly initialized.