public class ObjectConverterImpl extends Object implements ObjectConverter
Modifier and Type | Field and Description |
---|---|
protected String[] |
fallBackJcrNodeTypes |
protected Map<Class<? extends HippoBean>,String> |
jcrBeanPrimaryNodeTypePairs |
protected Map<String,Class<? extends HippoBean>> |
jcrPrimaryNodeTypeBeanPairs |
Constructor and Description |
---|
ObjectConverterImpl(Map<String,Class<? extends HippoBean>> jcrPrimaryNodeTypeBeanPairs,
String[] fallBackJcrNodeTypes) |
Modifier and Type | Method and Description |
---|---|
Class<? extends HippoBean> |
getAnnotatedClassFor(String jcrPrimaryNodeType) |
Object |
getObject(javax.jcr.Node node) |
Object |
getObject(javax.jcr.Node node,
String relPath) |
Object |
getObject(javax.jcr.Session session,
String path) |
Object |
getObject(String uuid,
javax.jcr.Node node) |
Object |
getObject(String uuid,
javax.jcr.Session session) |
String |
getPrimaryNodeTypeNameFor(Class<? extends HippoBean> hippoBean) |
String |
getPrimaryObjectType(javax.jcr.Node node)
Returns the Primary Node Type for a Node (or a child Node if the Node is a Handle) to be used for Object conversion,
possibly using a fallback Node Type if no exact match can be determined.
|
protected Map<String,Class<? extends HippoBean>> jcrPrimaryNodeTypeBeanPairs
protected Map<Class<? extends HippoBean>,String> jcrBeanPrimaryNodeTypePairs
protected String[] fallBackJcrNodeTypes
public Object getObject(javax.jcr.Session session, String path) throws ObjectBeanManagerException
getObject
in interface ObjectConverter
ObjectBeanManagerException
public Object getObject(javax.jcr.Node node, String relPath) throws ObjectBeanManagerException
getObject
in interface ObjectConverter
ObjectBeanManagerException
public Object getObject(String uuid, javax.jcr.Session session) throws ObjectBeanManagerException
getObject
in interface ObjectConverter
ObjectBeanManagerException
public Object getObject(String uuid, javax.jcr.Node node) throws ObjectBeanManagerException
getObject
in interface ObjectConverter
ObjectBeanManagerException
public Object getObject(javax.jcr.Node node) throws ObjectBeanManagerException
getObject
in interface ObjectConverter
ObjectBeanManagerException
public String getPrimaryObjectType(javax.jcr.Node node) throws ObjectBeanManagerException
ObjectConverter
getPrimaryObjectType
in interface ObjectConverter
node
- to determine the Primary Object Type forObjectBeanManagerException
public Class<? extends HippoBean> getAnnotatedClassFor(String jcrPrimaryNodeType)
getAnnotatedClassFor
in interface ObjectConverter
Class
for this jcrPrimaryNodeType or null
if no annotated class can be foundpublic String getPrimaryNodeTypeNameFor(Class<? extends HippoBean> hippoBean)
getPrimaryNodeTypeNameFor
in interface ObjectConverter
Copyright © 2008–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.