public class JCRCategoryProvider extends Object
| Constructor and Description |
|---|
JCRCategoryProvider() |
| Modifier and Type | Method and Description |
|---|---|
Category |
createCategory(String key,
Category parentCategory)
This is the method that creates a new category in the system, with all the specified attributes.
|
List<Category> |
findCategoriesByPropNameAndValue(String propName,
String propValue,
JahiaUser user)
Find category by property name and value (not supported yet, as properties are dropped and will be replaced by category references)
|
List<Category> |
findCategoriesContainingTitleString(String title,
String language)
Find categories containing term in title and language anywhere in the tree
|
List<Category> |
findCategoriesStartingByKey(String categoryKey)
Find categories by its key prefix anywhere in the tree
|
List<Category> |
findCategoriesStartingByTitle(String titlePrefix,
String language)
Find categories by its title prefix and language anywhere in the tree
|
List<Category> |
findCategoryByKey(String categoryKey)
Find categories by its key anywhere in the tree
|
javax.jcr.Node |
getCategoriesRoot()
Returns the folder node (of nt:folder type) holding all root categories
|
Category |
getCategoryByKey(String categoryKey,
Category parentCategory)
Get child category within a parent category (or null for root) by its key
|
Category |
getCategoryByPath(String categoryPath)
Get category by path
|
Category |
getCategoryByUUID(String categoryUUID)
Get category by its ID
|
List<Category> |
getCategoryChildCategories(Category parentCategory,
JahiaUser user)
Get all child categories from a parent category a user is able to see
|
Properties |
getProperties(String categoryId)
Get properties from category (not supported yet, as properties are dropped and will be replaced by category references)
|
List<Category> |
getRootCategories(JahiaUser user)
Get all root categories accessible by the given user
|
String |
getTitleForCategory(Category category,
Locale locale)
Get the category title in the specified language
|
Map<String,String> |
getTitlesForCategory(Category category)
Get the category title in all languages.
|
void |
removeCategory(CategoryBean categoryBean)
Remove the category from the repository
|
void |
removeProperties(String categoryId)
Remove properties from category (not supported yet, as properties are dropped and will be replaced by category references)
|
void |
removeTitleForCategory(Category category,
Locale locale)
Remove category title for specified language
|
void |
setProperties(String categoryId,
Properties properties)
Set properties (not supported yet, as properties are dropped and will be replaced by category references)
|
void |
setSessionFactory(JCRSessionFactory sessionFactory)
Setting the JCR store service (done via Spring)
|
void |
setTitleForCategory(Category category,
Locale locale,
String title)
Set category title in specified language
|
public void setSessionFactory(JCRSessionFactory sessionFactory)
sessionFactory - public javax.jcr.Node getCategoriesRoot()
public List<Category> getRootCategories(JahiaUser user)
user - accessing the repositorypublic Category createCategory(String key, Category parentCategory) throws JahiaException
key - of category to be createdparentCategory - JahiaExceptionpublic Category getCategoryByUUID(String categoryUUID)
categoryUUID - public Category getCategoryByPath(String categoryPath)
categoryPath - public Category getCategoryByKey(String categoryKey, Category parentCategory)
categoryKey - parentCategory - public List<Category> findCategoryByKey(String categoryKey)
categoryKey - public List<Category> findCategoriesStartingByKey(String categoryKey)
categoryKey - public List<Category> findCategoriesStartingByTitle(String titlePrefix, String language)
titlePrefix - language - public List<Category> findCategoriesContainingTitleString(String title, String language)
title - language - public Map<String,String> getTitlesForCategory(Category category) throws JahiaException
category - JahiaExceptionpublic String getTitleForCategory(Category category, Locale locale) throws JahiaException
category - locale - JahiaExceptionpublic void setTitleForCategory(Category category, Locale locale, String title) throws JahiaException
category - locale - title - JahiaExceptionpublic void removeTitleForCategory(Category category, Locale locale) throws JahiaException
category - locale - JahiaExceptionpublic void removeCategory(CategoryBean categoryBean) throws JahiaException
categoryBean - JahiaExceptionpublic List<Category> findCategoriesByPropNameAndValue(String propName, String propValue, JahiaUser user)
propName - propValue - user - public void removeProperties(String categoryId)
categoryId - public Properties getProperties(String categoryId)
categoryId - public void setProperties(String categoryId, Properties properties)
categoryId - properties - public List<Category> getCategoryChildCategories(Category parentCategory, JahiaUser user) throws JahiaException
parentCategory - user - JahiaExceptionCopyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.