com.atlassian.confluence.web
Class ConfluenceWebMenuManager

java.lang.Object
  extended by com.atlassian.confluence.web.ConfluenceWebMenuManager
All Implemented Interfaces:
WebMenuManager
Direct Known Subclasses:
LegacyConfluenceWebMenuManager

public class ConfluenceWebMenuManager
extends Object
implements WebMenuManager

Retrieves menu details from plugins via a ConfluenceWebInterfaceManager.


Field Summary
protected  ConfluenceWebInterfaceManager webInterfaceManager
           
 
Constructor Summary
ConfluenceWebMenuManager()
           
 
Method Summary
protected  List<com.atlassian.plugin.web.descriptors.WebItemModuleDescriptor> getLeadingItems(String menuKey, WebInterfaceContext context)
          Returns items to be displayed at the top of the menu.
 WebMenu getMenu(String id, List<String> menuKeys, WebInterfaceContext context)
          Builds and returns a WebMenu for display with the given properties and context.
 WebMenu getMenu(String id, String menuKey, WebInterfaceContext context)
          Builds and returns a WebMenu for display with the given properties and context.
protected  List<com.atlassian.plugin.web.descriptors.WebItemModuleDescriptor> getSectionItems(String menuKey, String sectionKey, WebInterfaceContext context)
          Returns the items for a given section in the menu.
protected  List<com.atlassian.plugin.web.descriptors.WebSectionModuleDescriptor> getSections(String menuKey, WebInterfaceContext context)
          Returns sections to be displayed in the menu.
protected  List<com.atlassian.plugin.web.descriptors.WebItemModuleDescriptor> getTrailingItems(String menuKey, WebInterfaceContext context)
          Returns items to be displayed at the bottom of the menu.
 void setWebInterfaceManager(ConfluenceWebInterfaceManager webInterfaceManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

webInterfaceManager

protected ConfluenceWebInterfaceManager webInterfaceManager
Constructor Detail

ConfluenceWebMenuManager

public ConfluenceWebMenuManager()
Method Detail

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 WebInterfaceManager)
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,
                       List<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 WebInterfaceManager)
context - the context in which the menu is being built in
Returns:
WebMenu which can be used for display

getSectionItems

protected List<com.atlassian.plugin.web.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<com.atlassian.plugin.web.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.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<com.atlassian.plugin.web.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

setWebInterfaceManager

public void setWebInterfaceManager(ConfluenceWebInterfaceManager webInterfaceManager)


Copyright © 2003–2015 Atlassian. All rights reserved.