public class Node2MapUtil extends Object
Constructor and Description |
---|
Node2MapUtil() |
Modifier and Type | Method and Description |
---|---|
static javax.jcr.Node |
map2node(javax.jcr.Node node,
Map<String,Object> map)
Stores the content of
map to the node . |
static Map<String,Object> |
node2map(javax.jcr.Node node)
Reads the
node properties and subnodes, and creates a
corresponding Map object, where the keys are the
property/subnode names, and values are the property values, resp. |
public static javax.jcr.Node map2node(javax.jcr.Node node, Map<String,Object> map) throws IllegalArgumentException, javax.jcr.RepositoryException
map
to the node
. The
primitive values are stored as properties and
Map<String,Object>
values are stored as a subnode. Any
other type will cause the IllegalArgumentException to be thrown. See the
PropertyUtil
for more details on how the
values are stored.IllegalArgumentException
javax.jcr.RepositoryException
public static Map<String,Object> node2map(javax.jcr.Node node) throws info.magnolia.jcr.node2bean.Node2BeanException, javax.jcr.RepositoryException
node
properties and subnodes, and creates a
corresponding Map
object, where the keys are the
property/subnode names, and values are the property values, resp.
Map<String, Object>
for subnodes. Uses
Node2BeanProcessor
to do the work.info.magnolia.jcr.node2bean.Node2BeanException
javax.jcr.RepositoryException
Copyright © 2019 Magnolia International Ltd.. All rights reserved.