|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cocoon.environment.impl.AbstractRequest
org.apache.cocoon.environment.wrapper.AbstractRequestWrapper
org.apache.cocoon.environment.wrapper.RequestWrapper
This is a wrapper class for the Request
object.
It has the same properties except that the url and the parameters
are different.
Field Summary |
Fields inherited from class org.apache.cocoon.environment.wrapper.AbstractRequestWrapper |
req |
Fields inherited from interface org.apache.cocoon.environment.Request |
GLOBAL_SCOPE, REQUEST_SCOPE |
Constructor Summary | |
RequestWrapper(Request request,
String requestURI,
String queryString,
Environment env)
Constructor |
|
RequestWrapper(Request request,
String requestURI,
String queryString,
Environment env,
boolean rawMode)
Constructor |
Method Summary | |
Object |
getAttribute(String name,
int scope)
Returns the value of the named attribute from the scope as an Object , or null if no attribute
of the given name exists. |
Enumeration |
getAttributeNames(int scope)
Returns an Enumeration containing the
names of the attributes available to this request in the scope.
|
String |
getParameter(String name)
Returns the value of a request parameter as a String , |
Enumeration |
getParameterNames()
Returns an Enumeration of String
objects containing the names of the parameters contained
in this request. |
String[] |
getParameterValues(String name)
Returns an array of String objects containing
all of the values the given request parameter has, or
null if the parameter does not exist.
|
String |
getQueryString()
Returns the query string that is contained in the request URL after the path. |
String |
getRequestURI()
Returns the part of this request's URL from the protocol name up to the query string in the first line of the HTTP request. |
String |
getSitemapPath()
Returns the path to the sitemap of the requested resource as interpreted by the sitemap. |
String |
getSitemapURI()
Returns the URI of the requested resource as interpreted by the sitemap. |
String |
getSitemapURIPrefix()
Returns the URI Prefix of the requested resource where the sitemap is mounted. |
void |
removeAttribute(String name,
int scope)
Removes an attribute from this request in the scope. |
Object |
searchAttribute(String name)
Returns the value of the named attribute searching both scopes as an Object , or null if no attribute
of the given name exists. |
void |
setAttribute(String name,
Object o,
int scope)
Stores an attribute in this request in the scope. |
void |
setRequestURI(String prefix,
String uri)
|
Methods inherited from class org.apache.cocoon.environment.wrapper.AbstractRequestWrapper |
get, getAttribute, getAttributeNames, getAuthType, getCharacterEncoding, getContentLength, getContentType, getContextPath, getCookieMap, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getInputStream, getLocale, getLocales, getMethod, getPathInfo, getPathTranslated, getProtocol, getRemoteAddr, getRemoteHost, getRemoteUser, getRequestedSessionId, getScheme, getServerName, getServerPort, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isSecure, isUserInRole, removeAttribute, setAttribute, setCharacterEncoding |
Methods inherited from class org.apache.cocoon.environment.impl.AbstractRequest |
getAttributes, getHeaders, getParameters |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RequestWrapper(Request request, String requestURI, String queryString, Environment env)
public RequestWrapper(Request request, String requestURI, String queryString, Environment env, boolean rawMode)
Method Detail |
public String getParameter(String name)
Request
String
,
getParameter
in interface Request
getParameter
in class AbstractRequestWrapper
public Enumeration getParameterNames()
Request
Enumeration
of String
objects containing the names of the parameters contained
in this request. If the request has
no parameters, the method returns an
empty Enumeration
.
getParameterNames
in interface Request
getParameterNames
in class AbstractRequestWrapper
public String[] getParameterValues(String name)
Request
String
objects containing
all of the values the given request parameter has, or
null
if the parameter does not exist.
If the parameter has a single value, the array has a length of 1.
getParameterValues
in interface Request
getParameterValues
in class AbstractRequestWrapper
public String getQueryString()
Request
null
if the URL does not have a query string. Same as the value
of the CGI variable QUERY_STRING.
getQueryString
in interface Request
getQueryString
in class AbstractRequestWrapper
public String getRequestURI()
Request
For internal requests, this method returns the information for the original/external request!
First line of HTTP request Returned Value POST /some/path.html HTTP/1.1 /some/path.html GET http://foo.bar/a.html HTTP/1.0 http://foo.bar/a.html HEAD /xyz?a=b HTTP/1.1 /xyz
getRequestURI
in interface Request
getRequestURI
in class AbstractRequestWrapper
public String getSitemapURI()
Request
Returns the URI of the requested resource as interpreted by the sitemap. For example, if your webapp is mounted at "/webapp" and the HTTP request is for "/webapp/foo", this method returns "foo". Consequently, if the request is for "/webapp", this method returns an empty string.
Note that if the request is mapped to a pipeline that contains aggregated content, and if this method is called in the context of one of the aggregated parts (e.g. a server page), this method will return the URI of the aggregated part, not the original requested URI.
getSitemapURI
in interface Request
getSitemapURI
in class AbstractRequestWrapper
public String getSitemapURIPrefix()
Request
Returns the URI Prefix of the requested resource where the sitemap is mounted. For example, if your webapp is mounted at "/webapp" and the HTTP request is for "/webapp/foo", this method returns "webapp/".
getSitemapURIPrefix
in interface Request
getSitemapURIPrefix
in class AbstractRequestWrapper
Request.getSitemapURIPrefix()
public String getSitemapPath()
Request
Returns the path to the sitemap of the requested resource as interpreted by the sitemap. For example, if your webapp is mounted at "webapp" and the HTTP request is for "webapp/foo", this method returns "webapp/". Consequently, if the request is for "foo", this method returns the empty string.
getSitemapPath
in interface Request
getSitemapPath
in class AbstractRequestWrapper
public void setRequestURI(String prefix, String uri)
public Object getAttribute(String name, int scope)
Request
Object
, or null
if no attribute
of the given name exists.
getAttribute
in interface Request
getAttribute
in class AbstractRequestWrapper
public Enumeration getAttributeNames(int scope)
Request
Enumeration
containing the
names of the attributes available to this request in the scope.
This method returns an empty Enumeration
if the request has no attributes available to it.
getAttributeNames
in interface Request
getAttributeNames
in class AbstractRequestWrapper
public void removeAttribute(String name, int scope)
Request
Attribute names should follow the same conventions as
package names. Names beginning with java.*
,
javax.*
, and com.sun.*
, are
reserved for use by Sun Microsystems.
removeAttribute
in interface Request
removeAttribute
in class AbstractRequestWrapper
public void setAttribute(String name, Object o, int scope)
Request
Attribute names should follow the same conventions as
package names. Names beginning with java.*
,
javax.*
, and com.sun.*
, are
reserved for use by Sun Microsystems.
setAttribute
in interface Request
setAttribute
in class AbstractRequestWrapper
public Object searchAttribute(String name)
Request
Object
, or null
if no attribute
of the given name exists. This method first searches in the
request scope and then, if no object is found, in the global scope.
searchAttribute
in interface Request
searchAttribute
in class AbstractRequestWrapper
Request.searchAttribute(java.lang.String)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |