|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ltd.getahead.dwr.compat.BaseV10Converter
uk.ltd.getahead.dwr.convert.PrimitiveConverter
public class PrimitiveConverter
Converter for all primitive types
| Constructor Summary | |
|---|---|
PrimitiveConverter()
|
|
| Method Summary | |
|---|---|
java.lang.Object |
convertInbound(java.lang.Class paramType,
InboundVariable iv,
InboundContext inctx)
Attempt to coerce the data from a string to an Object. |
java.lang.String |
convertOutbound(java.lang.Object object,
java.lang.String varname,
OutboundContext outctx)
Return a javascript string that defines the variable named varName to have the contents of the converted object data. |
void |
setConverterManager(ConverterManager config)
If we are a compound converter that farms out part of the conversion to other converters then you farm the conversion out via a configuration. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PrimitiveConverter()
| Method Detail |
|---|
public void setConverterManager(ConverterManager config)
Converter
setConverterManager in interface Converterconfig - The confiuration object
public java.lang.Object convertInbound(java.lang.Class paramType,
InboundVariable iv,
InboundContext inctx)
throws ConversionException
Converter
convertInbound in interface ConverterparamType - The type to convert toiv - The data to convertinctx - The map of data that we are working on
ConversionException - If the conversion failed for some reason
public java.lang.String convertOutbound(java.lang.Object object,
java.lang.String varname,
OutboundContext outctx)
ConverterconvertInbound() any failures in converting
data on the way out should not stop processing, and we should carry on
if we can. Failures are probably down to some misconfiguration so as much
information about the error as can be safely generated to console logs is
good. In other words if you need to loop in outbound conversion then it
might be a good idea to catch issues inside the loop, log, and carry on.
convertOutbound in interface Converterobject - The data to convertvarname - The variable to defineoutctx - Objects already converted and the results
|
Copyright ¨ 2005 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||