|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.directwebremoting.convert.BaseV20Converter
org.directwebremoting.convert.BasicObjectConverter
public abstract class BasicObjectConverter
BasicObjectConverter is a parent to BeanConverter
and
ObjectConverter
an provides support for include and exclude lists,
and instanceTypes.
Constructor Summary | |
---|---|
BasicObjectConverter()
|
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. |
OutboundVariable |
convertOutbound(java.lang.Object data,
OutboundContext outctx)
Return a javascript string that defines the variable named varName to have the contents of the converted object data. |
ConverterManager |
getConverterManager()
Accessor for the current ConverterManager |
java.lang.Class |
getInstanceType()
|
java.lang.String |
getJavascript()
Accessor for the javascript class name for the converted objects. |
void |
setConverterManager(ConverterManager converterManager)
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. |
void |
setExclude(java.lang.String excludes)
Set a list of properties excluded from conversion |
void |
setImplementation(java.lang.String name)
|
void |
setInclude(java.lang.String includes)
Set a list of properties included from conversion |
void |
setInstanceType(java.lang.Class instanceType)
|
void |
setJavascript(java.lang.String javascript)
Accessor for the javascript class name for the converted objects. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.directwebremoting.extend.NamedConverter |
---|
getPropertyMapFromClass, getPropertyMapFromObject |
Constructor Detail |
---|
public BasicObjectConverter()
Method Detail |
---|
public java.lang.Object convertInbound(java.lang.Class paramType, InboundVariable iv, InboundContext inctx) throws MarshallException
Converter
convertInbound
in interface Converter
paramType
- The type to convert toiv
- The data to convertinctx
- The map of data that we are working on
MarshallException
- If the conversion failed for some reasonpublic OutboundVariable convertOutbound(java.lang.Object data, OutboundContext outctx) throws MarshallException
Converter
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.
convertOutbound
in interface Converter
data
- The data to convertoutctx
- A collection of objects already converted and the results
MarshallException
- If the conversion failed for some reasonpublic void setExclude(java.lang.String excludes)
excludes
- The space or comma separated list of properties to excludepublic void setInclude(java.lang.String includes)
includes
- The space or comma separated list of properties to excludepublic void setImplementation(java.lang.String name) throws java.lang.ClassNotFoundException
name
- The class name to use as an implementation of the converted bean
java.lang.ClassNotFoundException
- If the given class can not be foundpublic java.lang.Class getInstanceType()
getInstanceType
in interface NamedConverter
public void setInstanceType(java.lang.Class instanceType)
setInstanceType
in interface NamedConverter
instanceType
- The instanceType to set.public void setConverterManager(ConverterManager converterManager)
Converter
setConverterManager
in interface Converter
setConverterManager
in class BaseV20Converter
converterManager
- The confiuration objectpublic ConverterManager getConverterManager()
public java.lang.String getJavascript()
NamedConverter
getJavascript
in interface NamedConverter
public void setJavascript(java.lang.String javascript)
NamedConverter
setJavascript
in interface NamedConverter
javascript
- The Javascript name
|
Copyright ? 2005 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |