Class AbstractCategorySettings<T extends AbstractCategorySettings<T>>

    • Field Detail

      • ORIGINAL_ROOT_CATEGORY

        public static final java.lang.String ORIGINAL_ROOT_CATEGORY
        If displayRoot == false, we must display the children categories. If there is not, it displays an empty category tree. We need to display a message with the support of the right click to add new categories, but we don't have the root category information because treecatview tag has only one attribute 'collection' which is then empty. TODO The treecatview tag should have two attributes as in JCMS 8.x: rootSet and displayRoot
        See Also:
        Constant Field Values
    • Constructor Detail

      • AbstractCategorySettings

        public AbstractCategorySettings()
    • Method Detail

      • root

        public T root​(java.lang.String[] categoryIds)
        Set the IDs of root categories.
        Parameters:
        categoryIds - Root category IDs
        Returns:
        a reference to this object - used to chain calls
      • root

        public T root​(Category[] categories)
        Set the Root categories.
        Parameters:
        categories - array of Category representing the Root categories
        Returns:
        a reference to this object - used to chain calls
        See Also:
        root(String[])
      • root

        public T root​(java.util.Collection<Category> categories)
        Set the Root categories.
        Parameters:
        categories - Collection of Category representing the Root categories
        Returns:
        a reference to this object - used to chain calls
        See Also:
        root(Category[])
      • root

        public T root​(Category category,
                      Category... otherCategories)
        Set the Root categories.
        Parameters:
        category - The first root category
        otherCategories - The other root Categories
        Returns:
        a reference to this object - used to chain calls
        See Also:
        root(String[])
      • root

        public T root​(java.lang.String categoryId,
                      java.lang.String... otherCategoryIds)
        Set the Root categories.
        Parameters:
        categoryId - The first root category ID
        otherCategoryIds - The other root Category IDs
        Returns:
        a reference to this object - used to chain calls
        See Also:
        root(String[])
      • displayRoots

        public T displayRoots​(boolean displayRoots)
        Whether the root categories are displayed or not.
        Parameters:
        displayRoots - true to display the root categories, instead false
        Returns:
        a reference to this object - used to chain calls
      • filter

        public T filter​(java.lang.String filter)
        Set the filter as String in order to filter the categories to display.
        The filter parameter accepts one of the names corresponding to the CategoryFilter enum constants.
        The filter parameter can be in lower case or upper case.
        Parameters:
        filter - the name of the CategoryFilter enum constant
        Returns:
        a reference to this object - used to chain calls
        See Also:
        CategoryFilter
      • uncheckSelectable

        public T uncheckSelectable()
        Do not check if categories are selectable. If the category is not usually selectable, it can be, in the same way as the other categories.
        Returns:
        a reference to this object - used to chain calls
      • disableLiveCreation

        public T disableLiveCreation()
        Disable the category creation proposal if it does not exist.
        Returns:
        a reference to this object - used to chain calls
      • resolveRootCategories

        public Category[] resolveRootCategories()
        Returns the categories to display according to the 'displayRoots' attribute is true or false. If 'displayRoots' is false, searches the children categories to display.
        Returns:
        array of Category objects