com.arsdigita.bebop.page
Class BebopMapDispatcher

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

public class BebopMapDispatcher
extends MapDispatcher

Common base class for a generic URL-to-Bebop-Page dispatching pattern. This class may be used directly by applications, or it may be subclassed to be coded with a specific map or to override the map lookup for certain sets of URLs.


Nested Class Summary
 
Nested classes inherited from class com.arsdigita.dispatcher.MapDispatcher
MapDispatcher.ParseConfigHandler
 
Field Summary
static String versionId
           
 
Constructor Summary
BebopMapDispatcher()
          Creates BebopMapDispatcher with empty URL mapped to "/" and the default presentation manager.
 
Method Summary
 void addPage(String url, Page p)
          Adds a new URL-page mapping to this dispatcher.
 PresentationManager getPresentationManager()
           
protected  org.xml.sax.helpers.DefaultHandler newParseConfigHandler(MapDispatcher md)
          Expirimental Returns a new SAX event handler specific to configuring a BebopMapDispatcher.
 void setMap(Map m)
          Sets the page map for this dispatcher.
 void setNotFoundPage(Page p)
          Sets the default page to display if no page can be found on dispatch for the URL in the page map.
 void setPresentationManager(PresentationManager pm)
          Sets the presentation manager used by this dispatcher.
 
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

BebopMapDispatcher

public BebopMapDispatcher()
Creates BebopMapDispatcher with empty URL mapped to "/" and the default presentation manager. Also maps a Bebop confirmation page to the location at ConfirmPage.CONFIRM_URL.

Method Detail

setMap

public final void setMap(Map m)
Sets the page map for this dispatcher.

Overrides:
setMap in class MapDispatcher
Parameters:
m - the page map (which maps URLs to Pages)

addPage

public final void addPage(String url,
                          Page p)
Adds a new URL-page mapping to this dispatcher.

Parameters:
url - the URL to map
p - the page target

setNotFoundPage

public final void setNotFoundPage(Page p)
Sets the default page to display if no page can be found on dispatch for the URL in the page map.

Parameters:
p - the default page

setPresentationManager

public final void setPresentationManager(PresentationManager pm)
Sets the presentation manager used by this dispatcher.

Parameters:
pm - the presentation manager

getPresentationManager

public final PresentationManager getPresentationManager()

newParseConfigHandler

protected org.xml.sax.helpers.DefaultHandler newParseConfigHandler(MapDispatcher md)
Expirimental Returns a new SAX event handler specific to configuring a BebopMapDispatcher. The BMD SAX event handler traps "page-class" elements and delegates the rest to the default MapDispatcher event handler.

Overrides:
newParseConfigHandler in class MapDispatcher
Parameters:
md - the MapDispatcher to configure
Returns:
a SAX DefaultHandler object for handling SAX events.


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