org.sape.carbon.core.config.type
Interface ComplexConfigurationTypeHandler

All Known Implementing Classes:
ComponentTypeHandler

public interface ComplexConfigurationTypeHandler

This interface varies from ConfigurationTypeHandler in that it converts Configuration data instead of simple strings into objects and vice versa. This is useful for objects that are made of more than a single piece of data. Copyright 2002 Sapient

Since:
carbon 1.0
Version:
$Revision: 1.3 $($Author: dvoet $ / $Date: 2003/05/05 21:21:20 $)
Author:
Douglas Voet, September 2002
See Also:
ConfigurationTypeHandler

Method Summary
 Class getRequiredConfigurationInterface()
          Allows the type handler to specify the minimum required configuration interface for configuration passed into the toObject method.
 Configuration toConfiguration(Object objectValue)
          Translates the an Object into the Configuration version of itself
 Object toObject(Class returnType, Configuration data)
          Translates the Configuration representation of data in an object version
 

Method Detail

toObject

public Object toObject(Class returnType,
                       Configuration data)
                throws TypeConversionException
Translates the Configuration representation of data in an object version

Parameters:
returnType - the type of the return value
data - the Configuration representation of the data
Returns:
the object value of the data represented by the supplied Configuration
Throws:
TypeConversionException - when there is a formatting problem with the supplied Configuration data

toConfiguration

public Configuration toConfiguration(Object objectValue)
                              throws TypeConversionException
Translates the an Object into the Configuration version of itself

Parameters:
objectValue - The object to be translated
Returns:
the Configuration version of the object
Throws:
TypeConversionException - when there is a problem during the conversion

getRequiredConfigurationInterface

public Class getRequiredConfigurationInterface()
Allows the type handler to specify the minimum required configuration interface for configuration passed into the toObject method. The toConfiguration method must return a configuration implementing this class.

Returns:
Class minimum required configuraiton interface implemented by types handled by this TypeHandler.


Copyright 1999-2003 Sapient Corporation. All Rights Reserved.