|
||||||||||
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:". |
Object |
convertPropertyValue(Class<?> propertyType,
Object value)
Most of the conversion is done by the BeanUtils. |
Collection<Content> |
getChildren(Content node)
Returns the children of the node to be transformed. |
TypeMapping |
getTypeMapping()
Returns the default mapping. |
void |
initBean(TransformationState state,
Map properties)
Initializes bean by calling its init method if present. |
Object |
newBeanInstance(TransformationState state,
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,
Map<String,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 ClassNotFoundException
TypeDescriptor
from current transformation state.
Resolving happens in the following order:
resolveType
in interface Content2BeanTransformer
ClassNotFoundException
protected TypeDescriptor onResolveType(TransformationState state, TypeDescriptor resolvedType)
public 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, Map<String,Object> values)
setProperty
in interface Content2BeanTransformer
public Object convertPropertyValue(Class<?> propertyType, Object value) throws Content2BeanException
convertPropertyValue
in interface Content2BeanTransformer
Content2BeanException
public Object newBeanInstance(TransformationState state, Map properties) throws Content2BeanException
newBeanInstance
in interface Content2BeanTransformer
Content2BeanException
public void initBean(TransformationState state, 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 |