public abstract class CategoryService extends JahiaService
Title: Category management service
Description: Category management service, allows browsing of categories as well as navigation and manipulating categories and associated objects. This service should not be used directly but rather the Category class should be used to manipulate categories and associations.
Copyright: Copyright (c) 2002
Company: Jahia Ltd
settingsBean| Constructor and Description |
|---|
CategoryService() |
| Modifier and Type | Method and Description |
|---|---|
abstract Category |
addCategory(String key,
Category parentCategory)
Add a new category under a specified category.
|
abstract void |
addObjectKeyToCategory(Category parentCategory,
ObjectKey childKey)
Associate a category with an object key
|
abstract List<Category> |
findCategoriesByPropNameAndValue(String propName,
String propValue,
JahiaUser user) |
abstract List<Category> |
getCategoriesContainingStringInTitle(String string,
String languageCode)
Retrieves the list of categories which have a title that contains a given String.
|
abstract javax.jcr.Node |
getCategoriesRoot() |
abstract List<Category> |
getCategory(String key) |
abstract Category |
getCategoryByPath(String categoryPath) |
abstract Category |
getCategoryByUUID(String categoryUUID) |
abstract List<Category> |
getCategoryChildCategories(Category parentCategory,
JahiaUser user)
Retrieves the child category keys that are associated with the given
parent category.
|
abstract List<ObjectKey> |
getCategoryChildKeys(Category parentCategory)
Retrieves the child object keys that are associated with the given
parent category.
|
abstract List<ObjectKey> |
getCategoryParentKeys(Category childCategory)
Retrieves the parent object keys that are associated with the given
child category.
|
abstract List<Category> |
getCategoryStartingByKeyPrefix(String keyPrefix)
Retrieves the list of categories which have a categoryKey that starts with a given prefix.
|
abstract List<Category> |
getCategoryStartingByTitlePrefix(String titlePrefix,
String languageCode)
Retrieves the list of categories which have a title that starts with a given prefix.
|
abstract Set<Category> |
getObjectCategories(ObjectKey objectKey)
Returns a set of categories with which this object is associated.
|
abstract Properties |
getProperties(String categoryId) |
abstract List<Category> |
getRootCategories(JahiaUser user) |
abstract String |
getTitleForCategory(Category category,
Locale locale)
Retrieves a title in a certain locale for a category.
|
abstract Map<String,String> |
getTitlesForCategory(Category category)
Retrieves all titles in all locales for a category.
|
abstract void |
removeCategory(Category category)
Removes a category and all the associations with it, including all the
title translations.
|
abstract void |
removeObjectKeyFromCategory(Category parentCategory,
ObjectKey childKey)
Remove an association between a category and an object key
|
abstract void |
removeProperties(String categoryId) |
abstract void |
removeTitleForCategory(Category category,
Locale locale)
Remove a title for a category in a given locale.
|
abstract void |
setProperties(String categoryId,
Properties properties) |
abstract void |
setTitleForCategory(Category category,
Locale locale,
String title)
Set a title for a category in a given locale.
|
getSettingsBean, setSettingsBean, start, stoppublic abstract javax.jcr.Node getCategoriesRoot()
throws JahiaException
JahiaException - thrown if there was a problem communicating with
the databasepublic abstract List<Category> getRootCategories(JahiaUser user) throws JahiaException
user - the user name executing the operationJahiaException - thrown if there was a problem communicating with
the databasepublic abstract List<Category> getCategory(String key) throws JahiaException
key - the key for the category to retrieveJahiaException - thrown if there was a problem communicating with
the databasepublic abstract Category getCategoryByUUID(String categoryUUID) throws JahiaException
categoryUUID - the identifier of the category to retrieve from the
persistent storageJahiaException - thrown if there was a problem communicating with
the databasepublic abstract Category getCategoryByPath(String categoryPath) throws JahiaException
categoryPath - the identifier of the category to retrieve from the
persistent storageJahiaException - thrown if there was a problem communicating with
the databasepublic abstract List<ObjectKey> getCategoryChildKeys(Category parentCategory) throws JahiaException
parentCategory - the category for which to retrieve the child
object key listJahiaException - thrown if there was a problem communicating with
the databasepublic abstract List<Category> getCategoryChildCategories(Category parentCategory, JahiaUser user) throws JahiaException
parentCategory - the category for which to retrieve the sub-categoriesJahiaException - thrown if there was a problem communicating with
the databasepublic abstract List<ObjectKey> getCategoryParentKeys(Category childCategory) throws JahiaException
childCategory - the category for which to retrieve the parent
object key list.JahiaException - JahiaException thrown if there was a problem
communicating with the databasepublic abstract Category addCategory(String key, Category parentCategory) throws JahiaException
newCategory - the new category to addparentCategory - the parent category which will contain as a
child the newCategory.JahiaException - thrown if there was a problem communicating with
the databasepublic abstract void removeCategory(Category category) throws JahiaException
category - the category to be removedJahiaException - thrown if there was a problem communicating with
the databasepublic abstract void addObjectKeyToCategory(Category parentCategory, ObjectKey childKey) throws JahiaException
parentCategory - the category that will be associated with the
object keychildKey - the object key that will become a "child" of the
specified category.JahiaException - thrown if there was a problem communicating with
the databasepublic abstract void removeObjectKeyFromCategory(Category parentCategory, ObjectKey childKey) throws JahiaException
parentCategory - the category currently involved in this associationchildKey - the category child object that we want to remove from
this associationJahiaException - thrown if there was a problem communicating with
the databasepublic abstract Set<Category> getObjectCategories(ObjectKey objectKey) throws JahiaException
objectKey - the object key for the object for which to retrieve the
categoriesJahiaException - thrown if there was a problem communicating with
the database.public abstract Map<String,String> getTitlesForCategory(Category category) throws JahiaException
category - the category for which to retrieve the titleJahiaException - thrown if there was a problem communicating with
the databasepublic abstract String getTitleForCategory(Category category, Locale locale) throws JahiaException
category - the category for which to retrieve the titlelocale - the locale for which to retrieve the titleJahiaException - thrown if there was a problem communicating with
the databasepublic abstract void setTitleForCategory(Category category, Locale locale, String title) throws JahiaException
category - the category for which to set the titlelocale - the locale for which to set the titletitle - the title in the given localeJahiaException - thrown if there was a problem communicating with
the databasepublic abstract void removeTitleForCategory(Category category, Locale locale) throws JahiaException
category - the category for which to remove the titlelocale - the locale in which to remove the titleJahiaException - thrown if there was a problem communicating with
the databasepublic abstract List<Category> getCategoryStartingByKeyPrefix(String keyPrefix) throws JahiaException
keyPrefix - the key prefix to search forJahiaException - thrown if there was a problem communicating with the databasepublic abstract List<Category> getCategoryStartingByTitlePrefix(String titlePrefix, String languageCode) throws JahiaException
titlePrefix - the title prefix to search forlanguageCode - the current languageJahiaException - thrown if there was a problem communicating with the databasepublic abstract List<Category> getCategoriesContainingStringInTitle(String string, String languageCode) throws JahiaException
string - the string to search forlanguageCode - the current languageJahiaException - thrown if there was a problem communicating with the databasepublic abstract List<Category> findCategoriesByPropNameAndValue(String propName, String propValue, JahiaUser user)
public abstract void removeProperties(String categoryId)
public abstract Properties getProperties(String categoryId)
public abstract void setProperties(String categoryId, Properties properties)
Copyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.