Package org.opencms.ui.apps
Class CmsAppHierarchyBuilder
java.lang.Object
org.opencms.ui.apps.CmsAppHierarchyBuilder
Helper class for building a tree of categories/apps which should be displayed from the list of available apps and categories.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Adds an app configuration to the node belonging to its parent category id.void
Adds an app configuration.void
addCategory
(I_CmsAppCategory category) Adds an app category.protected void
Adds a category node to the category node belonging to its parent id.Builds the tree of categories and apps.Gets the root node.
-
Constructor Details
-
CmsAppHierarchyBuilder
public CmsAppHierarchyBuilder()
-
-
Method Details
-
addAppConfiguration
Adds an app configuration.- Parameters:
appConfig
- the app configuration to add
-
addCategory
Adds an app category.- Parameters:
category
- the app category to add
-
buildHierarchy
Builds the tree of categories and apps.This tree will only include those categories which are reachable by following the parent chain of an available app configuration up to the root category (null).
- Returns:
- the root node of the tree
-
getRootNode
Gets the root node.- Returns:
- the root node
-
addAppConfigToCategory
Adds an app configuration to the node belonging to its parent category id.- Parameters:
appConfig
- the app configuration to add to its parent node
-
addNodeToItsParent
Adds a category node to the category node belonging to its parent id.- Parameters:
node
- the node which should be attached to its parent
-