Class WebMenu


  • public class WebMenu
    extends Object
    Represents a menu in the Confluence web interface. The menu has an ID for styling purposes and a list of sections. Each section is a WebMenuSection.
    • Constructor Detail

      • WebMenu

        public WebMenu​(String id)
    • Method Detail

      • getId

        public String getId()
        Returns:
        the ID of this menu, primarily designed for styling in the web interface
      • addSection

        public void addSection​(String sectionName,
                               String label,
                               String ariaLabel,
                               List<? extends com.atlassian.plugin.web.descriptors.WebItemModuleDescriptor> items)
        Adds a section to the menu with the given name and list of items. If the item list is empty, no section is added to the menu.
        Parameters:
        sectionName - the name of the section, used for ID and class name generation
        label - the i18n label for the section
        ariaLabel - the i18n aria-label for the menu
        items - the list of items in the menu section
      • getSections

        public List<WebMenuSection> getSections()
        Returns:
        the list of sections in this menu