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="15.0", sinceVersion="8.2") public interface IPageWebResourceRequest
Defines a request for a givenPageWebResource
.- Since:
- 8.2.0
- Version:
- $Revision: 25303 $ $Date: 2022-10-22 22:48:02 -0300 (Sat, 22 Oct 2022) $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getApplicationRequestedPath()
Returns the path requested by the browser relative to the currentwebsite base URL
.java.lang.Object
getAttribute(java.lang.String name)
Returns the value of the named attribute as anObject
, ornull
if no attribute of the given name exists.java.util.Enumeration<java.lang.String>
getAttributeNames()
Returns anEnumeration
containing the names of the attributes available to this request.IBusinessContext
getBusinessContext()
Returns the business context for this request.java.lang.String
getContextPath()
Returns the context path which is the path prefix associated with the deployed application.Cookie
getCookie(java.lang.String cookieName)
Returns the requested cookie ornull
if the cookie does not exist in request.Cookie[]
getCookies()
Returns the request's cookies.FileParameter
getFileParameter(java.lang.String parameterName)
Returns the uploaded file by the given parameter name.java.lang.String
getHeader(java.lang.String header)
Returns the requested header ornull
if the header does not exist in request.PageWebResource
getPageWebResource()
Returns thePageWebResource
of this request.java.lang.String
getParameter(java.lang.String name)
Returns the value of a request parameter as aString
, ornull
if the parameter does not exist.java.util.Map<java.lang.String,java.lang.String[]>
getParameterMap()
Returns aMap
of the parameters of this request.java.util.Enumeration<java.lang.String>
getParameterNames()
Returns anEnumeration
ofString
objects containing the names of the parameters contained in this request.java.lang.String[]
getParameterValues(java.lang.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.java.lang.String
getScheme()
Returns the name of the scheme used to make this request.java.lang.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(java.lang.String name)
Removes an attribute from this request.void
setAttribute(java.lang.String name, java.lang.Object o)
Stores an attribute in this request.
-
-
-
Method Detail
-
getParameter
java.lang.String getParameter(java.lang.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:
java.lang.IllegalArgumentException
- if name isnull
.- Since:
- 8.2.0
- See Also:
getParameterValues(java.lang.String)
-
getParameterNames
java.util.Enumeration<java.lang.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
java.lang.String[] getParameterValues(java.lang.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:
java.lang.IllegalArgumentException
- if name isnull
.- Since:
- 8.2.0
- See Also:
getParameter(java.lang.String)
-
getParameterMap
java.util.Map<java.lang.String,java.lang.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(java.lang.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:
java.lang.IllegalArgumentException
- if the parametercookieName
isnull
.- Since:
- 8.2.0
-
getHeader
java.lang.String getHeader(java.lang.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:
java.lang.IllegalArgumentException
- if the parameterheader
isnull
.- Since:
- 8.2.0
-
getFileParameter
FileParameter getFileParameter(java.lang.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:
java.lang.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
java.lang.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
java.lang.Object getAttribute(java.lang.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:
java.lang.IllegalArgumentException
- if name isnull
.
-
getAttributeNames
java.util.Enumeration<java.lang.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(java.lang.String name, java.lang.Object o)
Stores an attribute in this request.- Parameters:
name
- aString
specifying the name of the attributeo
- theObject
to be stored- Throws:
java.lang.IllegalArgumentException
- if name isnull
.
-
removeAttribute
void removeAttribute(java.lang.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:
java.lang.IllegalArgumentException
- if name isnull
.
-
getScheme
java.lang.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
java.lang.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
java.lang.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
-
-