public class BeanUtils extends Object
Constructor and Description |
---|
BeanUtils() |
Modifier and Type | Method and Description |
---|---|
static javax.jcr.Session |
getDisposablePoolSession(HstRequestContext requestContext,
String sessionIdentifier)
Deprecated.
|
static javax.jcr.Session |
getDisposablePoolSession(HstRequest hstRequest,
String sessionIdentifier)
Deprecated.
|
static javax.jcr.Session |
getDisposableSession(HstRequestContext requestContext,
String sessionIdentifier)
This method tries to get a
Session from a disposable pool which is identified by
disposablePoolIdentifier or a Session from a security delegate
If sessionIdentifier is empty or null an HstComponentException will be thrown. |
static javax.jcr.Session |
getDisposableSession(HstRequest hstRequest,
String sessionIdentifier) |
static <T extends HippoBean> |
getFacetedNavigationResultDocument(HstRequest hstRequest,
HstQuery query,
ObjectConverter objectConverter,
Class<T> beanMappingClass)
Tries to return a bean that is located in a faceted navigation tree below a result set.
|
static <T extends HippoBean> |
getFacetedNavigationResultDocument(HstRequest hstRequest,
HstQuery query,
String relPath,
ObjectConverter objectConverter,
Class<T> beanMappingClass)
Tries to return a bean that is located in a faceted navigation tree below a result set.
|
static <T extends HippoBean> |
getFacetedNavigationResultDocument(HstRequest hstRequest,
String query,
ObjectConverter objectConverter,
Class<T> beanMappingClass)
Tries to return a bean that is located in a faceted navigation tree below a result set.
|
static <T extends HippoBean> |
getFacetedNavigationResultDocument(HstRequest hstRequest,
String query,
String relPath,
ObjectConverter objectConverter,
Class<T> beanMappingClass)
Tries to return a bean that is located in a faceted navigation tree below a result set.
|
static HippoFacetNavigationBean |
getFacetNavigationBean(HstRequest hstRequest,
HstQuery query,
ObjectConverter objectConverter)
Same as
getFacetNavigationBean(HstRequest, String, ObjectConverter) only now instead of a String query we
pass in a HstQuery |
static HippoFacetNavigationBean |
getFacetNavigationBean(HstRequest hstRequest,
HstQuery query,
String relPath,
ObjectConverter objectConverter)
Same as
getFacetNavigationBean(HstRequest, HstQuery, ObjectConverter) only now instead of having the faceted navigation
node from the ResolvedSiteMapItem we add a relPath where it should be found |
static HippoFacetNavigationBean |
getFacetNavigationBean(HstRequest hstRequest,
String query,
ObjectConverter objectConverter)
Returns the
HippoFacetNavigationBean for this HstRequest from the ResolvedSiteMapItem where it is accounted for the free text query . |
static HippoFacetNavigationBean |
getFacetNavigationBean(HstRequest hstRequest,
String relPath,
String query,
ObjectConverter objectConverter)
Returns the
HippoFacetNavigationBean for this HstRequest and relPath where it is accounted for the free text query . |
static javax.jcr.Session |
getPreviewCmsQuerySession(HstRequestContext requestContext,
String sessionIdentifier) |
public static HippoFacetNavigationBean getFacetNavigationBean(HstRequest hstRequest, String relPath, String query, ObjectConverter objectConverter) throws HstComponentException
Returns the HippoFacetNavigationBean
for this HstRequest
and relPath
where it is accounted for the free text query
. When query
is null
or
empty, we return the HippoFacetNavigationBean without free text search. Else, we try to return the HippoFacetNavigationBean with free text search. If the
HippoFacetNavigationBean does not exist in the faceted navigation tree in combination with the free text search, we return null
.
Note we can only return the HippoFacetNavigationBean if the current ResolvedSiteMapItem
has a ResolvedSiteMapItem.getRelativeContentPath()
that
points to points to a HippoFacetNavigationBean
or to some lower descendant HippoBean
, for example to a HippoResultSetBean
. In this latter case,
we traverse up until we find a HippoFacetNavigationBean
, and return that one.
The relPath
is relative to the site content base path and must not start with a /
HstComponentException
hstRequest
- the hstRequestrelPath
- the relative path to the faceted navigation node, which must not start with a / and is relative to the site content base pathquery
- the free text query that should be accounted for for this facNavBean
objectConverter
- the objectConverter to be usedHippoFacetNavigationBean
accounted for this query
and null
if we could not find the HippoFacetNavigationBean when the query
is appliedHstComponentException
public static HippoFacetNavigationBean getFacetNavigationBean(HstRequest hstRequest, String query, ObjectConverter objectConverter) throws HstComponentException
Returns the HippoFacetNavigationBean
for this HstRequest
from the ResolvedSiteMapItem
where it is accounted for the free text query
. When query
is null
or
empty, we return the HippoFacetNavigationBean without free text search. Else, we try to return the HippoFacetNavigationBean with free text search. If the
HippoFacetNavigationBean does not exist in the faceted navigation tree in combination with the free text search, we return null
.
Note we can only return the HippoFacetNavigationBean if the current ResolvedSiteMapItem
has a ResolvedSiteMapItem.getRelativeContentPath()
that
points to points to a HippoFacetNavigationBean
or to some lower descendant HippoBean
, for example to a HippoResultSetBean
. In this latter case,
we traverse up until we find a HippoFacetNavigationBean
, and return that one.
If you need a HippoFacetNavigationBean
that is not on for the ResolvedSiteMapItem
, but at some fixed location,
you can use getFacetNavigationBean(HstRequest, String, String, ObjectConverter)
HstComponentException
hstRequest
- the hstRequestquery
- the free text query that should be accounted for for this facNavBean
objectConverter
- the objectConverter to be usedHippoFacetNavigationBean
accounted for this query
and null
if we could not find the HippoFacetNavigationBean when the query
is appliedHstComponentException
public static HippoFacetNavigationBean getFacetNavigationBean(HstRequest hstRequest, HstQuery query, ObjectConverter objectConverter) throws HstComponentException
getFacetNavigationBean(HstRequest, String, ObjectConverter)
only now instead of a String
query we
pass in a HstQuery
hstRequest
- the hstRequestquery
- a HstQuery
object. If null
the call returns as if there is no queryobjectConverter
- the objectConverter to be usedHippoFacetNavigationBean
accounted for this query
and null
if we could not find the HippoFacetNavigationBean when the query
is appliedHstComponentException
#getFacetNavigationBean(HstRequest, String, ObjectConverter)}
public static HippoFacetNavigationBean getFacetNavigationBean(HstRequest hstRequest, HstQuery query, String relPath, ObjectConverter objectConverter) throws HstComponentException
getFacetNavigationBean(HstRequest, HstQuery, ObjectConverter)
only now instead of having the faceted navigation
node from the ResolvedSiteMapItem
we add a relPath
where it should be foundhstRequest
- the hstRequestquery
- a HstQuery
objectrelPath
- the relative path from site base content to the faceted navigation node, which must not start with a / and is relative to the site content base pathobjectConverter
- the objectConverter to be usedHippoFacetNavigationBean
accounted for this query
and relPath
and null
if we could not find the HippoFacetNavigationBean when the query
is appliedHstComponentException
#getFacetNavigationBean(HstRequest, String, ObjectConverter)}
public static <T extends HippoBean> T getFacetedNavigationResultDocument(HstRequest hstRequest, String query, ObjectConverter objectConverter, Class<T> beanMappingClass)
beanMappingClass
, null
will be returned.T
- hstRequest
- the hstRequestquery
- the free text search as String that is used for this faceted navigationobjectConverter
- beanMappingClass
- the class T must be ofnull
if it cannot be found or is not of type T
public static <T extends HippoBean> T getFacetedNavigationResultDocument(HstRequest hstRequest, String query, String relPath, ObjectConverter objectConverter, Class<T> beanMappingClass)
beanMappingClass
, null
will be returned.T
- hstRequest
- the hstRequestquery
- the free text search as String that is used for this faceted navigation. The query should already
have been processed by SearchInputParsingUtils.parse(String, boolean)
if necessary.relPath
- the relative path from site base content to the faceted navigation node, which must not start with a / and is relative to the site content base pathobjectConverter
- beanMappingClass
- the class T must be ofnull
if it cannot be found or is not of type T
public static <T extends HippoBean> T getFacetedNavigationResultDocument(HstRequest hstRequest, HstQuery query, ObjectConverter objectConverter, Class<T> beanMappingClass)
beanMappingClass
, null
will be returned.T
- hstRequest
- the hstRequestquery
- the free text search as HstQuery
that is used for this faceted navigationobjectConverter
- beanMappingClass
- the class T must be ofnull
if it cannot be found or is not of type T
public static <T extends HippoBean> T getFacetedNavigationResultDocument(HstRequest hstRequest, HstQuery query, String relPath, ObjectConverter objectConverter, Class<T> beanMappingClass)
beanMappingClass
, null
will be returned.T
- hstRequest
- the hstRequestquery
- the free text search as HstQuery
that is used for this faceted navigationrelPath
- the relative path from site base content to the faceted navigation node, which must not start with a / and is relative to the site content base pathobjectConverter
- beanMappingClass
- the class T must be ofnull
if it cannot be found or is not of type T
public static javax.jcr.Session getDisposableSession(HstRequestContext requestContext, String sessionIdentifier) throws HstComponentException
Session
from a disposable pool which is identified by
disposablePoolIdentifier
or a Session
from a security delegate
If sessionIdentifier
is empty or null
an HstComponentException will be thrown.
If it is not possible to return a Session
for the sessionIdentifier
, for example
because there is configured a MultipleRepositoryImpl instead of LazyMultipleRepositoryImpl, also a HstComponentException
will be thrown.requestContext
- the hstRequest for this HstComponentsessionIdentifier
- the identifier for this disposable pool / session. It is not allowed to be empty or
null
Session
from a disposable poolHstComponentException
@Deprecated public static javax.jcr.Session getDisposablePoolSession(HstRequestContext requestContext, String sessionIdentifier) throws HstComponentException
getDisposableSession(org.hippoecm.hst.core.request.HstRequestContext, String)
insteadHstComponentException
public static javax.jcr.Session getPreviewCmsQuerySession(HstRequestContext requestContext, String sessionIdentifier) throws HstComponentException
HstComponentException
public static javax.jcr.Session getDisposableSession(HstRequest hstRequest, String sessionIdentifier) throws HstComponentException
hstRequest
- the current HstRequest
sessionIdentifier
- the identifier for this disposable pool session or for the session security delegate.
It is not allowed to be empty or null
Session
HstComponentException
#getDisposablePoolSession(org.hippoecm.hst.core.request.HstRequestContext, String)}
@Deprecated public static javax.jcr.Session getDisposablePoolSession(HstRequest hstRequest, String sessionIdentifier) throws HstComponentException
getDisposableSession(org.hippoecm.hst.core.component.HstRequest, String)
insteadHstComponentException
Copyright © 2008-2013 Hippo B.V. (http://www.onehippo.com). All Rights Reserved.