com.atlassian.confluence.web
Class WebMenu
java.lang.Object
com.atlassian.confluence.web.WebMenu
public class WebMenu
- extends java.lang.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 Summary |
WebMenu(java.lang.String id)
|
Method Summary |
void |
addSection(java.lang.String sectionName,
java.lang.String label,
java.util.List<? extends com.atlassian.plugin.web.descriptors.WebItemModuleDescriptor> items)
Adds a section to the menu with the given name and list of items. |
java.lang.String |
getId()
|
java.util.List<WebMenuSection> |
getSections()
|
boolean |
isEmpty()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
WebMenu
public WebMenu(java.lang.String id)
getId
public java.lang.String getId()
- Returns:
- the ID of this menu, primarily designed for styling in the web interface
addSection
public void addSection(java.lang.String sectionName,
java.lang.String label,
java.util.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 generationlabel
- the i18n label for the sectionitems
- the list of items in the menu section
isEmpty
public boolean isEmpty()
- Returns:
- true if the menu has no sections, otherwise false. Note that
addSection(String, String, List)
does
not allow the addition of empty sections.
getSections
public java.util.List<WebMenuSection> getSections()
- Returns:
- the list of sections in this menu
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2003-2014 Atlassian. All Rights Reserved.