Package org.ametys.cms.repository
Class ContentQueryHelper
- java.lang.Object
-
- org.ametys.cms.repository.ContentQueryHelper
-
public final class ContentQueryHelper extends Object
Helper for creating JCR XPath queries involving content predicates.
Created XPath queries are like ://element(*, ametys:content)[<content predicate>]
-
-
Constructor Summary
Constructors Modifier Constructor Description private
ContentQueryHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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.
-
-
-
Constructor Detail
-
ContentQueryHelper
private ContentQueryHelper()
-
-
Method Detail
-
getContentXPathQuery
public static String getContentXPathQuery(Expression contentExpression)
Creates the XPath query corresponding to specifiedExpression
.- Parameters:
contentExpression
- the query predicates- Returns:
- the created XPath query
-
getContentXPathQuery
public static String getContentXPathQuery(Expression contentExpression, SortCriteria sortCriteria)
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
-
-