public class TemplateCategoryUtil extends Object
Constructor and Description |
---|
TemplateCategoryUtil() |
Modifier and Type | Method and Description |
---|---|
static javax.jcr.Node |
findParentWithTemplateCategory(javax.jcr.Node pageNode,
String templateCategory) |
static List<javax.jcr.Node> |
getContentListByTemplateCategorySubCategory(javax.jcr.Node siteRoot,
String category,
String subCategory) |
static List<javax.jcr.Node> |
getContentListByTemplateCategorySubCategory(javax.jcr.Node siteRoot,
String category,
String subCategory,
int maxResultSize,
String andClause,
String orderBy) |
static List<javax.jcr.Node> |
getContentListByTemplateName(javax.jcr.Node searchRoot,
String templateName) |
static List<javax.jcr.Node> |
getContentListByTemplateName(javax.jcr.Node searchRoot,
String templateName,
int maxResultSize,
String andClause,
String orderByClause) |
static List<javax.jcr.Node> |
getContentListByTemplateNames(javax.jcr.Node searchRoot,
Set<String> templateIds,
int maxResultSize,
String andClause,
String orderByClause)
Find content objects with one of the given templates below a given search root.
|
static javax.jcr.Node |
getNearestContentByTemplateCategorySubCategory(javax.jcr.Node siteRoot,
String category,
String subCategory,
javax.jcr.Node current) |
static String |
getTemplateCategory(javax.jcr.Node pageNode)
Returns the category of the template assigned to a node, if the assigned template is not an STK template it
default to
TemplateCategory.CONTENT and if there is no template assigned or the assigned template doesn't
exists it returns the empty string. |
static String |
getTemplateSubCategory(javax.jcr.Node pageNode)
Returns the sub-category of the template assigned to a node, if the assigned template is not an STK template it
default to
TemplateCategory.CONTENT and if there is no template assigned or the assigned template doesn't
exists it returns the empty string. |
static boolean |
hasTemplateOfCategory(javax.jcr.Node pageNode,
String templateCategory) |
static boolean |
isContentPage(javax.jcr.Node pageNode) |
public static String getTemplateCategory(javax.jcr.Node pageNode)
TemplateCategory.CONTENT
and if there is no template assigned or the assigned template doesn't
exists it returns the empty string.public static String getTemplateSubCategory(javax.jcr.Node pageNode)
TemplateCategory.CONTENT
and if there is no template assigned or the assigned template doesn't
exists it returns the empty string.public static boolean hasTemplateOfCategory(javax.jcr.Node pageNode, String templateCategory)
public static javax.jcr.Node findParentWithTemplateCategory(javax.jcr.Node pageNode, String templateCategory) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public static boolean isContentPage(javax.jcr.Node pageNode)
public static List<javax.jcr.Node> getContentListByTemplateCategorySubCategory(javax.jcr.Node siteRoot, String category, String subCategory) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public static List<javax.jcr.Node> getContentListByTemplateCategorySubCategory(javax.jcr.Node siteRoot, String category, String subCategory, int maxResultSize, String andClause, String orderBy) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public static List<javax.jcr.Node> getContentListByTemplateName(javax.jcr.Node searchRoot, String templateName) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public static List<javax.jcr.Node> getContentListByTemplateName(javax.jcr.Node searchRoot, String templateName, int maxResultSize, String andClause, String orderByClause) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public static List<javax.jcr.Node> getContentListByTemplateNames(javax.jcr.Node searchRoot, Set<String> templateIds, int maxResultSize, String andClause, String orderByClause) throws javax.jcr.RepositoryException
maxResultSize
- setting this can drastically improve query performance, if you are interested only in a fixed number of leading result objectsandClause
- an additional "AND" clause in SQL syntax, excluding the "AND" itself, e.g. "date IS NOT NULL"orderByClause
- an "ORDER BY" clause in SQL syntax, excluding the "ORDER BY" itself, e.g. "date desc" or "date asc"javax.jcr.RepositoryException
Copyright © 2008–2015 Magnolia International Ltd.. All rights reserved.