|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Implementations of this service will provide configuration with a micro level of formatting for individual values within a configuration object. These objects could be URLs, Classes, Strings or any primitive.
Copyright 2002 Sapient
Method Summary | |
Class |
getRequiredConfigurationInterface(Class type)
Gets the required configuration interface for the given complex type. |
boolean |
isCacheableType(Class type)
Returns true if instances of type should be cached within configuration objects |
boolean |
isComplexType(Class type)
Returns true if type has a complex type handler. |
Configuration |
toConfiguration(Class type,
Object data)
Translates the supported object type into its Configuration value |
Object |
toObject(Class type,
Configuration value)
Translates configuration data from its Configuration value into its object form for usage by clients of the configuration service. |
Object |
toObject(Class type,
String value)
Translates configuration data from its String value into its object form for usage by clients of the configuration service. |
String |
toString(Class type,
Object value)
Translates the supported object type into its string value |
Method Detail |
public String toString(Class type, Object value)
type
- the Class type of configuration datavalue
- the object value of the configuration data to translate
public Object toObject(Class type, String value) throws ConfigurationTypeException
type
- the class type of the data to translatevalue
- the String value to translate into objects
ConfigurationTypeException
- when the String value is not of
the proper format or is an invalid valuepublic Configuration toConfiguration(Class type, Object data) throws ConfigurationTypeException
type
- the Class type that data should be stored asdata
- the object to be converted to a Configuration type
ConfigurationTypeException
- indicates an error parsing
configuration value into an objectpublic Object toObject(Class type, Configuration value) throws ConfigurationTypeException
type
- the class type of the data to translatevalue
- the Configuration information to be converted
ConfigurationTypeException
- indicates an error parsing
configuration value into an objectpublic boolean isComplexType(Class type)
toConfiguration(Class type, Object data)
and
toObject(Class type, Configuration value)
should be
used to conv to and from configuration information and objects.
If this is false, use
toString(Class type, Object value)
and
toObject(Class type, String value)
type
- class to check for complex type handler
public Class getRequiredConfigurationInterface(Class type)
type
- must be a complex type
ComplexConfigurationTypeHandler.getRequiredConfigurationInterface()
public boolean isCacheableType(Class type)
type
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |