Package com.atlassian.confluence.web
Class ConfluenceWebMenuManager
java.lang.Object
com.atlassian.confluence.web.ConfluenceWebMenuManager
- All Implemented Interfaces:
WebMenuManager
Retrieves menu details from plugins via a
ConfluenceWebInterfaceManager
.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected 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.getMenu
(String id, String menuKey, WebInterfaceContext context) Builds and returns aWebMenu
for display with the given properties and context.getMenu
(String id, Collection<String> menuKeys, WebInterfaceContext context) Builds and returns aWebMenu
for display with the given properties and context.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.protected List<? extends com.atlassian.plugin.web.api.descriptors.WebSectionModuleDescriptor>
getSections
(String menuKey, WebInterfaceContext context) Returns sections to be displayed in the menu.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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlassian.confluence.web.WebMenuManager
getMenu
-
Field Details
-
webInterfaceManager
-
-
Constructor Details
-
ConfluenceWebMenuManager
-
-
Method Details
-
getMenu
Description copied from interface:WebMenuManager
Builds and returns aWebMenu
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 interfaceWebMenuManager
- Parameters:
id
- the id of the menumenuKey
- the web section key of the menu being built (seeDynamicWebInterfaceManager
)context
- the context in which the menu is being built in- Returns:
WebMenu
which can be used for display
-
getMenu
Description copied from interface:WebMenuManager
Builds and returns aWebMenu
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 interfaceWebMenuManager
- Parameters:
id
- the id of the menumenuKeys
- the web section keys of the menu being built with (seeDynamicWebInterfaceManager
)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
-