public class PageWebResourceRequest extends HttpServletRequestWrapper implements IPageWebResourceRequest
IServiceInterfaceRequest
implementation that is used by the service container.Modifier and Type | Field and Description |
---|---|
protected IPortalMode |
mode |
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
Constructor and Description |
---|
PageWebResourceRequest(SessionConfig sessionConfig,
PageWebResource webResource,
HttpServletRequest request,
Map<String,FileParameter> fileParameters) |
Modifier and Type | Method and Description |
---|---|
String |
getApplicationRequestedPath()
Returns the path requested by the browser relative to the current
website base URL . |
Object |
getAttribute(String key)
Returns the value of the named attribute as an
Object , or null if no attribute of the
given name exists. |
Enumeration<String> |
getAttributeNames()
Returns an
Enumeration containing the names of the attributes available to this request. |
IBusinessContext |
getBusinessContext()
Returns the business context for this request.
|
Cookie |
getCookie(String cookieName)
Returns the requested cookie or
null if the cookie does not exist in request. |
FileParameter |
getFileParameter(String parameterName)
Returns the uploaded file by the given parameter name.
|
PageWebResource |
getPageWebResource()
Returns the
PageWebResource of this request. |
String |
getParameter(String name)
Returns the value of a request parameter as a
String , or null if the parameter does not
exist. |
Map<String,String[]> |
getParameterMap()
Returns a
Map of the parameters of this request. |
Enumeration<String> |
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. |
IPortalMode |
getPortalMode()
Returns the requested portal mode.
|
SessionConfig |
getSessionConfig()
Returns the session of the user that has performed the request.
|
IWebsiteBaseURL |
getWebsiteBaseURL()
Returns the website's base URL accessed to generate this request.
|
boolean |
isPageCachedInFile()
Returns whether the requested page is cached in file.
|
boolean |
isPreview()
Returns whether the request is in preview mode.
|
void |
removeAttribute(String key)
Removes an attribute from this request.
|
void |
setAttribute(String key,
Object value)
Stores an attribute in this request.
|
protected void |
setPageWebResource(PageWebResource pageWebResource)
Sets the page web resource.
|
authenticate, getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole, login, logout
getAsyncContext, getCharacterEncoding, getContentLength, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, isWrapperFor, isWrapperFor, setCharacterEncoding, setRequest, startAsync, startAsync
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getContextPath, getCookies, getHeader, getScheme, getServerName, getServerPort, isSecure
getAsyncContext, getCharacterEncoding, getContentLength, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, setCharacterEncoding, startAsync, startAsync
protected IPortalMode mode
public PageWebResourceRequest(SessionConfig sessionConfig, PageWebResource webResource, HttpServletRequest request, Map<String,FileParameter> fileParameters)
public String getParameter(String name)
IPageWebResourceRequest
String
, or null
if the parameter does not
exist. Request parameters are extra information sent with the request. The returned parameter are
"x-www-form-urlencoded" decoded.
This method should only be used if the parameter has only one value. If the parameter might have more than one
value, use IPageWebResourceRequest.getParameterValues(java.lang.String)
.
If this method is used with a multivalued parameter, the value returned is equal to the first value in the array
returned by getParameterValues
.
getParameter
in interface ServletRequest
getParameter
in interface IPageWebResourceRequest
getParameter
in class ServletRequestWrapper
name
- a String
specifying the name of the parameterString
representing the single value of the parameterIPageWebResourceRequest.getParameterValues(java.lang.String)
public Enumeration<String> getParameterNames()
IPageWebResourceRequest
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 ServletRequest
getParameterNames
in interface IPageWebResourceRequest
getParameterNames
in class ServletRequestWrapper
Enumeration
of String
objects, each String
containing the name
of a request parameter; or an empty Enumeration
if the request has no parameters.public String[] getParameterValues(String name)
IPageWebResourceRequest
String
objects containing all of the values the given request parameter has, or
null
if the parameter does not exist. The returned parameters are "x-www-form-urlencoded" decoded.
If the parameter has a single value, the array has a length of 1.
getParameterValues
in interface ServletRequest
getParameterValues
in interface IPageWebResourceRequest
getParameterValues
in class ServletRequestWrapper
name
- a String
containing the name of the parameter the value of which is requestedString
objects containing the parameter values.IPageWebResourceRequest.getParameter(java.lang.String)
public Map<String,String[]> getParameterMap()
IPageWebResourceRequest
Map
of the parameters of this request. Request parameters are extra information sent with
the request. The returned parameters are "x-www-form-urlencoded" decoded.
The values in the returned Map
are from type String array (String[]
).
If no parameters exist this method returns an empty Map
.
getParameterMap
in interface ServletRequest
getParameterMap
in interface IPageWebResourceRequest
getParameterMap
in class ServletRequestWrapper
Map
containing parameter names as keys and parameter values as map values, or
an empty Map
if no parameters exist. The keys in the parameter map are of type String. The
values in the parameter map are of type String array (String[]
).public Enumeration<String> getAttributeNames()
IPageWebResourceRequest
Enumeration
containing the names of the attributes available to this request. This method
returns an empty Enumeration
if the request has no attributes available to it.getAttributeNames
in interface ServletRequest
getAttributeNames
in interface IPageWebResourceRequest
getAttributeNames
in class ServletRequestWrapper
Enumeration
of strings containing the names of the request attributes, or an empty
Enumeration
if the request has no attributes available to it.public Object getAttribute(String key)
IPageWebResourceRequest
Object
, or null
if no attribute of the
given name exists.getAttribute
in interface ServletRequest
getAttribute
in interface IPageWebResourceRequest
getAttribute
in class ServletRequestWrapper
key
- a String
specifying the name of the attributeObject
containing the value of the attribute, or null
if the attribute does
not exist.public void setAttribute(String key, Object value)
IPageWebResourceRequest
setAttribute
in interface ServletRequest
setAttribute
in interface IPageWebResourceRequest
setAttribute
in class ServletRequestWrapper
key
- a String
specifying the name of the attributevalue
- the Object
to be storedpublic void removeAttribute(String key)
IPageWebResourceRequest
removeAttribute
in interface ServletRequest
removeAttribute
in interface IPageWebResourceRequest
removeAttribute
in class ServletRequestWrapper
key
- a String
specifying the name of the attribute to be removedpublic PageWebResource getPageWebResource()
IPageWebResourceRequest
PageWebResource
of this request.getPageWebResource
in interface IPageWebResourceRequest
PageWebResource
of this request.public IWebsiteBaseURL getWebsiteBaseURL()
IPageWebResourceRequest
getWebsiteBaseURL
in interface IPageWebResourceRequest
public SessionConfig getSessionConfig()
IPageWebResourceRequest
getSessionConfig
in interface IPageWebResourceRequest
public Cookie getCookie(String cookieName)
IPageWebResourceRequest
null
if the cookie does not exist in request.getCookie
in interface IPageWebResourceRequest
cookieName
- the requested cookie name.null
if the cookie does not exist in request.public FileParameter getFileParameter(String parameterName)
IPageWebResourceRequest
getFileParameter
in interface IPageWebResourceRequest
parameterName
- the parameter name.public boolean isPreview()
IPageWebResourceRequest
isPreview
in interface IPageWebResourceRequest
public IBusinessContext getBusinessContext()
IPageWebResourceRequest
getBusinessContext
in interface IPageWebResourceRequest
public IPortalMode getPortalMode()
IPageWebResourceRequest
getPortalMode
in interface IPageWebResourceRequest
public boolean isPageCachedInFile()
IPageWebResourceRequest
isPageCachedInFile
in interface IPageWebResourceRequest
public String getApplicationRequestedPath()
IPageWebResourceRequest
website base URL
.getApplicationRequestedPath
in interface IPageWebResourceRequest
website base URL
.protected void setPageWebResource(PageWebResource pageWebResource)
pageWebResource
- the page web resource.LumisXP 12.3.0.200408 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.