org.compass.core.converter
Interface ResourcePropertyConverter

All Superinterfaces:
Converter
All Known Implementing Classes:
AbstractBasicConverter, AbstractFormatConverter, AbstractNumberConverter, BigDecimalConverter, BigIntegerConverter, BooleanConverter, ByteConverter, CalendarConverter, CharConverter, DateConverter, DoubleConverter, EnumConverter, FileConverter, FloatConverter, IntConverter, LocaleConverter, LongConverter, ShortConverter, SqlDateConverter, SqlTimeConverter, SqlTimestampConverter, StringBufferConverter, StringConverter, URLConverter

public interface ResourcePropertyConverter
extends Converter

A specialized converter that can convert to and from strings as well. Handles ResourcePropertyMapping.

Author:
kimchy

Method Summary
 Object fromString(String str, ResourcePropertyMapping resourcePropertyMapping)
          Converts from a String and into it's Object representation.
 String toString(Object o, ResourcePropertyMapping resourcePropertyMapping)
          Converts the Object into a String.
 
Methods inherited from interface org.compass.core.converter.Converter
marshall, unmarshall
 

Method Detail

fromString

Object fromString(String str,
                  ResourcePropertyMapping resourcePropertyMapping)
                  throws ConversionException
Converts from a String and into it's Object representation.

Parameters:
str - The string to convert from
resourcePropertyMapping - The resource property mapping
Returns:
Theh object converterd from the String
Throws:
ConversionException

toString

String toString(Object o,
                ResourcePropertyMapping resourcePropertyMapping)
                throws ConversionException
Converts the Object into a String.

Note that toString must be able to handle a null resourcePropertyMapping.

Parameters:
o - The Object to convert from
resourcePropertyMapping - The resource proeprty mapping
Returns:
The String converted from the Object
Throws:
ConversionException


Copyright (c) 2004-2006 The Compass Project.