java.lang.Object
com.broadleafcommerce.adminnavigation.domain.NavMenuItem
All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware, Serializable
Direct Known Subclasses:
NavigableNavMenuItem

public class NavMenuItem extends Object implements Serializable, com.broadleafcommerce.data.tracking.core.ContextStateAware
A domain representing a listed item in the admin menu's tree.

Its position in the menu's hierarchy is entirely determined by the menu item which is specified as its parent.

For example, a menu structure could look like this:

  • Application Management (menu item)
  • Catalog Management (menu item)
    • Category Management (menu item)
    • Product Management (menu item)
  • ...
Author:
Samarth Dhruva (samarthd)
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
     
    boolean
     
    com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState
    A subset of Tracking information to expose the context state for this object.
    The order in which this item should be displayed relative to its siblings in the navigation tree.
    The font class to apply to the label of the menu item when it is displayed.
    The context ID of the menu item.
    The user-visible label for this menu item.
    The context ID of the menu item this menu item should be under.
    The url that is visited when the menu item is clicked.
    int
     
    void
    setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
    A subset of Tracking information to expose the context state for this object.
    void
    setDisplayOrder(Long displayOrder)
    The order in which this item should be displayed relative to its siblings in the navigation tree.
    void
    The font class to apply to the label of the menu item when it is displayed.
    void
    The context ID of the menu item.
    void
    The user-visible label for this menu item.
    void
    setParentMenuItemId(String parentMenuItemId)
    The context ID of the menu item this menu item should be under.
    void
    The url that is visited when the menu item is clicked.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • NavMenuItem

      public NavMenuItem()
  • Method Details

    • getId

      public String getId()
      The context ID of the menu item.
      Returns:
      the context ID of the menu item
    • getParentMenuItemId

      public String getParentMenuItemId()
      The context ID of the menu item this menu item should be under.

      This is optional, as menu items don't have to be under another menu item. If this value is not set, this menu item will be a top level menu-item.

      If this value is set, then this menu item will appear directly under the specified menu item, however deep that parent menu item is in the overall navigation tree.

      Returns:
      (optional) the context ID of the menu item this item should appear under
    • getLabel

      public String getLabel()
      The user-visible label for this menu item.

      This can be a key into a message bundle for internationalization.

      Returns:
      the user-visible label for this menu item
      See Also:
    • getUrl

      public String getUrl()
      The url that is visited when the menu item is clicked.
      Returns:
      the url that is visited when the menu item is clicked
    • getDisplayOrder

      public Long getDisplayOrder()
      The order in which this item should be displayed relative to its siblings in the navigation tree.
      Returns:
      the order in which this item should be displayed relative to its siblings
    • getIcon

      public String getIcon()
      The font class to apply to the label of the menu item when it is displayed.

      This field is optional.

      Returns:
      (optional) the font class to apply to the label of the menu item when it is displayed
      See Also:
    • getContextState

      public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()
      A subset of Tracking information to expose the context state for this object.
      Specified by:
      getContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
      Returns:
      a subset of Tracking information to expose the context state for this object
    • setId

      public void setId(String id)
      The context ID of the menu item.
      Parameters:
      id - the context ID of the menu item
    • setParentMenuItemId

      public void setParentMenuItemId(String parentMenuItemId)
      The context ID of the menu item this menu item should be under.

      This is optional, as menu items don't have to be under another menu item. If this value is not set, this menu item will be a top level menu-item.

      If this value is set, then this menu item will appear directly under the specified menu item, however deep that parent menu item is in the overall navigation tree.

      Parameters:
      parentMenuItemId - (optional) the context ID of the menu item this item should appear under
    • setLabel

      public void setLabel(String label)
      The user-visible label for this menu item.

      This can be a key into a message bundle for internationalization.

      Parameters:
      label - the user-visible label for this menu item
      See Also:
    • setUrl

      public void setUrl(String url)
      The url that is visited when the menu item is clicked.
      Parameters:
      url - the url that is visited when the menu item is clicked
    • setDisplayOrder

      public void setDisplayOrder(Long displayOrder)
      The order in which this item should be displayed relative to its siblings in the navigation tree.
      Parameters:
      displayOrder - the order in which this item should be displayed relative to its siblings
    • setIcon

      public void setIcon(String icon)
      The font class to apply to the label of the menu item when it is displayed.

      This field is optional.

      Parameters:
      icon - (optional) the font class to apply to the label of the menu item when it is displayed
      See Also:
    • setContextState

      public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
      A subset of Tracking information to expose the context state for this object.
      Specified by:
      setContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
      Parameters:
      contextState - a subset of Tracking information to expose the context state for this object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object