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 booleanbooleancom.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStateA subset ofTrackinginformation 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 thelabelof 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.Controls whether all or any predicates must match.The list of predicates to evaluate for this menu item.Controls whether all or any scopes must match.The security scopes required to view this menu item.getUrl()The url that is visited when the menu item is clicked.inthashCode()voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.voidsetDisplayOrder(Long displayOrder) The order in which this item should be displayed relative to its siblings in the navigation tree.voidThe font class to apply to thelabelof the menu item when it is displayed.voidThe context ID of the menu item.voidThe user-visible label for this menu item.voidsetParentMenuItemId(String parentMenuItemId) The context ID of the menu item this menu item should be under.voidsetPredicateMatchType(String predicateMatchType) Controls whether all or any predicates must match.voidsetPredicates(List<NavigationPredicate> predicates) The list of predicates to evaluate for this menu item.voidsetScopeMatchType(String scopeMatchType) Controls whether all or any scopes must match.voidThe security scopes required to view this menu item.voidThe 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 thelabelof the menu item when it is displayed.This field is optional.
- Returns:
- (optional) the font class to apply to the
labelof the menu item when it is displayed - See Also:
-
getScopes
The security scopes required to view this menu item.- Since:
- Admin Navigation 3.0.0, Release Train 3.0.0
-
getScopeMatchType
Controls whether all or any scopes must match. Default is "ANY".- Since:
- Admin Navigation 3.0.0, Release Train 3.0.0
-
getPredicates
The list of predicates to evaluate for this menu item.- Since:
- Admin Navigation 3.0.0, Release Train 3.0.0
-
getPredicateMatchType
Controls whether all or any predicates must match. Default is "ALL".- Since:
- Admin Navigation 3.0.0, Release Train 3.0.0
-
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 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 thelabelof the menu item when it is displayed.This field is optional.
- Parameters:
icon- (optional) the font class to apply to thelabelof the menu item when it is displayed- See Also:
-
setScopes
The security scopes required to view this menu item.- Since:
- Admin Navigation 3.0.0, Release Train 3.0.0
-
setScopeMatchType
Controls whether all or any scopes must match. Default is "ANY".- Since:
- Admin Navigation 3.0.0, Release Train 3.0.0
-
setPredicates
The list of predicates to evaluate for this menu item.- Since:
- Admin Navigation 3.0.0, Release Train 3.0.0
-
setPredicateMatchType
Controls whether all or any predicates must match. Default is "ALL".- Since:
- Admin Navigation 3.0.0, Release Train 3.0.0
-
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
-