|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hippoecm.hst.util.ContentBeanUtils
public class ContentBeanUtils
Constructor Summary | |
---|---|
ContentBeanUtils()
|
Method Summary | ||
---|---|---|
static HstQuery |
createIncomingBeansQuery(HippoDocumentBean bean,
HippoBean scope,
int depth,
ObjectConverter converter,
Class<? extends HippoBean> beanMappingClass,
boolean includeSubTypes)
Returns a HstQuery for incoming beans (incoming beans within scope scope ). |
|
static HstQuery |
createIncomingBeansQuery(HippoDocumentBean bean,
HippoBean scope,
List<String> linkPaths,
ObjectConverter converter,
Class<? extends HippoBean> beanMappingClass,
boolean includeSubTypes)
Returns a HstQuery for incoming beans (incoming beans within scope scope ). |
|
static HstQuery |
createIncomingBeansQuery(HippoDocumentBean bean,
HippoBean scope,
String linkPath,
ObjectConverter converter,
Class<? extends HippoBean> beanMappingClass,
boolean includeSubTypes)
Returns a HstQuery for incoming beans (incoming beans within scope scope ). |
|
static
|
getIncomingBeans(HstQuery query,
Class<? extends HippoBean> beanMappingClass)
Returns a list of beans of type T (the same type as beanMappingClass ) that have a (facet)link to the HippoDocumentBean bean . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContentBeanUtils()
Method Detail |
---|
public static HstQuery createIncomingBeansQuery(HippoDocumentBean bean, HippoBean scope, String linkPath, ObjectConverter converter, Class<? extends HippoBean> beanMappingClass, boolean includeSubTypes) throws QueryException
scope
). You can add filters and ordering to the query before executing it
You need to add a linkPath
: this is that path, that the incoming beans use to link to the HippoDocumentBean bean
. For example, with 'myproject:link/@hippo:docbase' or even 'wildcard/@hippo:docbase' or
'wildcard/wildcard/@hippo:docbase' where wildcard = *
bean
- The HippoDocumentBean that you have, and for which you want to find the other beans that have a link to it (incoming beans)scope
- the scope (hierarchical location) to search below for 'incoming beans'linkPath
- the path where the 'incoming beans' have there link (mirror) stored, for example at myns:links/@hippo:docbaseconverter
- the ObjectConverterbeanMappingClass
- the type the 'incoming beans' should be ofincludeSubTypes
- true
when subtypes of beanMappingClass should be included in the result
bean
QueryException
public static HstQuery createIncomingBeansQuery(HippoDocumentBean bean, HippoBean scope, int depth, ObjectConverter converter, Class<? extends HippoBean> beanMappingClass, boolean includeSubTypes) throws QueryException
scope
). You can add filters and ordering to the query before executing it
You need to add a depth
: this is the maximum depth, that the incoming beans use to link to the HippoDocumentBean bean
. For example, with 'myproject:link/@hippo:docbase' is depth 1,
'myproject:somecompound/myproject:link/@hippo:docbase' is depth 2
bean
- The HippoDocumentBean that you have, and for which you want to find the other beans that have a link to it (incoming beans)scope
- the scope (hierarchical location) to search below for 'incoming beans'depth
- the depth
until which the links below the HippoDocuments you want to find can be. Maximum depth is 4, when larger, a QueryException is thrownconverter
- the ObjectConverterbeanMappingClass
- the type the 'incoming beans' should be ofincludeSubTypes
- true
when subtypes of beanMappingClass should be included in the result
bean
QueryException
- when depth
is larger than 4public static HstQuery createIncomingBeansQuery(HippoDocumentBean bean, HippoBean scope, List<String> linkPaths, ObjectConverter converter, Class<? extends HippoBean> beanMappingClass, boolean includeSubTypes) throws QueryException
scope
). You can add filters and ordering to the query before executing it
You need to add linkPaths
: these are the paths, that the incoming beans use to link to the HippoDocumentBean bean
. For example, with 'myproject:link/@hippo:docbase' or even 'wildcard/@hippo:docbase' or
'wildcard/wildcard/@hippo:docbase' where wildcard = *
bean
- The HippoDocumentBean that you have, and for which you want to find the other beans that have a link to it (incoming beans)scope
- the scope (hierarchical location) to search below for 'incoming beans'linkPaths
- the paths where the 'incoming beans' have there link (mirror) stored, for example at {myns:links/@hippo:docbase, myns:alsolinks/@hippo:docbase }converter
- the ObjectConverterbeanMappingClass
- the type the 'incoming beans' should be ofincludeSubTypes
- true
when subtypes of beanMappingClass should be included in the result
bean
QueryException
public static <T extends HippoBean> List<T> getIncomingBeans(HstQuery query, Class<? extends HippoBean> beanMappingClass) throws QueryException
beanMappingClass
) that have a (facet)link to the HippoDocumentBean bean
. If no incoming beans are found,
an empty
list will be returned.
QueryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |