com.oroad.stxx.transform
Interface Transformer

All Known Implementing Classes:
AbstractSAXTransformer, CachedFOPTransformer, CachedXFormTransformer, CachedXSLTransformer

public interface Transformer

The interface for all classes that transform the request information, including Action-created XML and http request information.

Author:
Don Brown

Field Summary
static java.lang.String PROPS_PREFIX
           
 
Method Summary
 void init(java.lang.String name, StxxProperties props, javax.servlet.ServletContext context, BuilderRules rules)
          Initializes the Transformer
 void setCache(Cache cache, long expiryTime)
          Sets the cache for the transformer
 void transform(ActionTransform trans, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Transforms the request and writes the output to response's outputstream
 

Field Detail

PROPS_PREFIX

public static final java.lang.String PROPS_PREFIX
See Also:
Constant Field Values
Method Detail

init

public void init(java.lang.String name,
                 StxxProperties props,
                 javax.servlet.ServletContext context,
                 BuilderRules rules)
Initializes the Transformer

Parameters:
name - The name of the transformer
props - The StxxProperties
context - The servlet context
rules - The rules used to build the document

setCache

public void setCache(Cache cache,
                     long expiryTime)
Sets the cache for the transformer

Parameters:
cache - The cache
expiryTime - The expiration time for objects in milliseconds

transform

public void transform(ActionTransform trans,
                      javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response)
               throws TransformerException
Transforms the request and writes the output to response's outputstream

Parameters:
trans - The value object holding transformation information
response - The response object (to set content-type, etc)
request - The request
Throws:
TransformerException - If something goes wrong