info.magnolia.jcr.node2bean
Interface Node2BeanProcessor

All Known Implementing Classes:
Node2BeanProcessorImpl

public interface Node2BeanProcessor

Transforms nodes to beans or maps. The transformer is use to resolve classes or to instantiate beans.


Method Summary
 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.
 Object toBean(javax.jcr.Node node, Class<?> defaultClass)
          Transforms given node to bean.
 

Method Detail

toBean

Object toBean(javax.jcr.Node node)
              throws Node2BeanException,
                     javax.jcr.RepositoryException
Transforms given node to bean.

Parameters:
node - which will be transformed to bean
Returns:
bean object
Throws:
Node2BeanException
javax.jcr.RepositoryException

toBean

Object toBean(javax.jcr.Node node,
              Class<?> defaultClass)
              throws Node2BeanException,
                     javax.jcr.RepositoryException
Transforms given node to bean. Class parameter will be used in transformer as default type.

Parameters:
node - which will be transformed to bean
defaultClass - default type
Returns:
bean object
Throws:
Node2BeanException
javax.jcr.RepositoryException

toBean

Object toBean(javax.jcr.Node node,
              boolean recursive,
              Node2BeanTransformer transformer,
              ComponentProvider componentProvider)
              throws Node2BeanException,
                     javax.jcr.RepositoryException
Transforms the node to a bean using the passed transformer and component provider.

Parameters:
node - which will be transformed to bean
recursive - if set to true then all subnodes will be transformed as well
Returns:
bean object
Throws:
Node2BeanException
javax.jcr.RepositoryException

setProperties

Object setProperties(Object bean,
                     javax.jcr.Node node,
                     boolean recursive,
                     Node2BeanTransformer transformer,
                     ComponentProvider componentProvider)
                     throws Node2BeanException,
                            javax.jcr.RepositoryException
Similar to toBean() but uses a passed bean as the root bean.

Throws:
Node2BeanException
javax.jcr.RepositoryException


Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.