Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.infohazard.maverick.transform
Class XSLTransform  view XSLTransform download XSLTransform.java

java.lang.Object
  extended byorg.infohazard.maverick.transform.XSLTransform
All Implemented Interfaces:
org.infohazard.maverick.flow.Transform

class XSLTransform
extends java.lang.Object
implements org.infohazard.maverick.flow.Transform

This Transform runs the input through a series of XSLT transformations.

Version:
$Revision: 1.20 $ $Date: 2004/06/07 20:38:11 $

Nested Class Summary
protected  class XSLTransform.Step
          Step.
 
Field Summary
static int CACHE_DISABLED
          Enumeration for the caching options
static int CACHE_LAZY
          Enumeration for the caching options
static int CACHE_PRELOAD
          Enumeration for the caching options
protected  int cachingStyle
          The caching style to use
protected  javax.xml.transform.Templates compiled
          Cached compiled templates
protected  java.lang.String finalContentType
          The content-type to set if this is the last transform and it completes normally.
protected  boolean isMonitoredFile
          If template file is monitored
private static org.apache.commons.logging.Log log
          Logger.
protected  java.io.File monitoredFile
          Monitored template File
protected  long monitoredFileLastModified
          Monitored template File last modified time
protected  java.lang.String path
          Path to the template
protected static java.lang.String UNFINISHED_CONTENTTYPE
          Mime type used if we stop before last transform.
protected  javax.xml.transform.URIResolver uriResolver
          If not null, set this as the uri resolver for xslt transformations
 
Constructor Summary
XSLTransform(java.lang.String path, boolean isMonitored, int templateCachingStyle, javax.servlet.ServletContext webAppContext, java.lang.String finishedContentType, javax.xml.transform.URIResolver uriRes)
          Expects that you will call addTemplate() to add the individual transformations.
 
Method Summary
 org.infohazard.maverick.flow.TransformStep createStep(org.infohazard.maverick.flow.TransformContext tctx)
          Create a step for servicing a single transformation.
protected  javax.xml.transform.Templates loadTemplate(java.lang.String path, javax.servlet.ServletContext servletCtx)
           
protected  void populateParams(javax.xml.transform.Transformer t, java.util.Map params)
          Set parameters on a transformer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CACHE_PRELOAD

public static final int CACHE_PRELOAD
Enumeration for the caching options

See Also:
Constant Field Values

CACHE_LAZY

public static final int CACHE_LAZY
Enumeration for the caching options

See Also:
Constant Field Values

CACHE_DISABLED

public static final int CACHE_DISABLED
Enumeration for the caching options

See Also:
Constant Field Values

log

private static org.apache.commons.logging.Log log
Logger.


UNFINISHED_CONTENTTYPE

protected static final java.lang.String UNFINISHED_CONTENTTYPE
Mime type used if we stop before last transform.

See Also:
Constant Field Values

path

protected java.lang.String path
Path to the template


isMonitoredFile

protected boolean isMonitoredFile
If template file is monitored


monitoredFile

protected java.io.File monitoredFile
Monitored template File


monitoredFileLastModified

protected long monitoredFileLastModified
Monitored template File last modified time


compiled

protected javax.xml.transform.Templates compiled
Cached compiled templates


finalContentType

protected java.lang.String finalContentType
The content-type to set if this is the last transform and it completes normally.


uriResolver

protected javax.xml.transform.URIResolver uriResolver
If not null, set this as the uri resolver for xslt transformations


cachingStyle

protected int cachingStyle
The caching style to use

Constructor Detail

XSLTransform

public XSLTransform(java.lang.String path,
                    boolean isMonitored,
                    int templateCachingStyle,
                    javax.servlet.ServletContext webAppContext,
                    java.lang.String finishedContentType,
                    javax.xml.transform.URIResolver uriRes)
             throws org.infohazard.maverick.flow.ConfigException
Expects that you will call addTemplate() to add the individual transformations.

Method Detail

createStep

public org.infohazard.maverick.flow.TransformStep createStep(org.infohazard.maverick.flow.TransformContext tctx)
                                                      throws javax.servlet.ServletException
Description copied from interface: org.infohazard.maverick.flow.Transform
Create a step for servicing a single transformation.

Specified by:
createStep in interface org.infohazard.maverick.flow.Transform

loadTemplate

protected javax.xml.transform.Templates loadTemplate(java.lang.String path,
                                                     javax.servlet.ServletContext servletCtx)
                                              throws org.infohazard.maverick.flow.ConfigException

populateParams

protected void populateParams(javax.xml.transform.Transformer t,
                              java.util.Map params)
Set parameters on a transformer