|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.content2bean.Content2BeanUtil
public class Content2BeanUtil
In case you do not have to customize the transformation, you should use one of these methods
toMap
is used to build a map from a node
toBean transforms the nodes to beans
setProperties tries to set the properties on the bean passed to the method
setNodeData set the nodedatas based on the bean you pass
Nested Class Summary | |
---|---|
static class |
Content2BeanUtil.DefaultClassTransformer
Provide a default class. |
Field Summary | |
---|---|
static Content2BeanTransformerImpl |
TO_MAP_TRANSFORMER
Transforms all nodes to a map |
Constructor Summary | |
---|---|
Content2BeanUtil()
|
Method Summary | |
---|---|
static void |
addCollectionPropertyMapping(java.lang.Class type,
java.lang.String name,
java.lang.Class mappedType)
|
static Bean2ContentProcessor |
getBean2ContentProcessor()
Get the current processor |
static Content2BeanProcessor |
getContent2BeanProcessor()
Get the current processor |
static Content2BeanTransformer |
getContent2BeanTransformer()
Get the current transformer |
static TypeMapping |
getTypeMapping()
Get the current mapping |
static void |
setNodeDatas(Content node,
java.util.Map map)
|
static void |
setNodeDatas(Content node,
java.lang.Object obj)
|
static void |
setNodeDatas(Content node,
java.lang.Object bean,
java.lang.String[] excludes)
|
static java.lang.Object |
setProperties(java.lang.Object bean,
Content node)
|
static java.lang.Object |
setProperties(java.lang.Object bean,
Content node,
boolean recursive)
|
static java.lang.Object |
setProperties(java.lang.Object bean,
Content node,
boolean recursive,
java.lang.Class defaultClass)
|
static java.lang.Object |
setProperties(java.lang.Object bean,
Content node,
boolean recursive,
Content2BeanTransformer transformer)
|
static java.lang.Object |
toBean(Content node)
|
static java.lang.Object |
toBean(Content node,
boolean recursive)
|
static java.lang.Object |
toBean(Content node,
boolean recursive,
java.lang.Class defaultClass)
|
static java.lang.Object |
toBean(Content node,
boolean recursive,
Content2BeanTransformer transformer)
|
static java.lang.Object |
toBean(Content node,
java.lang.Class defaultClass)
|
static java.util.Map |
toMap(Content node)
Transforms the nodes data into a map containting the names and values. |
static java.util.Map |
toMap(Content node,
boolean recursive)
Transforms the nodes data into a map containting the names and values. |
static java.util.Map |
toMap(Content node,
boolean recursive,
java.lang.Class defaultClass)
|
static java.util.Map |
toPureMaps(Content node,
boolean recursive)
Transforms the nodes data into a map containting the names and values. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Content2BeanTransformerImpl TO_MAP_TRANSFORMER
Constructor Detail |
---|
public Content2BeanUtil()
Method Detail |
---|
public static Content2BeanProcessor getContent2BeanProcessor()
public static Bean2ContentProcessor getBean2ContentProcessor()
public static TypeMapping getTypeMapping()
public static Content2BeanTransformer getContent2BeanTransformer()
public static java.lang.Object toBean(Content node) throws Content2BeanException
Content2BeanException
Content2BeanProcessor
public static java.lang.Object toBean(Content node, java.lang.Class defaultClass) throws Content2BeanException
Content2BeanException
Content2BeanProcessor
public static java.lang.Object toBean(Content node, boolean recursive, java.lang.Class defaultClass) throws Content2BeanException
Content2BeanException
Content2BeanProcessor
public static java.lang.Object toBean(Content node, boolean recursive) throws Content2BeanException
Content2BeanException
Content2BeanProcessor
public static java.lang.Object toBean(Content node, boolean recursive, Content2BeanTransformer transformer) throws Content2BeanException
Content2BeanException
Content2BeanProcessor
public static java.util.Map toMap(Content node) throws Content2BeanException
Content2BeanException
public static java.util.Map toMap(Content node, boolean recursive) throws Content2BeanException
Content2BeanException
public static java.util.Map toMap(Content node, boolean recursive, java.lang.Class defaultClass) throws Content2BeanException
Content2BeanException
public static java.util.Map toPureMaps(Content node, boolean recursive) throws Content2BeanException
Content2BeanException
public static java.lang.Object setProperties(java.lang.Object bean, Content node) throws Content2BeanException
Content2BeanException
Content2BeanProcessor
public static java.lang.Object setProperties(java.lang.Object bean, Content node, boolean recursive) throws Content2BeanException
Content2BeanException
Content2BeanProcessor
public static java.lang.Object setProperties(java.lang.Object bean, Content node, boolean recursive, java.lang.Class defaultClass) throws Content2BeanException
Content2BeanException
public static java.lang.Object setProperties(java.lang.Object bean, Content node, boolean recursive, Content2BeanTransformer transformer) throws Content2BeanException
Content2BeanException
Content2BeanProcessor
public static void addCollectionPropertyMapping(java.lang.Class type, java.lang.String name, java.lang.Class mappedType)
Content2BeanProcessor
public static void setNodeDatas(Content node, java.lang.Object bean, java.lang.String[] excludes) throws Content2BeanException
Content2BeanException
public static void setNodeDatas(Content node, java.lang.Object obj) throws Content2BeanException
Content2BeanException
public static void setNodeDatas(Content node, java.util.Map map) throws Content2BeanException
Content2BeanException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |