Class CmsAppHierarchyBuilder

java.lang.Object
org.opencms.ui.apps.CmsAppHierarchyBuilder

public class CmsAppHierarchyBuilder extends Object
Helper class for building a tree of categories/apps which should be displayed from the list of available apps and categories.

  • Constructor Details

  • Method Details

    • addAppConfiguration

      Adds an app configuration.

      Parameters:
      appConfig - the app configuration to add
    • addCategory

      public void addCategory(I_CmsAppCategory category)
      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

      protected void addNodeToItsParent(CmsAppCategoryNode node)
      Adds a category node to the category node belonging to its parent id.

      Parameters:
      node - the node which should be attached to its parent