Class ConfluenceWebMenuManager

java.lang.Object
com.atlassian.confluence.web.ConfluenceWebMenuManager
All Implemented Interfaces:
WebMenuManager

public class ConfluenceWebMenuManager extends Object implements WebMenuManager
Retrieves menu details from plugins via a ConfluenceWebInterfaceManager.
  • Field Details

  • Constructor Details

  • Method Details

    • getMenu

      public WebMenu getMenu(String id, String menuKey, WebInterfaceContext context)
      Description copied from interface: WebMenuManager
      Builds and returns a WebMenu for display with the given properties and context.

      WebMenuSection)s with no menu items are not included in the final menu returned.

      Specified by:
      getMenu in interface WebMenuManager
      Parameters:
      id - the id of the menu
      menuKey - the web section key of the menu being built (see DynamicWebInterfaceManager)
      context - the context in which the menu is being built in
      Returns:
      WebMenu which can be used for display
    • getMenu

      public WebMenu getMenu(String id, Collection<String> menuKeys, WebInterfaceContext context)
      Description copied from interface: WebMenuManager
      Builds and returns a WebMenu for display with the given properties and context. This method takes in a list of menu keys to allow for building a combination of menus.

      WebMenuSection)s with no menu items are not included in the final menu returned.

      Specified by:
      getMenu in interface WebMenuManager
      Parameters:
      id - the id of the menu
      menuKeys - the web section keys of the menu being built with (see DynamicWebInterfaceManager)
      context - the context in which the menu is being built in
      Returns:
      WebMenu which can be used for display
    • getSectionItems

      protected List<? extends com.atlassian.plugin.web.api.descriptors.WebItemModuleDescriptor> getSectionItems(String menuKey, String sectionKey, WebInterfaceContext context)
      Returns the items for a given section in the menu. This implementation returns all web-item plugin modules within the given menu and section that are visible according to the context.
      Returns:
      the items to display in the given section, or an empty list if there are none
    • getSections

      protected List<? extends com.atlassian.plugin.web.api.descriptors.WebSectionModuleDescriptor> getSections(String menuKey, WebInterfaceContext context)
      Returns sections to be displayed in the menu. This implementation returns all web-section plugin modules found in the menu that are visible according to the context.
      Returns:
      the sections making up the main content of the menu, or an empty list if there are no sections
    • getTrailingItems

      protected List<com.atlassian.plugin.web.api.descriptors.WebItemModuleDescriptor> getTrailingItems(String menuKey, WebInterfaceContext context)
      Returns items to be displayed at the bottom of the menu. This implementation returns an empty list.
      Returns:
      a list of items that should go at the bottom of the menu, or empty list if no trailing items
    • getLeadingItems

      protected List<? extends com.atlassian.plugin.web.api.descriptors.WebItemModuleDescriptor> getLeadingItems(String menuKey, WebInterfaceContext context)
      Returns items to be displayed at the top of the menu. This implementation returns web-item plugin modules found in the menu but not in a section that are visible according to the context.
      Returns:
      a list of items that should go at the top of the menu, or empty list if there are no leading items