Interface MenuItem

All Superinterfaces:
org.broadleafcommerce.common.copy.MultiTenantCloneable<MenuItem>, Serializable
All Known Implementing Classes:
MenuItemImpl

public interface MenuItem extends Serializable, org.broadleafcommerce.common.copy.MultiTenantCloneable<MenuItem>
  • Method Details

    • getId

      Long getId()
      Id of this menuItem
      Returns:
    • setId

      void setId(Long id)
      Sets the id of this menuItem.
      Parameters:
      id -
    • getLabel

      String getLabel()
      Returns the label for this menu item
      Returns:
    • setLabel

      void setLabel(String label)
      Sets the value for this menu item to display on a site.
      Parameters:
      label -
    • getMenuItemType

      MenuItemType getMenuItemType()
      Returns the MenuItemType
      Returns:
    • setMenuItemType

      void setMenuItemType(MenuItemType menuItemType)
      Sets the MenuItemType
      Parameters:
      menuItemType -
    • getActionUrl

      String getActionUrl()
      Returns the URL (if applicable) that should be targeted when this menu is clicked.
      Returns:
    • setActionUrl

      void setActionUrl(String actionUrl)
      Sets the URL to go to if this menu is clicked.
      Parameters:
      actionUrl -
    • getImageUrl

      String getImageUrl()
      For items of type MenuItemType.LINK, gets an Image associated with this Menu Item
      Returns:
    • setImageUrl

      void setImageUrl(String imageUrl)
      For items of type MenuItemType.LINK, sets an Image for this Menu Item
      Parameters:
      imageUrl -
    • getParentMenu

      Menu getParentMenu()
      Returns the Menu to which this menuItem belongs
      Returns:
    • setParentMenu

      void setParentMenu(Menu menu)
      Sets the Menu to which this menuItem belongs
      Parameters:
      menu -
    • getLinkedMenu

      Menu getLinkedMenu()
      The menu represented by this MenuItem. (Allows for nested menus).
      Returns:
    • setLinkedMenu

      void setLinkedMenu(Menu menu)
      Sets the linked menu.
      Parameters:
      menu -
    • setSequence

      void setSequence(BigDecimal sequence)
      Sets the order of this MenuItem in the getParentMenu()
      Parameters:
      sequence -
    • getSequence

      BigDecimal getSequence()
      Returns the order of this MenuItem in the getParentMenu()
      Returns:
    • getAltText

      String getAltText()
      For items of type MenuItemType.LINK, gets the alt text for the associated image.
      Returns:
    • setAltText

      void setAltText(String altText)
      For items of type MenuItemType.LINK, stores the alt text for the associated image.
    • getLinkedPage

      org.broadleafcommerce.cms.page.domain.Page getLinkedPage()
      For items of type MenuItemType.PAGE, returns the associated page.
      Returns:
    • setLinkedPage

      void setLinkedPage(org.broadleafcommerce.cms.page.domain.Page linkedPage)
      For items of type MenuItemType.PAGE, sets the associated page.
    • getCustomHtml

      String getCustomHtml()
      For items of type MenuItemType.CUSTOM, returns the associated custom HTML.
      Returns:
    • setCustomHtml

      void setCustomHtml(String customHtml)
      For items of type MenuItemType.CUSTOM, sets the associated custom HTML.
    • getDerivedUrl

      String getDerivedUrl()
      Convenience method that returns an anchor URL based on the configured MenuItemType. Will return getActionUrl() unless type is MenuItemType.PAGE, MenuItemType.PRODUCT, or MenuItemType.CATEGORY and will use corresponding linked URL.
      Returns:
    • getDerivedLabel

      String getDerivedLabel()
      Convenience method that will always return the configured Label if specified. If it is not specified and of type MenuItemType.PRODUCT, or MenuItemType.CATEGORY, or MenuItemType.SUBMENU, it will return the corresponding linked name.