public interface CategoryProvider
Modifier and Type | Method and Description |
---|---|
Collection<Category> |
getAllCategories(String siteName,
String lang)
Returns all the provider's categories, recursively.
|
Collection<String> |
getAutomaticIds(String categoryId)
Get automatic property.
|
List<Category> |
getCategories(String categoryID)
Get the sub-categories of a category
|
List<Category> |
getCategories(String siteName,
String lang)
Returns the provider's root categories.
|
Category |
getCategory(String categoryID)
Returns the provider's category.
|
I18nizableText |
getDescription()
Returns the provider's description.
|
String |
getId()
Returns the provider's id.
|
I18nizableText |
getLabel()
Returns the provider's label.
|
AmetysObjectIterable<Content> |
getNewsletters(String categoryID,
String siteName,
String lang)
Get the newsletter contents linked to a category
|
String |
getRootId(String siteName,
String lang)
Get the root id
|
boolean |
hasCategory(String categoryID)
Determines if the category exists.
|
boolean |
hasChildren(String categoryID)
Determines if the category has sub-categories
|
boolean |
hasNewsletters(String categoryID,
String siteName,
String lang)
Determines if a category has categories linked with
|
boolean |
isWritable()
Determines if the categories can be modified
|
void |
setAutomatic(String categoryId,
Collection<String> automaticNewsletterIds)
Set automatic property.
|
void |
setTemplate(Category category,
String templateName)
Affect a template to category
|
boolean isWritable()
I18nizableText getLabel()
I18nizableText getDescription()
List<Category> getCategories(String siteName, String lang)
siteName
- The site name. Can be null for all siteslang
- The languages. Can be null for all languagesCollection<Category> getAllCategories(String siteName, String lang)
siteName
- The site name.lang
- The languages.Category getCategory(String categoryID)
categoryID
- The category idboolean hasCategory(String categoryID)
categoryID
- The category idboolean hasChildren(String categoryID)
categoryID
- The category idList<Category> getCategories(String categoryID)
categoryID
- The category idboolean hasNewsletters(String categoryID, String siteName, String lang)
categoryID
- The category idsiteName
- The site namelang
- The language nameAmetysObjectIterable<Content> getNewsletters(String categoryID, String siteName, String lang)
categoryID
- The category idsiteName
- The site namelang
- The language nameString getRootId(String siteName, String lang)
siteName
- The site namelang
- The language namevoid setTemplate(Category category, String templateName)
category
- The categorytemplateName
- The template nameCollection<String> getAutomaticIds(String categoryId)
categoryId
- The category id.void setAutomatic(String categoryId, Collection<String> automaticNewsletterIds)
categoryId
- The category id.automaticNewsletterIds
- The automatic newsletter IDs or empty to set non-automatic.