org.benow.web.menu
Interface MenuPlugin
- All Known Implementing Classes:
- RecordingMenuPlugin
public interface MenuPlugin
A dynamic producer of menu items. Can be used to generate dynamic menu items
based on application state
The MenuPlugin implementation must have a zero parameter constructor, and may be
annotated with a Descripion annotation for display.
- Author:
- andy
|
Method Summary |
java.util.List<MenuItem> |
generate(MenuItem parent,
java.lang.String requestedURI)
Produces menu items that will replace the given menu item within the
given menu. |
generate
java.util.List<MenuItem> generate(MenuItem parent,
java.lang.String requestedURI)
- Produces menu items that will replace the given menu item within the
given menu. If no items are returned, the input menu item will be removed
and it is assumed that items have manually been added to the menu.
- Parameters:
parent - the parent of the replaced menu item (the one declared with
the plugin class). in the current state, children can be added to the parent
and they will appear in the place of the plugin item
replaced with the returned items (or removed if no items returned).requestedURI - the uri that was requested that caused the menu to be generated
- Returns:
- the items to add to the menu, replacing the input item