Interface CategoryProvider
- All Known Implementing Classes:
JCRCategoryProvider
,SitemapCategoryProvider
public interface CategoryProvider
This interface represents a category provider.
-
Method Summary
Modifier and TypeMethodDescriptiongetAllCategories
(String siteName, String lang) Returns all the provider's categories, recursively.getAutomaticIds
(String categoryId) Get automatic property.getCategories
(String categoryID) Get the sub-categories of a categorygetCategories
(String siteName, String lang) Returns the provider's root categories.getCategory
(String categoryID) Returns the provider's category.Returns the provider's description.getId()
Returns the provider's id.getLabel()
Returns the provider's label.getNewsletters
(String categoryID, String siteName, String lang) Get the newsletter contents linked to a categoryGet the root idboolean
hasCategory
(String categoryID) Determines if the category exists.boolean
hasChildren
(String categoryID) Determines if the category has sub-categoriesboolean
hasNewsletters
(String categoryID, String siteName, String lang) Determines if a category has categories linked withboolean
Determines if the categories can be modifiedvoid
setAutomatic
(String categoryId, Collection<String> automaticNewsletterIds) Set automatic property.void
setTemplate
(Category category, String templateName) Affect a template to category
-
Method Details
-
isWritable
boolean isWritable()Determines if the categories can be modified- Returns:
- true if the categories can be modified
-
getId
Returns the provider's id.- Returns:
- the provider's id.
-
getLabel
Returns the provider's label.- Returns:
- the provider's label.
-
getDescription
Returns the provider's description.- Returns:
- the provider's description.
-
getCategories
Returns the provider's root categories.- Parameters:
siteName
- The site name. Can be null for all siteslang
- The languages. Can be null for all languages- Returns:
- the provider's root categories.
-
getAllCategories
Returns all the provider's categories, recursively.- Parameters:
siteName
- The site name.lang
- The languages.- Returns:
- all the provider's categories.
-
getCategory
Returns the provider's category.- Parameters:
categoryID
- The category id- Returns:
- the provider's category.
-
hasCategory
Determines if the category exists.- Parameters:
categoryID
- The category id- Returns:
- true if the category exists.
-
hasChildren
Determines if the category has sub-categories- Parameters:
categoryID
- The category id- Returns:
- true if the category have sub-categories
-
getCategories
Get the sub-categories of a category- Parameters:
categoryID
- The category id- Returns:
- the sub-categories
-
hasNewsletters
Determines if a category has categories linked with- Parameters:
categoryID
- The category idsiteName
- The site namelang
- The language name- Returns:
- if a category has categories linked with
-
getNewsletters
Get the newsletter contents linked to a category- Parameters:
categoryID
- The category idsiteName
- The site namelang
- The language name- Returns:
- the newsletter contents
-
getRootId
Get the root id- Parameters:
siteName
- The site namelang
- The language name- Returns:
- the root id
-
setTemplate
Affect a template to category- Parameters:
category
- The categorytemplateName
- The template name
-
getAutomaticIds
Get automatic property.- Parameters:
categoryId
- The category id.- Returns:
- the list of automatic newsletter IDs.
-
setAutomatic
Set automatic property.- Parameters:
categoryId
- The category id.automaticNewsletterIds
- The automatic newsletter IDs or empty to set non-automatic.
-