Interface MenuItem

All Known Subinterfaces:
ActionMenuItem, EntityExplorerMenuItem, FlowMenuItem, RootMenuItem
All Known Implementing Classes:
AbstractMenuItem, ActionMenuItemImpl, DefaultMenuItem, DefaultRootMenuItem, EntityExplorerMenuItemImpl, FlowMenuItemImpl

public interface MenuItem
A menu item. Must be extended and contributed by other modules. I don't know what kind of items exist. Please use AbstractMenuItemReader when adding a new menu item.
  • Method Details

    • getChildren

      List<MenuItem> getChildren()
      Get the item's children
      Returns:
      the item's children
    • appendChildren

      void appendChildren(Collection<MenuItem> children)
      Appends the item's children to the passed list
      Parameters:
      children - the list where you want to add the item's children
    • getType

      Class<? extends MenuItem> getType()
      Returns the interface-type of the item
      Returns:
      the type
    • setPosition

      void setPosition(int position)
      Set's the position of the item within one hirarchy
      Parameters:
      position - the position
    • getPosition

      int getPosition()
      Returns the position of the item within one hirarchy
      Returns:
      the position
    • getParent

      MenuItem getParent()
      Get the item's parent
      Returns:
      parent item or null when no parent
    • setParent

      void setParent(MenuItem item)
      Set parent item
      Parameters:
      item - the item
    • getName

      String getName()
      Every item must have a name
      Returns:
      the name
    • setName

      void setName(String name)
      Set the name
      Parameters:
      name - the name of the item
    • getLabel

      @Nullable @Nullable DisplayValue getLabel()
      Get label
      Returns:
      the label
    • setMenuType

      void setMenuType(String menuType)
      Menu type is in fact the tag-name of the menu
      Parameters:
      menuType - menu type
    • setLabel

      void setLabel(DisplayValue label)
      Set label
      Parameters:
      label - the label
    • setChildren

      void setChildren(List<MenuItem> children)
      Set children
      Parameters:
      children - the children
    • getMenuType

      String getMenuType()
      Get the menu type
      Returns:
      the menu type
    • getProperties

      Map<Object,Object> getProperties(boolean useExtIcon)
      Get the item's properties (for json serialization)
      Parameters:
      useExtIcon - if true the ext icon is used (else the react icon)
      Returns:
      the properties
    • writeProperties

      void writeProperties(Map<Object,Object> map)
      Add the item's properties to the given map.
      Parameters:
      map - the map where you want to add the item's properties
    • getExtIcon

      @Nullable @Nullable String getExtIcon()
      An item *can* have an icon. Otherwise null is returned
      Returns:
      the icon string
    • setExtIcon

      void setExtIcon(@Nullable @Nullable String extIcon)
      Set the icon string
      Parameters:
      extIcon - the icon string
    • getReactIcon

      @Nullable @Nullable String getReactIcon()
      An item *can* have an icon. Otherwise null is returned
      Returns:
      the icon string
    • setReactIcon

      void setReactIcon(@Nullable @Nullable String reactIcon)
      Set the icon string
      Parameters:
      reactIcon - the icon string
    • findChildByName

      @Nullable @Nullable MenuItem findChildByName(String name)
    • getPath

      String getPath()
    • setOldClientDisabled

      void setOldClientDisabled(boolean disabled)
      Set if menu item is disabled in the old client
      Parameters:
      disabled - boolean
    • isOldClientDisabled

      boolean isOldClientDisabled()
    • setNewClientDisabled

      void setNewClientDisabled(boolean disabled)
      Set if menu item is disabled in the new client
      Parameters:
      disabled - boolean
    • isNewClientDisabled

      boolean isNewClientDisabled()