|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.jcr.node2bean.impl.Node2BeanProcessorImpl
@Singleton public class Node2BeanProcessorImpl
Contains the logic for traversing the hierarchy and do the calls to the transformer.
Constructor Summary | |
---|---|
Node2BeanProcessorImpl(TypeMapping typeMapping,
Node2BeanTransformer transformer)
|
Method Summary | |
---|---|
boolean |
isForceCreation()
|
protected Node2BeanTransformer |
resolveTransformer(TypeDescriptor type,
Node2BeanTransformer transformer)
|
void |
setForceCreation(boolean forceCreation)
|
protected void |
setProperties(Map<String,Object> values,
Node2BeanTransformer transformer,
TransformationState state)
Populates the properties of the bean with values from the map. |
Object |
setProperties(Object bean,
javax.jcr.Node node,
boolean recursive,
Node2BeanTransformer transformer,
ComponentProvider componentProvider)
Similar to toBean() but uses a passed bean as the root bean. |
Object |
toBean(javax.jcr.Node node)
Transforms given node to bean. |
Object |
toBean(javax.jcr.Node node,
boolean recursive,
Node2BeanTransformer transformer,
ComponentProvider componentProvider)
Transforms the node to a bean using the passed transformer and component provider. |
protected Object |
toBean(javax.jcr.Node node,
boolean recursive,
Node2BeanTransformer transformer,
TransformationState state,
ComponentProvider componentProvider)
|
Object |
toBean(javax.jcr.Node node,
Class<?> defaultClass)
Transforms given node to bean. |
protected Map<String,Object> |
toMap(javax.jcr.Node node,
boolean recursive,
Node2BeanTransformer transformer,
TransformationState state,
ComponentProvider componentProvider)
Transforms the children of provided content into a map. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
@Inject public Node2BeanProcessorImpl(TypeMapping typeMapping, Node2BeanTransformer transformer)
Method Detail |
---|
public Object toBean(javax.jcr.Node node) throws Node2BeanException, javax.jcr.RepositoryException
Node2BeanProcessor
toBean
in interface Node2BeanProcessor
node
- which will be transformed to bean
Node2BeanException
javax.jcr.RepositoryException
public Object toBean(javax.jcr.Node node, Class<?> defaultClass) throws Node2BeanException, javax.jcr.RepositoryException
Node2BeanProcessor
toBean
in interface Node2BeanProcessor
node
- which will be transformed to beandefaultClass
- default type
Node2BeanException
javax.jcr.RepositoryException
public Object toBean(javax.jcr.Node node, boolean recursive, Node2BeanTransformer transformer, ComponentProvider componentProvider) throws Node2BeanException, javax.jcr.RepositoryException
Node2BeanProcessor
toBean
in interface Node2BeanProcessor
node
- which will be transformed to beanrecursive
- if set to true then all subnodes will be transformed as well
Node2BeanException
javax.jcr.RepositoryException
protected Object toBean(javax.jcr.Node node, boolean recursive, Node2BeanTransformer transformer, TransformationState state, ComponentProvider componentProvider) throws Node2BeanException, javax.jcr.RepositoryException
Node2BeanException
javax.jcr.RepositoryException
public Object setProperties(Object bean, javax.jcr.Node node, boolean recursive, Node2BeanTransformer transformer, ComponentProvider componentProvider) throws Node2BeanException, javax.jcr.RepositoryException
Node2BeanProcessor
toBean()
but uses a passed bean as the root bean.
setProperties
in interface Node2BeanProcessor
Node2BeanException
javax.jcr.RepositoryException
protected Map<String,Object> toMap(javax.jcr.Node node, boolean recursive, Node2BeanTransformer transformer, TransformationState state, ComponentProvider componentProvider) throws Node2BeanException, javax.jcr.RepositoryException
Node2BeanException
javax.jcr.RepositoryException
protected void setProperties(Map<String,Object> values, Node2BeanTransformer transformer, TransformationState state) throws Node2BeanException, javax.jcr.RepositoryException
Node2BeanException
javax.jcr.RepositoryException
protected Node2BeanTransformer resolveTransformer(TypeDescriptor type, Node2BeanTransformer transformer)
public boolean isForceCreation()
public void setForceCreation(boolean forceCreation)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |