Package com.jalios.jcms.unifiedinsert
Class MenuItem
java.lang.Object
com.jalios.jcms.unifiedinsert.MenuItem
Represented an menu item in the unified insertion interface.
- Since:
- jcms-10.0.0 - JCMS-5321
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddisable()Disable this item.voidenable()Enable this item.getIcon()Returns the icon of this this item.getId()Returns the unique ID od this item.Returns the path of the JSP for this item.Retrieve the label of this Menu item in the specified languageintgetOrder()Returns the order of this item when compared to other MenuItem instance.booleanCheck if this item is enabled or not.voidsetEnabled(boolean enabled) Set the enabled status of this item.voidSets the icon this item.voidSets the id of this itemvoidsetJspPath(String jspPath) Sets the path of JSP.voidsetOrder(int order) Sets the order of this item when compared to otherstoString()
-
Field Details
-
DEFAULT_ICON
Default icon of a Menu Item.- See Also:
-
DEFAULT_ORDER
public static final int DEFAULT_ORDERDefault order of a Menu Item.- See Also:
-
id
-
jspPath
-
icon
-
order
protected int order -
enabled
protected boolean enabled -
publicationParams
-
-
Constructor Details
-
MenuItem
Constructor by copy- Parameters:
other- a MenuItem to copy
-
MenuItem
public MenuItem(String id, String jspPath, String icon, int order, Map<String, String> publicationParams) Builds a new Menu Item from the specified parameter- Parameters:
id- a unique id for this item.jspPath- the path of the JSP for this item.icon- the icon of this itemorder- the order of this item
-
-
Method Details
-
getLabel
Retrieve the label of this Menu item in the specified language- Parameters:
lang- an ISO-639 language code- Returns:
- the MenuItem label
-
toString
-
getId
Returns the unique ID od this item.- Returns:
- a unique id
-
setId
Sets the id of this item- Parameters:
id- a unique id
-
getJspPath
Returns the path of the JSP for this item.- Returns:
- a path (relative to webapp root)
-
setJspPath
Sets the path of JSP.- Parameters:
jspPath- a path (relative to webapp root)
-
getIcon
Returns the icon of this this item.- Returns:
- the jalios icon id
-
setIcon
Sets the icon this item.- Parameters:
icon- the jalios icon id set
-
getOrder
public int getOrder()Returns the order of this item when compared to other MenuItem instance.- Returns:
- the order
-
setOrder
public void setOrder(int order) Sets the order of this item when compared to others- Parameters:
order- the order to set
-
isEnabled
public boolean isEnabled()Check if this item is enabled or not.- Returns:
- true if item is enabled, false otherwise
-
enable
public void enable()Enable this item. -
disable
public void disable()Disable this item. -
setEnabled
public void setEnabled(boolean enabled) Set the enabled status of this item.- Parameters:
enabled- true if enabled, false if disabled
-
getPublicationParams
-