org.enhydra.barracuda.contrib.dbroggisch.page
Class PageFactory

java.lang.Object
  extended byorg.enhydra.barracuda.contrib.dbroggisch.page.PageFactory

public class PageFactory
extends Object

Version:
1.0
Author:
Diez B. Roggisch

Field Summary
static String PAGE_KEY
           
static String SYNCHEE
           
 
Constructor Summary
PageFactory()
           
 
Method Summary
static void addPageEventMapping(Class event, Class page)
          Maps events to page objects.
static Page createPage(BaseEvent event)
          Creates pages for events which have been mapped to pages via addPageEventMapping(Class, Class).
static Class getPageClass(BaseEvent event)
          provides access to the Page class associated with the given event which has been mapped to the page via addPageEventMapping(Class, Class).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PAGE_KEY

public static final String PAGE_KEY

SYNCHEE

public static final String SYNCHEE
Constructor Detail

PageFactory

public PageFactory()
Method Detail

addPageEventMapping

public static void addPageEventMapping(Class event,
                                       Class page)
Maps events to page objects. The event class is expected to be assignment-compatible with a BaseEvent object and the page class assignment-compatible with a Page object. If these conditions are not met, the mapping will not take place.

Parameters:
event - a class assignment-compatible with a BaseEvent object
page - a class assignment-compatible with a Page object

createPage

public static Page createPage(BaseEvent event)
Creates pages for events which have been mapped to pages via addPageEventMapping(Class, Class). This method returns a page object only for functional events which represent an actual screen presentation. null will be returned for auxilary events which are responsible for dealing with data that is common to all or a subset of screens, such as navigation bars, footers, headers, teaserlists and so on. They never get their own page - but they expect the pages they deal with to implement a certain interface and, more so, maybe even the underlying DOM (this concept is mostly associated with XMLC) class.

Parameters:
event - the current event
Returns:
a Page object for functional events and null for auxilary events

getPageClass

public static Class getPageClass(BaseEvent event)
provides access to the Page class associated with the given event which has been mapped to the page via addPageEventMapping(Class, Class).

Returns:
a class which is assignment-compatible with a Page object


Copyright © 2003 BarracudaMVC.org All Rights Reserved.