public interface ContentBeansTool
This interface is supposed to be provided to external application frameworks and codes.
They can normally access this component by invoking HttpServletRequest#getAttribute(ContentBeansTool.class.getName());
.
Modifier and Type | Method and Description |
---|---|
ObjectBeanManager |
createObjectBeanManager(javax.jcr.Session session)
Creates a new ObjectBeanManager instance using the
ObjectConverter from getObjectConverter() . |
HstQueryManager |
createQueryManager(javax.jcr.Session session)
Creates a new HstQueryManager instance using the
ObjectConverter from getObjectConverter() . |
ObjectConverter |
getObjectConverter() |
ObjectConverter getObjectConverter()
ObjectConverter
which is shareed across all threadsObjectBeanManager createObjectBeanManager(javax.jcr.Session session) throws IllegalStateException
Creates a new ObjectBeanManager instance using the ObjectConverter
from 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
ObjectBeanManager
instance for the Session
session
IllegalStateException
- if the application is unable to provide a ObjectBeanManagerto re-use a cached one for
the current request
HstQueryManager createQueryManager(javax.jcr.Session session) throws IllegalStateException
Creates a new HstQueryManager instance using the ObjectConverter
from 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
session
- 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.