com.fruitioninc.jwc
Class AbstractApplication

java.lang.Object
  |
  +--com.fruitioninc.jwc.AbstractApplication
All Implemented Interfaces:
Application

public abstract class AbstractApplication
extends java.lang.Object
implements Application

Partial implementation of the Application interface.


Field Summary
static char NAME_DELIMITER
           
 
Constructor Summary
AbstractApplication()
           
AbstractApplication(java.lang.String visiblePageName)
           
 
Method Summary
protected  void addPage(Page page)
           
 Component getComponent(java.lang.String pathName)
          Returns a component given a path name.
 Page getPage(java.lang.String name)
          Returns a web page with a given name.
 java.util.Iterator getPages()
          Returns an iteration of the pages in this application.
 Page getVisiblePage()
          Returns the currently visible page.
protected abstract  void loadPages()
          Called at construction time to add all pages into the application.
 void setVisiblePage(Page page)
          Sets the currently visible page.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME_DELIMITER

public static final char NAME_DELIMITER
See Also:
Constant Field Values
Constructor Detail

AbstractApplication

public AbstractApplication()

AbstractApplication

public AbstractApplication(java.lang.String visiblePageName)
Method Detail

loadPages

protected abstract void loadPages()
Called at construction time to add all pages into the application.


getPage

public Page getPage(java.lang.String name)
Description copied from interface: Application
Returns a web page with a given name.

Specified by:
getPage in interface Application
Returns:
the page that name identifies or null if no such page exists

getComponent

public Component getComponent(java.lang.String pathName)
Description copied from interface: Application
Returns a component given a path name. A path name is a name within a hierarchical namespace that identifies one component in an application. The actual form of the path name is determined by the instance of RequestParameterNameMarshaller being used.

Specified by:
getComponent in interface Application
Returns:
the component that pathName identifies or null if no such component exists
See Also:
RequestParameterNameMarshaller

getPages

public java.util.Iterator getPages()
Returns an iteration of the pages in this application. Each value is an instance of Page.

Specified by:
getPages in interface Application
Returns:
an iteration of Page objects.

addPage

protected void addPage(Page page)

getVisiblePage

public Page getVisiblePage()
Description copied from interface: Application
Returns the currently visible page.

Specified by:
getVisiblePage in interface Application
Returns:
the currently visible page.

setVisiblePage

public void setVisiblePage(Page page)
Description copied from interface: Application
Sets the currently visible page.

Specified by:
setVisiblePage in interface Application