01: package org.strecks.converter.handler;
02:
03: import org.strecks.converter.Converter;
04: import org.strecks.exceptions.ConversionRuntimeException;
05:
06: /**
07: * Interface for reading a property and converting it using the supplied converter
08: * @author Phil Zoio
09: */
10: public interface ConversionHandler {
11:
12: /**
13: * Handles conversion from the source property where the possibility exists that the type of the
14: * source property to be converted may be incompatible with the <code>Converter</code>
15: * parameterization type
16: */
17: @SuppressWarnings("unchecked")
18: public Object getAndConvertInwards(Object source,
19: String sourcePropertyName, Converter converter)
20: throws ConversionRuntimeException;
21:
22: /**
23: * Handles conversion from the target property where the possibility exists that the type of the
24: * source property to be converted may be incompatible with the <code>Converter</code>
25: * parameterization type
26: */
27: @SuppressWarnings("unchecked")
28: public Object getAndConvertOutwards(Object targetBean,
29: String propertyName, Converter converter)
30: throws ConversionRuntimeException;
31: }
|