com.arsdigita.acs
Class ACSRequest
java.lang.Object
|
+--com.arsdigita.acs.ACSRequest
- public class ACSRequest
- extends java.lang.Object
Class to represent a requested URL. Maps the requested URL to a
package instance (ACSPackage); the requested mounting of that
package instance (SiteNode); and to the actual file served for a requested
URL.
|
Field Summary |
static java.lang.String |
cvsId
|
|
Constructor Summary |
protected |
ACSRequest(java.lang.String contextPath,
java.lang.String requestedUrlNoContext,
boolean calledRecursively)
Protected constructor. |
protected |
ACSRequest(java.lang.String contextPath,
java.lang.String requestedUrlNoContext,
SiteNode sn)
Protected constructor. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cvsId
public static java.lang.String cvsId
ACSRequest
protected ACSRequest(java.lang.String contextPath,
java.lang.String requestedUrlNoContext,
SiteNode sn)
- Protected constructor. Should only be called by factory class
or subclasses.
- Parameters:
contextPath - the base URL for the ACS/Java webapprequestedUrl - the original, unresolved abstract URL requested
by the usersiteNode - the site node that this URL is mapped to in the
site map
ACSRequest
protected ACSRequest(java.lang.String contextPath,
java.lang.String requestedUrlNoContext,
boolean calledRecursively)
- Protected constructor. Should only be called by factory class.
- Parameters:
contextPath - the base URL for the ACS/Java webapprequestedUrl - the original, unresolved abstract URL requested
by the usercalledRecursively - if true, indicates that this request
is being processed re-entrantly
site map
set
public static void set(ACSRequest request)
get
public static ACSRequest get()
getUrl
public java.lang.String getUrl()
- Returns:
- the original unresolved URL requested by the user.
getUrlNoContext
public java.lang.String getUrlNoContext()
- Returns:
- the unresolved URL requested by the user, without context path.
getContextPath
public java.lang.String getContextPath()
- Path where ACS is mounted on server.
getSiteNode
public SiteNode getSiteNode()
- Returns:
- the site node that corresponds to the URL requested by the
user.
getPackage
public ACSPackage getPackage()
- Returns:
- an ACSPackage object that represents the package instance
mounted on this site node.
getPackageUrl
public java.lang.String getPackageUrl()
- Returns:
- The URL for this particular package instance requested.
This is the URL where the package, as a whole, is mounted; that
is, the URL for the site node.
getExtraUrl
public java.lang.String getExtraUrl()
- Returns:
- The portion of the requested URL in excess of the site
node URL, for locating an individual page within a package or
subsite. For example, if the News package is mounted at /news,
and the request is for /news/a/b, getPackageUrl() will return
/news/ and getExtraUrl() should return "a/b".
getExtraPathInfo
public java.lang.String getExtraPathInfo()
- Returns:
- The extra path info that is not used by the RequestProcessor
for this request
(only interesting if request is handled by a VUH file).
There is no leading /.
This is equivalent to [ad_conn path_info] in TCL.
getConcreteUrl
public java.lang.String getConcreteUrl()
- Returns the actual resolved/concrete URL served
by this request. Useful when a page needs to ascertain its
location.
- Returns:
- the URL corresponding to the actual file in the filesystem
served by this request.
getConcreteUrl
public java.lang.String getConcreteUrl(javax.servlet.ServletContext ctx)
throws RedirectException,
java.io.FileNotFoundException,
javax.servlet.ServletException
- given the unresolved (in a package) abstract (without extension
URL requested, resolve to an actual file to be served either
from the global pageroot (first priority) or a package pageroot
(second priority).
if the URL for this ACSRequest has already been resolved,
return the file that was previously served.
may be called with null arguments if and only if the request
was previously served
- Parameters:
ctx - a servlet context, needed for resolving pathnames- Throws:
RedirectException - if the caller should redirect rather
than forward to a particular URLjava.lang.IllegalArgumentException - if ctx is null and the
request has not been resolved previouslyjavax.servlet.ServletException - thrown from errors
during translation, if any tranlsation step is required.