@Singleton public class Node2BeanProcessorImpl extends Object implements Node2BeanProcessor
Constructor and Description |
---|
Node2BeanProcessorImpl(TypeMapping typeMapping,
Node2BeanTransformer transformer) |
Modifier and Type | Method and Description |
---|---|
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.
|
@Inject public Node2BeanProcessorImpl(TypeMapping typeMapping, Node2BeanTransformer transformer)
public Object toBean(javax.jcr.Node node) throws Node2BeanException, javax.jcr.RepositoryException
Node2BeanProcessor
toBean
in interface Node2BeanProcessor
node
- which will be transformed to beanNode2BeanException
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 typeNode2BeanException
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 wellNode2BeanException
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)
Copyright © 2003–2015 Magnolia International Ltd.. All rights reserved.