|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.content2bean.impl.Content2BeanTransformerImpl
public class Content2BeanTransformerImpl
Concrete implementation using reflection and adder methods.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface info.magnolia.content2bean.Content2BeanTransformer |
---|
Content2BeanTransformer.Factory |
Constructor Summary | |
---|---|
Content2BeanTransformerImpl()
|
Method Summary | |
---|---|
boolean |
accept(Content content)
Process all nodes except MetaData and nodes with names prefixed by "jcr:". |
java.lang.Object |
convertPropertyValue(java.lang.Class<?> propertyType,
java.lang.Object value)
Most of the conversion is done by the BeanUtils. |
java.util.Collection<Content> |
getChildren(Content node)
Returns the children of the node to be transformed. |
TypeMapping |
getTypeMapping()
Returns the default mapping. |
void |
initBean(TransformationState state,
java.util.Map properties)
Initializes bean by calling its init method if present. |
java.lang.Object |
newBeanInstance(TransformationState state,
java.util.Map properties)
Use the factory util to instantiate. |
TransformationState |
newState()
Create a state object to share the state between the processor and transformer. |
protected TypeDescriptor |
onResolveType(TransformationState state,
TypeDescriptor resolvedType)
Called once the type should have been resolved. |
TypeDescriptor |
resolveType(TransformationState state)
Resolves the TypeDescriptor from current transformation state. |
void |
setProperty(TransformationState state,
PropertyTypeDescriptor descriptor,
java.util.Map<java.lang.String,java.lang.Object> values)
Do not set class property. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Content2BeanTransformerImpl()
Method Detail |
---|
public TypeDescriptor resolveType(TransformationState state) throws java.lang.ClassNotFoundException
TypeDescriptor
from current transformation state.
Resolving happens in the following order:
resolveType
in interface Content2BeanTransformer
java.lang.ClassNotFoundException
protected TypeDescriptor onResolveType(TransformationState state, TypeDescriptor resolvedType)
public java.util.Collection<Content> getChildren(Content node)
Content2BeanTransformer
getChildren
in interface Content2BeanTransformer
public boolean accept(Content content)
accept
in interface Content.ContentFilter
public void setProperty(TransformationState state, PropertyTypeDescriptor descriptor, java.util.Map<java.lang.String,java.lang.Object> values)
setProperty
in interface Content2BeanTransformer
public java.lang.Object convertPropertyValue(java.lang.Class<?> propertyType, java.lang.Object value) throws Content2BeanException
convertPropertyValue
in interface Content2BeanTransformer
Content2BeanException
public java.lang.Object newBeanInstance(TransformationState state, java.util.Map properties) throws Content2BeanException
newBeanInstance
in interface Content2BeanTransformer
Content2BeanException
public void initBean(TransformationState state, java.util.Map properties) throws Content2BeanException
initBean
in interface Content2BeanTransformer
Content2BeanException
public TransformationState newState()
Content2BeanTransformer
newState
in interface Content2BeanTransformer
public TypeMapping getTypeMapping()
getTypeMapping
in interface Content2BeanTransformer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |