org.filteredpush.mapper.converter
Interface Converter

All Known Implementing Classes:
BooleanConverter

public interface Converter

Interface of the converter which convert data between the UI and the driver.

Author:
Lei Dou $Id:$

Method Summary
 java.lang.Object getAsObject(java.lang.String value)
          Convert data from the webUI to the format accepted by the driver.
 java.lang.String getAsString(java.lang.Object value)
          Convert data from the driver to the format accepted by the webUI.
 void setConfig(java.util.Map<java.lang.String,java.lang.String> conf)
          Configure this converter, e.g.
 

Method Detail

getAsObject

java.lang.Object getAsObject(java.lang.String value)
                             throws ConverterException
Convert data from the webUI to the format accepted by the driver.

Parameters:
value - Input value from the webUI.
Returns:
Value in the format that will be accepted by the driver
Throws:
ConverterException

getAsString

java.lang.String getAsString(java.lang.Object value)
                             throws ConverterException
Convert data from the driver to the format accepted by the webUI.

Parameters:
value - Object returned from driver.
Returns:
String value in the format that will be accepted by the webUI
Throws:
ConverterException

setConfig

void setConfig(java.util.Map<java.lang.String,java.lang.String> conf)
Configure this converter, e.g. the format accepted by driver or webUI.

Parameters:
conf - Configuration in map.