Package com.jalios.jcms.unifiedinsert
Class MenuItem
- java.lang.Object
-
- com.jalios.jcms.unifiedinsert.MenuItem
-
public class MenuItem extends java.lang.ObjectRepresented an menu item in the unified insertion interface.- Since:
- jcms-10.0.0 - JCMS-5321
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_ICONDefault icon of a Menu Item.static intDEFAULT_ORDERDefault order of a Menu Item.protected booleanenabledprotected java.lang.Stringiconprotected java.lang.Stringidprotected java.lang.StringjspPathprotected intorder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddisable()Disable this item.voidenable()Enable this item.java.lang.StringgetIcon()Returns the icon of this this item.java.lang.StringgetId()Returns the unique ID od this item.java.lang.StringgetJspPath()Returns the path of the JSP for this item.java.lang.StringgetLabel(java.lang.String lang)Retrieve the label of this Menu item in the specified languageintgetOrder()Returns the order of this item when compared to other MenuItem instance.booleanisEnabled()Check if this item is enabled or not.voidsetEnabled(boolean enabled)Set the enabled status of this item.voidsetIcon(java.lang.String icon)Sets the icon this item.voidsetId(java.lang.String id)Sets the id of this itemvoidsetJspPath(java.lang.String jspPath)Sets the path of JSP.voidsetOrder(int order)Sets the order of this item when compared to othersjava.lang.StringtoString()
-
-
-
Field Detail
-
DEFAULT_ICON
public static final java.lang.String DEFAULT_ICON
Default icon of a Menu Item.- See Also:
- Constant Field Values
-
DEFAULT_ORDER
public static final int DEFAULT_ORDER
Default order of a Menu Item.- See Also:
- Constant Field Values
-
id
protected java.lang.String id
-
jspPath
protected java.lang.String jspPath
-
icon
protected java.lang.String icon
-
order
protected int order
-
enabled
protected boolean enabled
-
-
Constructor Detail
-
MenuItem
public MenuItem(MenuItem other)
Constructor by copy- Parameters:
other- a MenuItem to copy
-
MenuItem
public MenuItem(java.lang.String id, java.lang.String jspPath, java.lang.String icon, int order)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 Detail
-
getLabel
public java.lang.String getLabel(java.lang.String lang)
Retrieve the label of this Menu item in the specified language- Parameters:
lang- an ISO-639 language code- Returns:
- the MenuItem label
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getId
public java.lang.String getId()
Returns the unique ID od this item.- Returns:
- a unique id
-
setId
public void setId(java.lang.String id)
Sets the id of this item- Parameters:
id- a unique id
-
getJspPath
public java.lang.String getJspPath()
Returns the path of the JSP for this item.- Returns:
- a path (relative to webapp root)
-
setJspPath
public void setJspPath(java.lang.String jspPath)
Sets the path of JSP.- Parameters:
jspPath- a path (relative to webapp root)
-
getIcon
public java.lang.String getIcon()
Returns the icon of this this item.- Returns:
- the jalios icon id
-
setIcon
public void setIcon(java.lang.String icon)
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
-
-