|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.module.templatingkit.templates.category.TemplateCategoryUtil
public class TemplateCategoryUtil
Few util methods to use template categories.
Constructor Summary | |
---|---|
TemplateCategoryUtil()
|
Method Summary | |
---|---|
static info.magnolia.cms.core.Content |
findParentWithTemplateCategory(info.magnolia.cms.core.Content pageNode,
String templateCategory)
Deprecated. since 2.5. Use findParentWithTemplateCategory(Node, String) instead. |
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(info.magnolia.cms.core.Content pageNode)
Deprecated. since 2.5. Use getTemplateCategory(Node) instead. |
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(info.magnolia.cms.core.Content pageNode)
Deprecated. since 2.5. Use getTemplateSubCategory(Node) instead. |
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(info.magnolia.cms.core.Content pageNode,
String templateCategory)
Deprecated. since 2.5. Use hasTemplateOfCategory(Node, String) instead. |
static boolean |
hasTemplateOfCategory(javax.jcr.Node pageNode,
String templateCategory)
|
static boolean |
isContentPage(info.magnolia.cms.core.Content pageNode)
Deprecated. since 2.5. Use isContentPage(Node) instead. |
static boolean |
isContentPage(javax.jcr.Node pageNode)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TemplateCategoryUtil()
Method Detail |
---|
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 getTemplateCategory(info.magnolia.cms.core.Content pageNode)
getTemplateCategory(Node)
instead.
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 String getTemplateSubCategory(info.magnolia.cms.core.Content pageNode)
getTemplateSubCategory(Node)
instead.
public static boolean hasTemplateOfCategory(javax.jcr.Node pageNode, String templateCategory)
public static boolean hasTemplateOfCategory(info.magnolia.cms.core.Content pageNode, String templateCategory)
hasTemplateOfCategory(Node, String)
instead.
public static javax.jcr.Node findParentWithTemplateCategory(javax.jcr.Node pageNode, String templateCategory) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public static info.magnolia.cms.core.Content findParentWithTemplateCategory(info.magnolia.cms.core.Content pageNode, String templateCategory) throws javax.jcr.RepositoryException
findParentWithTemplateCategory(Node, String)
instead.
javax.jcr.RepositoryException
public static boolean isContentPage(javax.jcr.Node pageNode)
public static boolean isContentPage(info.magnolia.cms.core.Content pageNode)
isContentPage(Node)
instead.
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
searchRoot
- templateIds
- 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
public static javax.jcr.Node getNearestContentByTemplateCategorySubCategory(javax.jcr.Node siteRoot, String category, String subCategory, javax.jcr.Node current) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |