Class MenuNode

java.lang.Object
com.axelor.meta.service.menu.MenuNode

public class MenuNode extends Object
  • Constructor Details

  • Method Details

    • getChildren

      public List<MenuNode> getChildren()
    • addChild

      public void addChild(MetaMenu data)
    • getMetaMenu

      public MetaMenu getMetaMenu()
    • isRoot

      public boolean isRoot()
    • isLeaf

      public boolean isLeaf()
    • traverse

      public void traverse(MenuNodeVisitor visitor)
    • buildTree

      public static MenuNode buildTree(List<MetaMenu> metaMenus)
      Build N-ary Tree from list of meta menus
      Parameters:
      metaMenus - list of meta menus
      Returns:
      N-ary Tree
    • searchNode

      public MenuNode searchNode(MetaMenu target)
      Search for a node with the given MetaMenu. It searches in the current node, in all children, their children's children and so on
      Parameters:
      target - the meta menu to search
      Returns:
      the found node