org.formproc.conversion
Interface TypeConverter

All Known Implementing Classes:
AbstractTypeConverter

public interface TypeConverter

Interface which must be implemented by all type converters. A type converter converts the incoming Object from one type to another. The conversion may be as complex as necessary. In addition, type converters can include configuration information in there definitions.

Author:
Anthony Eden

Method Summary
 java.lang.Object convert(java.lang.Object data, java.util.Locale locale)
          Convert the given data object from one type to another.
 void loadConfiguration(com.anthonyeden.lib.config.Configuration configuration)
          Load the converter's configuration.
 

Method Detail

convert

public java.lang.Object convert(java.lang.Object data,
                                java.util.Locale locale)
                         throws java.lang.Exception
Convert the given data object from one type to another.

Parameters:
data - The data object
locale - The Locale
Returns:
The resulting object
Throws:
java.lang.Exception

loadConfiguration

public void loadConfiguration(com.anthonyeden.lib.config.Configuration configuration)
                       throws com.anthonyeden.lib.config.ConfigurationException
Load the converter's configuration.

Parameters:
configuration - The configuration object
Throws:
com.anthonyeden.lib.config.ConfigurationException


Copyright (c) 2001-2003 Anthony Eden. All Rights Reserved.