Package lumis.portal.url
Interface IPageWebResourceRequest
-
- All Known Subinterfaces:
IMockServiceInterfaceActionRequest
,IMockServiceInterfaceRenderRequest
,IMockServiceInterfaceRequest
,IPageWebResourceRenderRequest
,IServiceInterfaceActionRequest
,IServiceInterfaceRenderRequest
,IServiceInterfaceRequest
,IServiceInterfaceRequestSPI
- All Known Implementing Classes:
MockServiceInterfaceActionRequest
,MockServiceInterfaceRenderRequest
,PageWebResourceRenderRequest
,PageWebResourceRequest
,ServiceContainerActionRequest
,ServiceContainerRenderRequest
,ServiceContainerRequest
@StableMinor(version="14.2", sinceVersion="8.2") public interface IPageWebResourceRequest
Defines a request for a givenPageWebResource
.- Since:
- 8.2.0
- Version:
- $Revision: 24985 $ $Date: 2022-05-02 23:04:30 -0300 (Mon, 02 May 2022) $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getApplicationRequestedPath()
Returns the path requested by the browser relative to the currentwebsite base URL
.Object
getAttribute(String name)
Returns the value of the named attribute as anObject
, ornull
if no attribute of the given name exists.Enumeration<String>
getAttributeNames()
Returns anEnumeration
containing the names of the attributes available to this request.IBusinessContext
getBusinessContext()
Returns the business context for this request.String
getContextPath()
Returns the context path which is the path prefix associated with the deployed application.Cookie
getCookie(String cookieName)
Returns the requested cookie ornull
if the cookie does not exist in request.Cookie[]
getCookies()
Returns the request's cookies.FileParameter
getFileParameter(String parameterName)
Returns the uploaded file by the given parameter name.String
getHeader(String header)
Returns the requested header ornull
if the header does not exist in request.PageWebResource
getPageWebResource()
Returns thePageWebResource
of this request.String
getParameter(String name)
Returns the value of a request parameter as aString
, ornull
if the parameter does not exist.Map<String,String[]>
getParameterMap()
Returns aMap
of the parameters of this request.Enumeration<String>
getParameterNames()
Returns anEnumeration
ofString
objects containing the names of the parameters contained in this request.String[]
getParameterValues(String name)
Returns an array ofString
objects containing all of the values the given request parameter has, ornull
if the parameter does not exist.IPortalMode
getPortalMode()
Returns the requested portal mode.String
getScheme()
Returns the name of the scheme used to make this request.String
getServerName()
Returns the host name of the server that received the request.int
getServerPort()
Returns the port number on which this request was received.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.boolean
isSecure()
Returns a boolean indicating whether this request was made using a secure channel between client and the portal, such as HTTPS.void
removeAttribute(String name)
Removes an attribute from this request.void
setAttribute(String name, Object o)
Stores an attribute in this request.
-
-
-
Method Detail
-
getParameter
String getParameter(String name)
Returns the value of a request parameter as aString
, ornull
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
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
.- Parameters:
name
- aString
specifying the name of the parameter- Returns:
- a
String
representing the single value of the parameter - Throws:
IllegalArgumentException
- if name isnull
.- Since:
- 8.2.0
- See Also:
getParameterValues(java.lang.String)
-
getParameterNames
Enumeration<String> getParameterNames()
Returns anEnumeration
ofString
objects containing the names of the parameters contained in this request. If the request has no parameters, the method returns an emptyEnumeration
.- Returns:
- an
Enumeration
ofString
objects, eachString
containing the name of a request parameter; or an emptyEnumeration
if the request has no parameters. - Since:
- 8.2.0
-
getParameterValues
String[] getParameterValues(String name)
Returns an array ofString
objects containing all of the values the given request parameter has, ornull
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.
- Parameters:
name
- aString
containing the name of the parameter the value of which is requested- Returns:
- an array of
String
objects containing the parameter values. - Throws:
IllegalArgumentException
- if name isnull
.- Since:
- 8.2.0
- See Also:
getParameter(java.lang.String)
-
getParameterMap
Map<String,String[]> getParameterMap()
Returns aMap
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
.- Returns:
- an immutable
Map
containing parameter names as keys and parameter values as map values, or an emptyMap
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[]
). - Since:
- 8.2.0
-
getSessionConfig
SessionConfig getSessionConfig()
Returns the session of the user that has performed the request.- Returns:
- the session of the user that has performed the request.
- Since:
- 8.2.0
-
getCookies
Cookie[] getCookies()
Returns the request's cookies.- Returns:
- the request's cookies.
- Since:
- 8.2.0
-
getCookie
Cookie getCookie(String cookieName)
Returns the requested cookie ornull
if the cookie does not exist in request.- Parameters:
cookieName
- the requested cookie name.- Returns:
- the requested cookie or
null
if the cookie does not exist in request. - Throws:
IllegalArgumentException
- if the parametercookieName
isnull
.- Since:
- 8.2.0
-
getHeader
String getHeader(String header)
Returns the requested header ornull
if the header does not exist in request.- Parameters:
header
- the requested header name.- Returns:
- the requested header or
null
if the header does not exist in request. - Throws:
IllegalArgumentException
- if the parameterheader
isnull
.- Since:
- 8.2.0
-
getFileParameter
FileParameter getFileParameter(String parameterName)
Returns the uploaded file by the given parameter name.- Parameters:
parameterName
- the parameter name.- Returns:
- the uploaded file by the given parameter name
- Throws:
IllegalArgumentException
- if the parameterparameterName
isnull
.- Since:
- 8.2.0
-
getPortalMode
IPortalMode getPortalMode()
Returns the requested portal mode.- Returns:
- the requested portal mode.
- Since:
- 8.2.0
-
getBusinessContext
IBusinessContext getBusinessContext()
Returns the business context for this request.- Returns:
- the business context.
- Since:
- 8.2.0
-
getPageWebResource
PageWebResource getPageWebResource()
Returns thePageWebResource
of this request.- Returns:
- the
PageWebResource
of this request. - Since:
- 8.2.0
-
getWebsiteBaseURL
IWebsiteBaseURL getWebsiteBaseURL()
Returns the website's base URL accessed to generate this request.- Returns:
- the website base URL.
- Since:
- 8.2.0
-
getContextPath
String getContextPath()
Returns the context path which is the path prefix associated with the deployed application. If the application is rooted at the base of the web server URL namespace (also known as "default" context), this path is an empty string. Otherwise, it is the path the application is rooted to, the path starts with a '/' and it does not end with a '/' character.- Returns:
- a
String
specifying the portion of the request URL that indicates the context of the request
-
getAttribute
Object getAttribute(String name)
Returns the value of the named attribute as anObject
, ornull
if no attribute of the given name exists.- Parameters:
name
- aString
specifying the name of the attribute- Returns:
- an
Object
containing the value of the attribute, ornull
if the attribute does not exist. - Throws:
IllegalArgumentException
- if name isnull
.
-
getAttributeNames
Enumeration<String> getAttributeNames()
Returns anEnumeration
containing the names of the attributes available to this request. This method returns an emptyEnumeration
if the request has no attributes available to it.- Returns:
- an
Enumeration
of strings containing the names of the request attributes, or an emptyEnumeration
if the request has no attributes available to it.
-
isSecure
boolean isSecure()
Returns a boolean indicating whether this request was made using a secure channel between client and the portal, such as HTTPS.- Returns:
- true, if the request was made using a secure channel.
-
setAttribute
void setAttribute(String name, Object o)
Stores an attribute in this request.- Parameters:
name
- aString
specifying the name of the attributeo
- theObject
to be stored- Throws:
IllegalArgumentException
- if name isnull
.
-
removeAttribute
void removeAttribute(String name)
Removes an attribute from this request. This method is not generally needed, as attributes only persist as long as the request is being handled.- Parameters:
name
- aString
specifying the name of the attribute to be removed- Throws:
IllegalArgumentException
- if name isnull
.
-
getScheme
String getScheme()
Returns the name of the scheme used to make this request. For example,http
orhttps
. Different schemes have different rules for constructing URLs, as noted in RFC 1738.- Returns:
- a
String
containing the name of the scheme used to make this request
-
getServerName
String getServerName()
Returns the host name of the server that received the request.- Returns:
- a
String
containing the name of the server to which the request was sent
-
getServerPort
int getServerPort()
Returns the port number on which this request was received.- Returns:
- an integer specifying the port number
-
isPageCachedInFile
boolean isPageCachedInFile()
Returns whether the requested page is cached in file.- Returns:
- whether the requested page is cached in file.
- Since:
- 8.2.0
-
isPreview
boolean isPreview()
Returns whether the request is in preview mode.- Returns:
- whether the request is in preview mode.
- Since:
- 8.2.0
-
getApplicationRequestedPath
String getApplicationRequestedPath()
Returns the path requested by the browser relative to the currentwebsite base URL
.- Returns:
- the path requested by the browser relative to the current
website base URL
. - Since:
- 8.2.0
-
-