Class SubMenuItem
java.lang.Object
com.novomind.ecom.api.imail.routing.frontend.menu.SubMenuItem
- All Implemented Interfaces:
com.novomind.ecom.common.api.attribute.DisplayNamed,com.novomind.ecom.common.api.attribute.Named
public final class SubMenuItem
extends Object
implements com.novomind.ecom.common.api.attribute.DisplayNamed
This class represents a sub menu item for the entry points in the Supervisor menu.
The menu can store several sub menu items with
addSubMenuItem(SubMenuItem). If so the
isOpened() option defines whether this sub menu is opened
per default or not.
The menu is generated at view scope, meaning every time the user go to another site. For this reason it is very important to cache the custom menu object as much as possible.
The xhtml files have to be in the directory META-INF/includes.
- Since:
- 10.0.34
-
Constructor Summary
ConstructorsConstructorDescriptionSubMenuItem(String name) Creates a new sub menu item with a given default display text.SubMenuItem(String name, Privilege privilege) Creates a new sub menu item with a given default display text and privilege. -
Method Summary
Modifier and TypeMethodDescriptionaddSubMenuItem(SubMenuItem subMenuItem) Adds a new sub menu item to the menu item.getName()Returns an Optional containing thePrivilegeof this SubMenuItem, or an empty OptionalReturns the sub menu items of this sub menu item.getUrl()Returns the URL of this sub menu item.booleanisOpened()Returns true if this sub menu item is opened by default, false otherwise.setOpened(boolean isOpened) Sets whether this sub menu item is opened by default.Sets the URL of this sub menu item.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.novomind.ecom.common.api.attribute.DisplayNamed
getDisplayName
-
Constructor Details
-
SubMenuItem
Creates a new sub menu item with a given default display text.- Parameters:
name- the name- Since:
- 10.0.34
-
SubMenuItem
Creates a new sub menu item with a given default display text and privilege.- Parameters:
name- the nameprivilege- thePrivilegefor thisSubMenuItem- Since:
- 11.5
-
-
Method Details
-
getUrl
Returns the URL of this sub menu item.- Returns:
- the outcome
- Since:
- 10.0.34
-
getSubMenuItems
Returns the sub menu items of this sub menu item.- Returns:
- the subMenuItems
- Since:
- 10.0.34
-
isOpened
public boolean isOpened()Returns true if this sub menu item is opened by default, false otherwise.- Returns:
- the isOpened
- Since:
- 10.0.34
-
setOpened
Sets whether this sub menu item is opened by default.- Parameters:
isOpened- the isOpened to set- Returns:
this- Since:
- 10.0.34
-
setUrl
Sets the URL of this sub menu item.- Parameters:
url- the outcome to set- Returns:
this- Since:
- 10.0.34
-
getName
- Specified by:
getNamein interfacecom.novomind.ecom.common.api.attribute.Named- Since:
- 10.0.34
-
getPrivilege
Returns an Optional containing thePrivilegeof this SubMenuItem, or an empty Optional
-