Class MenuItem

java.lang.Object
com.jalios.jcms.unifiedinsert.MenuItem

public class MenuItem extends Object
Represented an menu item in the unified insertion interface.
Since:
jcms-10.0.0 - JCMS-5321
  • Field Details

    • DEFAULT_ICON

      public static final String DEFAULT_ICON
      Default icon of a Menu Item.
      See Also:
    • DEFAULT_ORDER

      public static final int DEFAULT_ORDER
      Default order of a Menu Item.
      See Also:
    • id

      protected String id
    • jspPath

      protected String jspPath
    • icon

      protected String icon
    • order

      protected int order
    • enabled

      protected boolean enabled
    • publicationParams

      protected Map<String,String> publicationParams
  • Constructor Details

    • MenuItem

      public MenuItem(MenuItem other)
      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 item
      order - the order of this item
  • Method Details

    • getLabel

      public String getLabel(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 String toString()
      Overrides:
      toString in class Object
    • getId

      public String getId()
      Returns the unique ID od this item.
      Returns:
      a unique id
    • setId

      public void setId(String id)
      Sets the id of this item
      Parameters:
      id - a unique id
    • getJspPath

      public String getJspPath()
      Returns the path of the JSP for this item.
      Returns:
      a path (relative to webapp root)
    • setJspPath

      public void setJspPath(String jspPath)
      Sets the path of JSP.
      Parameters:
      jspPath - a path (relative to webapp root)
    • getIcon

      public String getIcon()
      Returns the icon of this this item.
      Returns:
      the jalios icon id
    • setIcon

      public void setIcon(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
    • getPublicationParams

      public Map<String,String> getPublicationParams()