|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 data)
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.util.List<java.lang.String> |
getInclusions()
Returns an immutable List of the inclusions. |
java.lang.Class<?> |
getInstanceType()
|
java.lang.String |
getJavascript()
Accessor for the javascript class name for mapped converted objects. |
java.lang.String |
getJavascriptSuperClass()
Accessor for the javascript class name that will appear as superclass for mapped converted objects. |
void |
setConstructor(java.lang.String paramsString)
Set the parameters to be used for constructor injection |
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 mapped converted objects. |
void |
setJavascriptSuperClass(java.lang.String javascriptSuperClass)
Setter for the javascript class name that will appear as superclass for mapped 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 data)
throws ConversionException
Converter
convertInbound in interface ConverterparamType - The type to convert todata - The data to convert
ConversionException - If the conversion failed for some reason
public OutboundVariable convertOutbound(java.lang.Object data,
OutboundContext outctx)
throws ConversionException
ConverterIn 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 Converterdata - The data to convertoutctx - A collection of objects already converted and the results
ConversionException - 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 exclude
public 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 void setConverterManager(ConverterManager converterManager)
Converter
setConverterManager in interface ConverterconverterManager - The configuration objectpublic ConverterManager getConverterManager()
public java.lang.String getJavascript()
NamedConverter
getJavascript in interface NamedConverterpublic void setJavascript(java.lang.String javascript)
NamedConverter
setJavascript in interface NamedConverterjavascript - The Javascript classnamepublic java.lang.String getJavascriptSuperClass()
NamedConverter
getJavascriptSuperClass in interface NamedConverterpublic void setJavascriptSuperClass(java.lang.String javascriptSuperClass)
NamedConverter
setJavascriptSuperClass in interface NamedConverterjavascriptSuperClass - The Javascript classnamepublic java.lang.Class<?> getInstanceType()
getInstanceType in interface NamedConverterpublic void setInstanceType(java.lang.Class<?> instanceType)
setInstanceType in interface NamedConverterinstanceType - The instanceType to set.public void setConstructor(java.lang.String paramsString)
paramsString - a comma separated list of type/name pairs.public java.util.List<java.lang.String> getInclusions()
|
Copyright ยจ 2008 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||