Class NavMenuItem
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware
,Serializable
- Direct Known Subclasses:
NavigableNavMenuItem
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState
A subset ofTracking
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.getIcon()
The font class to apply to thelabel
of the menu item when it is displayed.getId()
The context ID of the menu item.getLabel()
The user-visible label for this menu item.The context ID of the menu item this menu item should be under.getUrl()
The url that is visited when the menu item is clicked.int
hashCode()
void
setContextState
(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTracking
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 thelabel
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.toString()
-
Constructor Details
-
NavMenuItem
public NavMenuItem()
-
-
Method Details
-
getId
The context ID of the menu item.- Returns:
- the context ID of the menu item
-
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
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
The url that is visited when the menu item is clicked.- Returns:
- the url that is visited when the menu item is clicked
-
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
The font class to apply to thelabel
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 ofTracking
information to expose the context state for this object.- Specified by:
getContextState
in interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
- Returns:
- a subset of
Tracking
information to expose the context state for this object
-
setId
The context ID of the menu item.- Parameters:
id
- the context ID of the menu item
-
setParentMenuItemId
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
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
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
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
The font class to apply to thelabel
of the menu item when it is displayed.This field is optional.
- Parameters:
icon
- (optional) the font class to apply to thelabel
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 ofTracking
information to expose the context state for this object.- Specified by:
setContextState
in interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
- Parameters:
contextState
- a subset ofTracking
information to expose the context state for this object
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-