|
||||||||||
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)
|
static javax.jcr.Node |
findParentWithTemplateCategory(javax.jcr.Node pageNode,
String templateCategory)
FIXME nested method call: for work around Content . |
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> |
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)
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 |
getTemplateCategory(javax.jcr.Node pageNode)
FIXME nested method call: for work around Content . |
static String |
getTemplateSubCategory(info.magnolia.cms.core.Content 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 String |
getTemplateSubCategory(javax.jcr.Node pageNode)
FIXME nested method call: for work around Content . |
static boolean |
hasTemplateOfCategory(info.magnolia.cms.core.Content pageNode,
String templateCatergory)
|
static boolean |
hasTemplateOfCategory(javax.jcr.Node pageNode,
String templateCatergory)
FIXME nested method call: for work around Content . |
static boolean |
isContentPage(info.magnolia.cms.core.Content pageNode)
|
static boolean |
isContentPage(javax.jcr.Node pageNode)
FIXME nested method call: for work around Content . |
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)
Content
.
public static String getTemplateCategory(info.magnolia.cms.core.Content 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)
Content
.
public static String getTemplateSubCategory(info.magnolia.cms.core.Content 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 templateCatergory)
Content
.
public static boolean hasTemplateOfCategory(info.magnolia.cms.core.Content pageNode, String templateCatergory)
public static javax.jcr.Node findParentWithTemplateCategory(javax.jcr.Node pageNode, String templateCategory) throws javax.jcr.RepositoryException
Content
.
javax.jcr.RepositoryException
public static info.magnolia.cms.core.Content findParentWithTemplateCategory(info.magnolia.cms.core.Content pageNode, String templateCategory) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public static boolean isContentPage(javax.jcr.Node pageNode)
Content
.
public static boolean isContentPage(info.magnolia.cms.core.Content 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> 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 |