org.benow.web.test
Class RecordingMenuPlugin

java.lang.Object
  extended by org.benow.web.test.RecordingMenuPlugin
All Implemented Interfaces:
MenuPlugin

public class RecordingMenuPlugin
extends java.lang.Object
implements MenuPlugin


Constructor Summary
RecordingMenuPlugin()
           
 
Method Summary
 java.util.List<MenuItem> generate(MenuItem willReplace, java.lang.String requestedURI)
          Produces menu items that will replace the given menu item within the given menu.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecordingMenuPlugin

public RecordingMenuPlugin()
Method Detail

generate

public java.util.List<MenuItem> generate(MenuItem willReplace,
                                         java.lang.String requestedURI)
Description copied from interface: MenuPlugin
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.

Specified by:
generate in interface MenuPlugin
Parameters:
willReplace - 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