com.cc.framework.convert
Interface Converter

All Known Subinterfaces:
StatefullConverter
All Known Implementing Classes:
AppointmentPriorityConverter, BooleanConverter, ByteSizeConverter, DateConverter, DateTimeConverter, DoubleConverter, FloatConverter, IntegerConverter, LongConverter, NumberConverter, StringConverter

public interface Converter

The Common-Controls framework makes use of Converter classes to convert Datatypes to and from String. A Converter is assigned to one specific Java Datatype (Class). Use ConverterRegisty.register() to register a custom converter.

Version:
$Revision$
Author:
Harald Schulz

Method Summary
 java.lang.Object getAsObject(RequestContext ctx, java.lang.String newValue)
          Converts the given String value into the Converters Datatype
 java.lang.String getAsString(RequestContext ctx, java.lang.Object value)
          Converts the Object of the converters Datatype into it's String representation
 

Method Detail

getAsObject

public java.lang.Object getAsObject(RequestContext ctx,
                                    java.lang.String newValue)
                             throws ConverterException
Converts the given String value into the Converters Datatype

Parameters:
ctx - Request Context
newValue - The String Value to convert
Returns:
Object of the Converters Datatype
Throws:
ConverterException - is thrown when a conversion error occurs

getAsString

public java.lang.String getAsString(RequestContext ctx,
                                    java.lang.Object value)
                             throws ConverterException
Converts the Object of the converters Datatype into it's String representation

Parameters:
ctx - Request Context
value - The Object to convert
Returns:
String
Throws:
ConverterException - is thrown when a conversion error occurs


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.