com.arsdigita.bebop.demo
Class AutoDispatcher

java.lang.Object
  extended bycom.arsdigita.dispatcher.MapDispatcher
      extended bycom.arsdigita.bebop.page.BebopMapDispatcher
          extended bycom.arsdigita.bebop.BebopMapDispatcher
              extended bycom.arsdigita.bebop.demo.AutoDispatcher
All Implemented Interfaces:
Dispatcher
Direct Known Subclasses:
DemoDispatcher

public class AutoDispatcher
extends BebopMapDispatcher

A dispatcher that looks for "buildPage*" methods, invokes them, and constructs an index page with links automatically.


Nested Class Summary
 
Nested classes inherited from class com.arsdigita.dispatcher.MapDispatcher
MapDispatcher.ParseConfigHandler
 
Field Summary
static String versionId
           
 
Constructor Summary
AutoDispatcher()
           
 
Method Summary
protected  void setUp()
          Set up map by reflection and index page.
 void setUp(Object child)
          The constructor Instantiates the subsite url->page mapping.
 
Methods inherited from class com.arsdigita.bebop.page.BebopMapDispatcher
addPage, getPresentationManager, newParseConfigHandler, setMap, setNotFoundPage, setPresentationManager
 
Methods inherited from class com.arsdigita.dispatcher.MapDispatcher
addPage, dispatch, getMap, preprocessRequest, readFromFile, requireTrailingSlash, setNotFoundDispatcher
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Constructor Detail

AutoDispatcher

public AutoDispatcher()
Method Detail

setUp

protected void setUp()
Set up map by reflection and index page. For use from derived classes; 'this' indicates where builPage_* are.


setUp

public void setUp(Object child)
The constructor Instantiates the subsite url->page mapping. Unlike a typical Dispatcher constrctor, this one invokes any method starting in "buildPage" in the class of the child and puts the returned page in the map. Also creates an index page with links to all pages in the map. This makes adding another page as easy as writing its build method; the rest is automated.



Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC