| org.directwebremoting.extend.Converter
All known Subclasses: org.directwebremoting.convert.DOM4JConverter, org.directwebremoting.convert.URIConverter, org.directwebremoting.convert.XOMConverter, org.directwebremoting.convert.DateConverter, org.directwebremoting.hibernate.H2BeanConverter, org.directwebremoting.convert.StringWrapperConverter, org.directwebremoting.convert.ServletConverter, org.directwebremoting.convert.ArrayConverter, org.directwebremoting.convert.PrimitiveConverter, org.directwebremoting.convert.JDOMConverter, uk.ltd.getahead.dwr.compat.BaseV10Converter, org.directwebremoting.guice.InternalConverter, org.directwebremoting.convert.ConstructorConverter, org.directwebremoting.convert.DOMConverter, jsx3.xml.CdfDocumentConverter, org.directwebremoting.convert.NullConverter, org.directwebremoting.convert.StringEnumAbstractBaseConverter, org.directwebremoting.convert.EnumConverter, org.directwebremoting.convert.ObjectConverter, org.directwebremoting.convert.RawConverter, org.directwebremoting.convert.FileConverter, org.directwebremoting.convert.BigNumberConverter, org.directwebremoting.convert.ContextConverter, org.directwebremoting.hibernate.H3BeanConverter, org.directwebremoting.convert.BeanConverter, org.directwebremoting.convert.CharArrayConverter, org.directwebremoting.convert.CollectionConverter, org.directwebremoting.convert.BaseV20Converter, org.directwebremoting.convert.StringConverter, org.directwebremoting.convert.URLConverter, jsx3.net.URIResolverConverter, org.directwebremoting.convert.MapConverter,
Converter | public interface Converter (Code) | | An interface for converting types from a string to some other type.
author: Joe Walker [joe at getahead dot ltd dot uk] |
convertInbound | Object convertInbound(Class> paramType, InboundVariable data, InboundContext inctx) throws MarshallException(Code) | | Attempt to coerce the data from a string to an Object.
If anything goes wrong with inbound conversion then we generally throw
an exception because we are converting data from the untrusted Internet
so we take the assumption that anything wrong is someone hacking.
Parameters: paramType - The type to convert to Parameters: data - The data to convert Parameters: inctx - The map of data that we are working on The converted data, or null if the conversion was not possible throws: MarshallException - If the conversion failed for some reason |
convertOutbound | OutboundVariable convertOutbound(Object data, OutboundContext outctx) throws MarshallException(Code) | | Return a javascript string that defines the variable named varName to
have the contents of the converted object data.
In contrast to convertInbound() 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.
Parameters: data - The data to convert Parameters: outctx - A collection of objects already converted and the results The OutboundVariable that represents the data to convert throws: MarshallException - If the conversion failed for some reason |
setConverterManager | void setConverterManager(ConverterManager converterManager)(Code) | | 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.
Parameters: converterManager - The configuration object |
|
|