org.infohazard.maverick.transform
Class DocumentTransformFactory

java.lang.Object
  |
  +--org.infohazard.maverick.transform.DocumentTransformFactory
All Implemented Interfaces:
TransformFactory

public class DocumentTransformFactory
extends java.lang.Object
implements TransformFactory

Factory for creating transformation pipelines based on executing successive documents which are aware of servlet attribute collections. The output of the preceeding step is stored as a String in the request attributes, available to be included anywhere in the successive document.

This factory has certain options which can be defined when declaring the factory. The defaults are shown here:

 <transform-factory type="document" provider="org.infohazard.maverick.transform.DocumentTransformFactory">
   <default-bean-name value="wrapped"/>
 </transform-factory>
 

The options for an individual transform are like this:

 <transform type="document" path="blah.jsp" bean="wrapped"/>
 


Field Summary
protected static java.lang.String ATTR_BEAN
           
protected static java.lang.String ATTR_DEFAULT_WRAPPED_NAME
          For the factory configuration
protected static java.lang.String ATTR_PATH
          For transform nodes
protected static java.lang.String DEFAULT_DEFAULT_WRAPPED_NAME
          If not specified on the factory, the default name for wrapped beans.
protected  java.lang.String defaultWrappedName
          Unless overriden on path nodes, the bean name to use for wrapping content from previous stages.
 
Constructor Summary
DocumentTransformFactory()
           
 
Method Summary
 Transform createTransform(org.jdom.Element transformNode)
          Creates a transform from the element (and any children, if appropriate).
 void init(org.jdom.Element factoryNode, javax.servlet.ServletConfig servletCfg)
          Factories will be initialized with the XML from the configuration file so that they can check for any options defined in child nodes, attributes, etc.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_DEFAULT_WRAPPED_NAME

protected static final java.lang.String DEFAULT_DEFAULT_WRAPPED_NAME
If not specified on the factory, the default name for wrapped beans.

See Also:
Constant Field Values

ATTR_DEFAULT_WRAPPED_NAME

protected static final java.lang.String ATTR_DEFAULT_WRAPPED_NAME
For the factory configuration

See Also:
Constant Field Values

ATTR_PATH

protected static final java.lang.String ATTR_PATH
For transform nodes

See Also:
Constant Field Values

ATTR_BEAN

protected static final java.lang.String ATTR_BEAN
See Also:
Constant Field Values

defaultWrappedName

protected java.lang.String defaultWrappedName
Unless overriden on path nodes, the bean name to use for wrapping content from previous stages.

Constructor Detail

DocumentTransformFactory

public DocumentTransformFactory()
Method Detail

init

public void init(org.jdom.Element factoryNode,
                 javax.servlet.ServletConfig servletCfg)
          throws ConfigException
Description copied from interface: TransformFactory
Factories will be initialized with the XML from the configuration file so that they can check for any options defined in child nodes, attributes, etc.

Specified by:
init in interface TransformFactory
ConfigException

createTransform

public Transform createTransform(org.jdom.Element transformNode)
                          throws ConfigException
Description copied from interface: TransformFactory
Creates a transform from the element (and any children, if appropriate).

Specified by:
createTransform in interface TransformFactory
ConfigException