|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.bebop.page.PageTransformer
A class for managing and obtaining a Stylesheet based on the current request's location in the site map. First, we try to find a stylesheet specific to this site node. If we can't find one, then we walk up the site map until we find a parent of this site node that has a stylesheet associated with it. If we haven't found one by the time we reach the root, then we'll do the same tree walk except we'll look for the stylesheet associated with the package mounted on each site node.
Field Summary | |
static String |
CACHE_DISABLE
State flag for disabling HTTP header caching. |
static String |
CACHE_NONE
State flag for preventing caching in every case. |
static String |
CACHE_USER
State flag for per-user caching. |
static String |
CACHE_WORLD
State flag for enabling caching in every case. |
static String |
CACHE_XSL_NONE
This is used to indicate that all xsl templates used should be pulled from the disk and not from the cache. |
static String |
FANCY_ERRORS
This is used to indicate that the "fancy errors" should be used and that the errors should be placed in the request for later use. |
static String |
versionId
|
Constructor Summary | |
PageTransformer()
|
Method Summary | |
static void |
addXSLParameters(javax.xml.transform.Transformer transformer,
javax.servlet.http.HttpServletRequest request)
This takes in a transformer and adds all of the registered xsl paraemters. |
static Collection |
getXSLParameterNames()
This is a Collection of all names of XSL Parameters that have been registered |
static String |
getXSLParameterValue(String name,
javax.servlet.http.HttpServletRequest request)
This takes a name and request and returns the value that should be used in the XSL for the given name |
static void |
registerXSLParameterGenerator(String parameterName,
XSLParameterGenerator parameterGenerator)
This adds a generator to the list of parameters available to XSLStylesheets. |
static void |
removeXSLParameterGenerator(String parameterName)
This removes the parameter from the list of parameters that will be added to stylesheets |
void |
servePage(Document doc,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Uses servePage(Document, HttpServletRequest,
HttpServletResponse, Map) to implement the
PresentationManager interface. |
void |
servePage(Document doc,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
Map params)
Serves an XML Document, getting and applying the appropriate XSLT. |
static void |
setDefaultCachePolicy(String policy)
Sets the default cache behavior for the site. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String versionId
public static final String CACHE_XSL_NONE
public static final String FANCY_ERRORS
public static final String CACHE_NONE
public static final String CACHE_USER
public static final String CACHE_WORLD
public static final String CACHE_DISABLE
Constructor Detail |
public PageTransformer()
Method Detail |
public static void setDefaultCachePolicy(String policy)
policy
- a String
policy, one of CACHE_NONE
, CACHE_DISABLE
, CACHE_USER
,
CACHE_WORLD
public void servePage(Document doc, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
servePage(Document, HttpServletRequest,
HttpServletResponse, Map)
to implement the
PresentationManager
interface.
servePage
in interface PresentationManager
doc
- the XML document whose content is to be displayed
to the outputreq
- the servlet requestresp
- the servlet responsepublic void servePage(Document doc, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, Map params)
req.getContextPath()
.
doc
- the Bebop page to servereq
- the servlet requestresp
- the servlet responseparams
- a set of name-value pairs to pass as parameters
to the Transformerpublic static void registerXSLParameterGenerator(String parameterName, XSLParameterGenerator parameterGenerator)
public static void removeXSLParameterGenerator(String parameterName)
public static Collection getXSLParameterNames()
public static String getXSLParameterValue(String name, javax.servlet.http.HttpServletRequest request)
public static void addXSLParameters(javax.xml.transform.Transformer transformer, javax.servlet.http.HttpServletRequest request)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |