org.infohazard.maverick.view
Class TrivialViewFactory

java.lang.Object
  |
  +--org.infohazard.maverick.view.TrivialViewFactory
All Implemented Interfaces:
ViewFactory

public class TrivialViewFactory
extends java.lang.Object
implements ViewFactory

Creates simple views which expect the model itself to be the source of content. Controllers which use a trivial view should provide a model which is one of:

The model will be rendered to the output stream (or transform) unmolested.

Trivial views can have transforms. Neither the view elements nor the factory elements have any additional parameters.

Author:
Jeff Schnitzer

Nested Class Summary
protected static class TrivialViewFactory.TrivialView
           
 
Constructor Summary
TrivialViewFactory()
           
 
Method Summary
 View createView(org.jdom.Element viewNode)
          Creates a specific instance of the View from the XML element in the maverick configuration file.
 void init(org.jdom.Element factoryNode, javax.servlet.ServletConfig servletCfg)
          The factory will be initialized with the XML element from from the maverick configuration file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrivialViewFactory

public TrivialViewFactory()
Method Detail

init

public void init(org.jdom.Element factoryNode,
                 javax.servlet.ServletConfig servletCfg)
          throws ConfigException
Description copied from interface: ViewFactory
The factory will be initialized with the XML element from from the maverick configuration file.

Specified by:
init in interface ViewFactory
ConfigException

createView

public View createView(org.jdom.Element viewNode)
                throws ConfigException
Description copied from interface: ViewFactory
Creates a specific instance of the View from the XML element in the maverick configuration file.

Specified by:
createView in interface ViewFactory
ConfigException