public class DefaultContentBeansTool extends Object implements ContentBeansTool
Modifier and Type | Field and Description |
---|---|
static String |
BEANS_ANNOTATED_CLASSES_CONF_PARAM |
Constructor and Description |
---|
DefaultContentBeansTool(HstQueryManagerFactory queryManagerFactory) |
Modifier and Type | Method and Description |
---|---|
ObjectBeanManager |
createObjectBeanManager(javax.jcr.Session session)
Creates a new ObjectBeanManager instance using the
ObjectConverter from ContentBeansTool.getObjectConverter() . |
HstQueryManager |
createQueryManager(javax.jcr.Session session)
Creates a new HstQueryManager instance using the
ObjectConverter from ContentBeansTool.getObjectConverter() . |
String |
getAnnotatedClassesResourcePath()
Gets the manually configured annotated classes resource path.
|
ObjectConverter |
getObjectConverter() |
void |
setAnnotatedClassesResourcePath(String annotatedClassesResourcePath)
Sets the annotated classes resource path manually.
|
void |
setObjectConverter(ObjectConverter objectConverter) |
public static final String BEANS_ANNOTATED_CLASSES_CONF_PARAM
public DefaultContentBeansTool(HstQueryManagerFactory queryManagerFactory)
public String getAnnotatedClassesResourcePath()
public void setAnnotatedClassesResourcePath(String annotatedClassesResourcePath)
annotatedClassesResourcePath
- public ObjectConverter getObjectConverter()
getObjectConverter
in interface ContentBeansTool
ObjectConverter
which is shareed across all threadspublic void setObjectConverter(ObjectConverter objectConverter)
public ObjectBeanManager createObjectBeanManager(javax.jcr.Session session)
ContentBeansTool
Creates a new ObjectBeanManager instance using the ObjectConverter
from ContentBeansTool.getObjectConverter()
.
If you have a HstRequestContext
then use
HstRequestContext.getObjectBeanManager(javax.jcr.Session)
or
HstRequestContext.getObjectBeanManager()
instead : This will include
some caching of beans automatically
createObjectBeanManager
in interface ContentBeansTool
ObjectBeanManager
instance for the Session
session
to re-use a cached one for
the current request
public HstQueryManager createQueryManager(javax.jcr.Session session) throws IllegalStateException
ContentBeansTool
Creates a new HstQueryManager instance using the ObjectConverter
from ContentBeansTool.getObjectConverter()
.
If you have a HstRequestContext
then use
HstRequestContext.getQueryManager(javax.jcr.Session)
or
HstRequestContext.getQueryManager()
instead : This will include
some caching of beans automatically
createQueryManager
in interface ContentBeansTool
HstQueryManager
for session
IllegalStateException
- if the application is unable to provide a HstQueryManagerto re-use a cached one for
the current request
Copyright © 2008–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.