com.arsdigita.dispatcher
Interface RequestContext

All Known Implementing Classes:
InitialRequestContext

public interface RequestContext

Interface used when dispatchers are chained or piped together. Part of the requested URL will be used at each stage of the dispatch, and this interface is used by the dispatcher to tell what part of the URL has already been used to dispatch the request so far. The remainder is what the current dispatcher must work with. Because form/URL variables are not order-dependent, We only keep track of the path portion of the URL.

Since:
4.5
Version:
$Revision: #9 $ $Date: 2004/04/07 $
Author:
Bill Schneider

Field Summary
static String versionId
           
 
Method Summary
 boolean getDebugging()
          Gets the debugging flag.
 boolean getDebuggingXML()
          Gets the show-XML-only flag.
 boolean getDebuggingXSL()
          Gets the show-XSL-only flag.
 Locale getLocale()
          Gets the locale for the current request context.
 String getOriginalURL()
          Gets the original URL requested by the end user's browser.
 String getOutputType()
          Gets the requested output type.
 String getPageBase()
          Gets the base path, relative to the webapp root, where JSP-based resources (and static pages) will be found.
 String getProcessedURLPart()
          Gets the portion of the URL that has already been used by previous dispatchers in the chain.
 String getRemainingURLPart()
          Gets the portion of the URL that has not been used by previous dispatchers in the chain.
 ResourceBundle getResourceBundle()
          Returns a java.util.ResourceBundle for the current request, based on the requested application and the user's locale preference.
 javax.servlet.ServletContext getServletContext()
          Gets the current servlet context.
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Method Detail

getRemainingURLPart

public String getRemainingURLPart()
Gets the portion of the URL that has not been used by previous dispatchers in the chain.

Returns:
the portion of the URL that must be used by the current dispatcher.

getProcessedURLPart

public String getProcessedURLPart()
Gets the portion of the URL that has already been used by previous dispatchers in the chain.

Returns:
the portion of the URL that has already been used.

getOriginalURL

public String getOriginalURL()
Gets the original URL requested by the end user's browser. This URL does not change when a request is forwarded by the application; "/foo/bar" is still the original request URI in the browser even if we've dispatched the request to "/packages/foo/www/bar.jsp".

Returns:
the original URL requested by the end user's browser. All generated HREF, IMG SRC, and FORM ACTION attributes, and any redirects, will be relative to this URL.

getServletContext

public javax.servlet.ServletContext getServletContext()
Gets the current servlet context.

Returns:
the current servlet context, which must be set by implementation.

getLocale

public Locale getLocale()
Gets the locale for the current request context.

Returns:
the locale for the current request context.

getResourceBundle

public ResourceBundle getResourceBundle()
Returns a java.util.ResourceBundle for the current request, based on the requested application and the user's locale preference.

Returns:
the current java.util.ResourceBundle to use in this request.

getOutputType

public String getOutputType()
Gets the requested output type.

Returns:
the requested output type (normally "text/html" by default for a web browser request).

getDebugging

public boolean getDebugging()
Gets the debugging flag.

Returns:
the debugging flag. Currently, debugging applies to XSL transformation.

getDebuggingXML

public boolean getDebuggingXML()
Gets the show-XML-only flag.

Returns:
if true, indicates that the active PresentationManager should output raw, untransformed XML instead of processing it with XSLT.

getDebuggingXSL

public boolean getDebuggingXSL()
Gets the show-XSL-only flag.

Returns:
if true, indicates that the active PresentationManager should output the XSLT stylesheet in effect for this request.

getPageBase

public String getPageBase()
Gets the base path, relative to the webapp root, where JSP-based resources (and static pages) will be found.

Returns:
the base path, relative to the webapp root, where JSP-based resources will be found. Returns with a trailing slash (for example, /packages/package-key/www/).


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