Class Menu

java.lang.Object
com.broadleafcommerce.menu.domain.Menu
All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware, Serializable
Direct Known Subclasses:
NavigableMenu

public class Menu extends Object implements Serializable, com.broadleafcommerce.data.tracking.core.ContextStateAware
A domain representing a Menu.

Menus themselves are simply a top-level grouping mechanism for MenuItems, which are the listed elements of the menu that can themselves contain additional MenuItems for a nested structure.

For example, a menu structure could look like this:

  • HEAT_CLINIC_MAIN_HEADER_MENU (menu)
    • Home (menu item)
    • Merchandise (menu item)
      • Mens (menu item)
      • Womens (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 context ID of the menu.
    Optional label for the Menu to be displayed when it's rendered.
    A unique name for the menu, used for retrieval.
    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
    The context ID of the menu.
    void
    Optional label for the Menu to be displayed when it's rendered.
    void
    A unique name for the menu, used for retrieval.
     

    Methods inherited from class java.lang.Object

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

    • Menu

      public Menu()
  • Method Details

    • getId

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

      public String getName()
      A unique name for the menu, used for retrieval. This field is not displayed anywhere.
      Returns:
      a unique name for the menu, used for retrieval
    • getLabel

      public String getLabel()
      Optional label for the Menu to be displayed when it's rendered.
      Returns:
      Label for the Menu to be displayed when it's rendered.
    • 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.
      Parameters:
      id - the context ID of the menu
    • setName

      public void setName(String name)
      A unique name for the menu, used for retrieval. This field is not displayed anywhere.
      Parameters:
      name - a unique name for the menu, used for retrieval
    • setLabel

      public void setLabel(String label)
      Optional label for the Menu to be displayed when it's rendered.
      Parameters:
      label - Label for the Menu to be displayed when it's rendered.
    • 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