Package org.ametys.cms.repository
Class ContentQueryHelper
java.lang.Object
org.ametys.cms.repository.ContentQueryHelper
Helper for creating JCR XPath queries involving content predicates.
Created XPath queries are like :
Created XPath queries are like :
//element(*, ametys:content)[<content predicate>]
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getContentXPathQuery
(Expression contentExpression) Creates the XPath query corresponding to specifiedExpression
.static String
getContentXPathQuery
(Expression contentExpression, SortCriteria sortCriteria) Creates the XPath query corresponding to specifiedExpression
.static String
getWorkflowXPathQuery
(Expression workflowExpression, Expression contentExpression) Creates the XPath query joining criteria on workflow and criteria on content's metadata.
-
Method Details
-
getContentXPathQuery
Creates the XPath query corresponding to specifiedExpression
.- Parameters:
contentExpression
- the query predicates- Returns:
- the created XPath query
-
getContentXPathQuery
Creates the XPath query corresponding to specifiedExpression
.- Parameters:
contentExpression
- the query predicatessortCriteria
- criteria for sorting results- Returns:
- the created XPath query
-
getWorkflowXPathQuery
public static String getWorkflowXPathQuery(Expression workflowExpression, Expression contentExpression) Creates the XPath query joining criteria on workflow and criteria on content's metadata.- Parameters:
workflowExpression
- the workflow query predicatescontentExpression
- the content query predicates- Returns:
- the created XPath query
-