Interface CategoryProvider

All Known Implementing Classes:
JCRCategoryProvider, SitemapCategoryProvider

public interface CategoryProvider
This interface represents a category provider.
  • 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 sites
      lang - 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

      boolean hasCategory(String categoryID)
      Determines if the category exists.
      Parameters:
      categoryID - The category id
      Returns:
      true if the category exists.
    • hasChildren

      boolean hasChildren(String categoryID)
      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

      boolean hasNewsletters(String categoryID, String siteName, String lang)
      Determines if a category has categories linked with
      Parameters:
      categoryID - The category id
      siteName - The site name
      lang - The language name
      Returns:
      if a category has categories linked with
    • getNewsletters

      Get the newsletter contents linked to a category
      Parameters:
      categoryID - The category id
      siteName - The site name
      lang - The language name
      Returns:
      the newsletter contents
    • getRootId

      String getRootId(String siteName, String lang)
      Get the root id
      Parameters:
      siteName - The site name
      lang - The language name
      Returns:
      the root id
    • setTemplate

      void setTemplate(Category category, String templateName)
      Affect a template to category
      Parameters:
      category - The category
      templateName - The template name
    • getAutomaticIds

      Get automatic property.
      Parameters:
      categoryId - The category id.
      Returns:
      the list of automatic newsletter IDs.
    • setAutomatic

      void setAutomatic(String categoryId, Collection<String> automaticNewsletterIds)
      Set automatic property.
      Parameters:
      categoryId - The category id.
      automaticNewsletterIds - The automatic newsletter IDs or empty to set non-automatic.