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 -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleancom.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStateA subset ofTrackinginformation to expose the context state for this object.getId()The context ID of the menu.getLabel()Optional label for the Menu to be displayed when it's rendered.getName()A unique name for the menu, used for retrieval.inthashCode()voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.voidThe context ID of the menu.voidOptional label for the Menu to be displayed when it's rendered.voidA unique name for the menu, used for retrieval.toString()
-
Constructor Details
-
Menu
public Menu()
-
-
Method Details
-
getId
The context ID of the menu.- Returns:
- the context ID of the menu
-
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
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 ofTrackinginformation to expose the context state for this object.- Specified by:
getContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Returns:
- a subset of
Trackinginformation to expose the context state for this object
-
setId
The context ID of the menu.- Parameters:
id- the context ID of the menu
-
setName
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
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 ofTrackinginformation to expose the context state for this object.- Specified by:
setContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Parameters:
contextState- a subset ofTrackinginformation to expose the context state for this object
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-