|
|||||||||||
| 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)
RequestString,
getParameter in interface RequestgetParameter in class AbstractRequestWrapperpublic Enumeration getParameterNames()
RequestEnumeration 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 RequestgetParameterNames in class AbstractRequestWrapperpublic String[] getParameterValues(String name)
RequestString 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 RequestgetParameterValues in class AbstractRequestWrapperpublic String getQueryString()
Requestnull
if the URL does not have a query string. Same as the value
of the CGI variable QUERY_STRING.
getQueryString in interface RequestgetQueryString in class AbstractRequestWrapperpublic String getRequestURI()
RequestFor 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 RequestgetRequestURI in class AbstractRequestWrapperpublic String getSitemapURI()
RequestReturns 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 RequestgetSitemapURI in class AbstractRequestWrapperpublic String getSitemapURIPrefix()
RequestReturns 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 RequestgetSitemapURIPrefix in class AbstractRequestWrapperRequest.getSitemapURIPrefix()public String getSitemapPath()
RequestReturns 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 RequestgetSitemapPath in class AbstractRequestWrapper
public void setRequestURI(String prefix,
String uri)
public Object getAttribute(String name,
int scope)
RequestObject, or null if no attribute
of the given name exists.
getAttribute in interface RequestgetAttribute in class AbstractRequestWrapperpublic Enumeration getAttributeNames(int scope)
RequestEnumeration 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 RequestgetAttributeNames in class AbstractRequestWrapper
public void removeAttribute(String name,
int scope)
RequestAttribute 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 RequestremoveAttribute in class AbstractRequestWrapper
public void setAttribute(String name,
Object o,
int scope)
RequestAttribute 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 RequestsetAttribute in class AbstractRequestWrapperpublic Object searchAttribute(String name)
RequestObject, 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 RequestsearchAttribute in class AbstractRequestWrapperRequest.searchAttribute(java.lang.String)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||