com.arsdigita.sitenode
Class BasePresentationManager

java.lang.Object
  extended bycom.arsdigita.sitenode.BasePresentationManager
All Implemented Interfaces:
PresentationManager

Deprecated. Use SimplePresentationManager instead.

public class BasePresentationManager
extends Object
implements PresentationManager

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.

Version:
$Id: //core-platform/dev/src/com/arsdigita/sitenode/BasePresentationManager.java#36 $
Author:
Bill Schneider

Field Summary
static String CACHE_DISABLE
          Deprecated.  
static String CACHE_NONE
          Deprecated.  
static String CACHE_USER
          Deprecated.  
static String CACHE_WORLD
          Deprecated.  
static String versionId
          Deprecated.  
 
Constructor Summary
BasePresentationManager()
          Deprecated.  
 
Method Summary
protected  Stylesheet findStylesheet(SiteNode sn, Locale l, String outputType)
          Deprecated. Returns a Stylesheet for the current request context, searching the current site node, all of its parent site nodes, and the default stylesheets for the packages mounted on this site node and the parent site nodes.
protected  Stylesheet findStylesheet(SiteNodeRequestContext rctx)
          Deprecated. Returns a Stylesheet for the current request context, searching the current site node, all of its parent site nodes, and the default stylesheets for the packages mounted on this site node and the parent site nodes.
static PresentationManager getInstance()
          Deprecated.  
protected static PrintWriter getPrintWriter(javax.servlet.http.HttpServletResponse resp, String charset)
          Deprecated. Use this instead of getWriter for servlet engines that are slighlty broken.
 void servePage(Document doc, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
          Deprecated. 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)
          Deprecated. Serves an XML Document, getting and applying the appropriate XSLT.
static void setDefaultCachePolicy(String policy)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
Deprecated. 
See Also:
Constant Field Values

CACHE_NONE

public static final String CACHE_NONE
Deprecated. 
See Also:
Constant Field Values

CACHE_DISABLE

public static final String CACHE_DISABLE
Deprecated. 
See Also:
Constant Field Values

CACHE_USER

public static final String CACHE_USER
Deprecated. 
See Also:
Constant Field Values

CACHE_WORLD

public static final String CACHE_WORLD
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

BasePresentationManager

public BasePresentationManager()
Deprecated. 
Method Detail

setDefaultCachePolicy

public static void setDefaultCachePolicy(String policy)
Deprecated. 

getPrintWriter

protected static PrintWriter getPrintWriter(javax.servlet.http.HttpServletResponse resp,
                                            String charset)
                                     throws IOException
Deprecated. 
Use this instead of getWriter for servlet engines that are slighlty broken. If the servlet engine uses getOutputStream() and the presentation manager is asked to serve a page, getWriter() will throw an IllegalStateException (see the servlet spec). In that case, this method returns a print writer created from the output stream for the specified response. In view of the above, there is no guarantee that the character encoding used by the PrintWriter returned by this method will be the one specified by the charset parameter. To be more precise, if the PrintWriter is constructed from the OutputStream returned by resp.getOutputStream(), then it will have the specified character encoding. If the PrintWriter is the one returned by resp.getWriter() then its character encoding is the one specified in the charset= property of the setContentType(String) method, which must be called before calling this method for the charset to take effect. (See getWriter())

Parameters:
resp - the response oject
charset - the character encoding (see Character Encoding). If this is null, then the default system encoding will be used (typically "ISO-8859-1").
Throws:
IOException

getInstance

public static PresentationManager getInstance()
Deprecated. 

findStylesheet

protected Stylesheet findStylesheet(SiteNodeRequestContext rctx)
Deprecated. 
Returns a Stylesheet for the current request context, searching the current site node, all of its parent site nodes, and the default stylesheets for the packages mounted on this site node and the parent site nodes.

Returns:
A stylesheet associated with the current site node (highest precedence), the stylesheet for its parent site nodes (precedence decreasing in distance from this), the default stylesheet for the mounted package on this site node, or the default stylesheets for the packages mounted on ancestors of this site node. (lowest precedence)

findStylesheet

protected Stylesheet findStylesheet(SiteNode sn,
                                    Locale l,
                                    String outputType)
Deprecated. 
Returns a Stylesheet for the current request context, searching the current site node, all of its parent site nodes, and the default stylesheets for the packages mounted on this site node and the parent site nodes.

Returns:
A stylesheet associated with the current site node (highest precedence), the stylesheet for its parent site nodes (precedence decreasing in distance from this), the default stylesheet for the mounted package on this site node, or the default stylesheets for the packages mounted on ancestors of this site node. (lowest precedence)

servePage

public void servePage(Document doc,
                      javax.servlet.http.HttpServletRequest req,
                      javax.servlet.http.HttpServletResponse resp)
Deprecated. 
Uses servePage(Document, HttpServletRequest, HttpServletResponse, Map) to implement the PresentationManager interface.

Specified by:
servePage in interface PresentationManager
Parameters:
doc - the XML document whose content is to be displayed to the output
req - the servlet request
resp - the servlet response

servePage

public void servePage(Document doc,
                      javax.servlet.http.HttpServletRequest req,
                      javax.servlet.http.HttpServletResponse resp,
                      Map params)
Deprecated. 
Serves an XML Document, getting and applying the appropriate XSLT. Also allows for parameters to be set in transformer. These will become top-level xsl:params in the stylesheet. The "contextPath" parameter will always be passed to XSLT, which is the value of req.getContextPath()

Parameters:
doc - the Bebop page to serve
req - the servlet request
resp - the servlet response
params - a set of name-value pairs to pass as parameters to the Transformer


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC