Package org.opencms.ui.apps
Class CmsAppCategoryNode
java.lang.Object
org.opencms.ui.apps.CmsAppCategoryNode
- All Implemented Interfaces:
I_CmsHasOrder
Tree node representing an app category.
Contains a list of child nodes and a list of apps, which are the leaves of the tree. Note that the list of children is not initialized after construction, it has to be filled manually.
-
Constructor Summary
ConstructorDescriptionCmsAppCategoryNode
(I_CmsAppCategory appCategory) Creates a new category node for the given category. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds an app configuration.void
addChild
(CmsAppCategoryNode node) Adds a child node.Gets the app configurations for this category.Gets the app category data for this node.Gets the child nodes of this node.int
getOrder()
Gets an integer used to sort items.void
Recursively removes subtrees containing no app configurations.void
sort()
Sorts the child nodes *and* the apps of this node by their order.void
Recursively calls sort on all descendants of this node.
-
Constructor Details
-
CmsAppCategoryNode
Creates a new category node for the given category.- Parameters:
appCategory
- the category data
-
-
Method Details
-
addAppConfiguration
Adds an app configuration.- Parameters:
appConfig
- the app configuration to add
-
addChild
Adds a child node.- Parameters:
node
- the child node
-
getAppConfigurations
Gets the app configurations for this category.- Returns:
- the app configurations
-
getCategory
Gets the app category data for this node.- Returns:
- the app category data
-
getChildren
Gets the child nodes of this node.- Returns:
- the child nodes
-
getOrder
Description copied from interface:I_CmsHasOrder
Gets an integer used to sort items.- Specified by:
getOrder
in interfaceI_CmsHasOrder
- Returns:
- the integer used as a sort key
- See Also:
-
removeApplessSubtrees
Recursively removes subtrees containing no app configurations. -
sort
Sorts the child nodes *and* the apps of this node by their order. -
sortRecursively
Recursively calls sort on all descendants of this node.
-