Class PageWebResourceRequest

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected IPortalMode mode  
      • Fields inherited from interface javax.servlet.http.HttpServletRequest

        BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getApplicationRequestedPath()
      Returns the path requested by the browser relative to the current website base URL.
      java.lang.Object getAttribute​(java.lang.String key)
      Returns the value of the named attribute as an Object, or null if no attribute of the given name exists.
      java.util.Enumeration<java.lang.String> getAttributeNames()
      Returns an Enumeration containing the names of the attributes available to this request.
      IBusinessContext getBusinessContext()
      Returns the business context for this request.
      javax.servlet.http.Cookie getCookie​(java.lang.String cookieName)
      Returns the requested cookie or null if the cookie does not exist in request.
      FileParameter getFileParameter​(java.lang.String parameterName)
      Returns the uploaded file by the given parameter name.
      PageWebResource getPageWebResource()
      Returns the PageWebResource of this request.
      java.lang.String getParameter​(java.lang.String name)
      Returns the value of a request parameter as a String, or null if the parameter does not exist.
      java.util.Map<java.lang.String,​java.lang.String[]> getParameterMap()
      Returns a Map of the parameters of this request.
      java.util.Enumeration<java.lang.String> getParameterNames()
      Returns an Enumeration of String objects containing the names of the parameters contained in this request.
      java.lang.String[] getParameterValues​(java.lang.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​(java.lang.String key)
      Removes an attribute from this request.
      void setAttribute​(java.lang.String key, java.lang.Object value)
      Stores an attribute in this request.
      protected void setPageWebResource​(PageWebResource pageWebResource)
      Sets the page web resource.
      • Methods inherited from class javax.servlet.http.HttpServletRequestWrapper

        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
      • Methods inherited from class javax.servlet.ServletRequestWrapper

        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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.servlet.ServletRequest

        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
    • Constructor Detail

      • PageWebResourceRequest

        public PageWebResourceRequest​(SessionConfig sessionConfig,
                                      PageWebResource webResource,
                                      javax.servlet.http.HttpServletRequest request,
                                      java.util.Map<java.lang.String,​FileParameter> fileParameters)
    • Method Detail

      • getParameter

        public java.lang.String getParameter​(java.lang.String name)
        Description copied from interface: IPageWebResourceRequest
        Returns the value of a request parameter as a 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.

        Specified by:
        getParameter in interface IPageWebResourceRequest
        Specified by:
        getParameter in interface javax.servlet.ServletRequest
        Overrides:
        getParameter in class javax.servlet.ServletRequestWrapper
        Parameters:
        name - a String specifying the name of the parameter
        Returns:
        a String representing the single value of the parameter
        See Also:
        IPageWebResourceRequest.getParameterValues(java.lang.String)
      • getParameterNames

        public java.util.Enumeration<java.lang.String> getParameterNames()
        Description copied from interface: IPageWebResourceRequest
        Returns an 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 .
        Specified by:
        getParameterNames in interface IPageWebResourceRequest
        Specified by:
        getParameterNames in interface javax.servlet.ServletRequest
        Overrides:
        getParameterNames in class javax.servlet.ServletRequestWrapper
        Returns:
        an Enumeration of String objects, each String containing the name of a request parameter; or an empty Enumeration if the request has no parameters.
      • getParameterValues

        public java.lang.String[] getParameterValues​(java.lang.String name)
        Description copied from interface: IPageWebResourceRequest
        Returns an array of 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.

        Specified by:
        getParameterValues in interface IPageWebResourceRequest
        Specified by:
        getParameterValues in interface javax.servlet.ServletRequest
        Overrides:
        getParameterValues in class javax.servlet.ServletRequestWrapper
        Parameters:
        name - a String containing the name of the parameter the value of which is requested
        Returns:
        an array of String objects containing the parameter values.
        See Also:
        IPageWebResourceRequest.getParameter(java.lang.String)
      • getParameterMap

        public java.util.Map<java.lang.String,​java.lang.String[]> getParameterMap()
        Description copied from interface: IPageWebResourceRequest
        Returns a 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.

        Specified by:
        getParameterMap in interface IPageWebResourceRequest
        Specified by:
        getParameterMap in interface javax.servlet.ServletRequest
        Overrides:
        getParameterMap in class javax.servlet.ServletRequestWrapper
        Returns:
        an immutable 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[]).
      • getAttributeNames

        public java.util.Enumeration<java.lang.String> getAttributeNames()
        Description copied from interface: IPageWebResourceRequest
        Returns an 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.
        Specified by:
        getAttributeNames in interface IPageWebResourceRequest
        Specified by:
        getAttributeNames in interface javax.servlet.ServletRequest
        Overrides:
        getAttributeNames in class javax.servlet.ServletRequestWrapper
        Returns:
        an Enumeration of strings containing the names of the request attributes, or an empty Enumeration if the request has no attributes available to it.
      • getAttribute

        public java.lang.Object getAttribute​(java.lang.String key)
        Description copied from interface: IPageWebResourceRequest
        Returns the value of the named attribute as an Object, or null if no attribute of the given name exists.
        Specified by:
        getAttribute in interface IPageWebResourceRequest
        Specified by:
        getAttribute in interface javax.servlet.ServletRequest
        Overrides:
        getAttribute in class javax.servlet.ServletRequestWrapper
        Parameters:
        key - a String specifying the name of the attribute
        Returns:
        an Object containing the value of the attribute, or null if the attribute does not exist.
      • setAttribute

        public void setAttribute​(java.lang.String key,
                                 java.lang.Object value)
        Description copied from interface: IPageWebResourceRequest
        Stores an attribute in this request.
        Specified by:
        setAttribute in interface IPageWebResourceRequest
        Specified by:
        setAttribute in interface javax.servlet.ServletRequest
        Overrides:
        setAttribute in class javax.servlet.ServletRequestWrapper
        Parameters:
        key - a String specifying the name of the attribute
        value - the Object to be stored
      • removeAttribute

        public void removeAttribute​(java.lang.String key)
        Description copied from interface: IPageWebResourceRequest
        Removes an attribute from this request. This method is not generally needed, as attributes only persist as long as the request is being handled.
        Specified by:
        removeAttribute in interface IPageWebResourceRequest
        Specified by:
        removeAttribute in interface javax.servlet.ServletRequest
        Overrides:
        removeAttribute in class javax.servlet.ServletRequestWrapper
        Parameters:
        key - a String specifying the name of the attribute to be removed
      • getCookie

        public javax.servlet.http.Cookie getCookie​(java.lang.String cookieName)
        Description copied from interface: IPageWebResourceRequest
        Returns the requested cookie or null if the cookie does not exist in request.
        Specified by:
        getCookie in interface IPageWebResourceRequest
        Parameters:
        cookieName - the requested cookie name.
        Returns:
        the requested cookie or null if the cookie does not exist in request.
      • getFileParameter

        public FileParameter getFileParameter​(java.lang.String parameterName)
        Description copied from interface: IPageWebResourceRequest
        Returns the uploaded file by the given parameter name.
        Specified by:
        getFileParameter in interface IPageWebResourceRequest
        Parameters:
        parameterName - the parameter name.
        Returns:
        the uploaded file by the given parameter name
      • setPageWebResource

        protected void setPageWebResource​(PageWebResource pageWebResource)
        Sets the page web resource.
        Parameters:
        pageWebResource - the page web resource.
        Since:
        8.2.0