org.hippoecm.hst.content.beans.manager
Interface ObjectConverter

All Known Implementing Classes:
ObjectConverterImpl

public interface ObjectConverter

Convert any kind of beans into JCR nodes & properties.

This interface mimics Jackrabbit's one, but this is provided to support more lightweight beans in HST.

Version:
$Id: ObjectConverter.java 24258 2010-10-08 13:48:47Z adouma $

Method Summary
 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.
 

Method Detail

getPrimaryObjectType

String getPrimaryObjectType(javax.jcr.Node node)
                            throws ObjectBeanManagerException
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.

Parameters:
node - to determine the Primary Object Type for
Returns:
Primary Object Type to be used for Object conversion
Throws:
ObjectBeanManagerException

getObject

Object getObject(javax.jcr.Session session,
                 String path)
                 throws ObjectBeanManagerException
Throws:
ObjectBeanManagerException

getObject

Object getObject(javax.jcr.Node node)
                 throws ObjectBeanManagerException
Throws:
ObjectBeanManagerException

getObject

Object getObject(javax.jcr.Node node,
                 String relPath)
                 throws ObjectBeanManagerException
Throws:
ObjectBeanManagerException

getObject

Object getObject(String uuid,
                 javax.jcr.Session session)
                 throws ObjectBeanManagerException
Throws:
ObjectBeanManagerException

getObject

Object getObject(String uuid,
                 javax.jcr.Node node)
                 throws ObjectBeanManagerException
Throws:
ObjectBeanManagerException

getAnnotatedClassFor

Class<? extends HippoBean> getAnnotatedClassFor(String jcrPrimaryNodeType)
Parameters:
jcrPrimaryNodeType -
Returns:
the annotated Class for this jcrPrimaryNodeType or null if no annotated class can be found

getPrimaryNodeTypeNameFor

String getPrimaryNodeTypeNameFor(Class<? extends HippoBean> hippoBean)


Copyright © 2008-2012 Hippo. All Rights Reserved.