Interface IPageWebResourceRequest

    • Method Detail

      • getParameter

        String getParameter​(String name)
        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 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 - a String specifying the name of the parameter
        Returns:
        a String representing the single value of the parameter
        Throws:
        IllegalArgumentException - if name is null.
        Since:
        8.2.0
        See Also:
        getParameterValues(java.lang.String)
      • getParameterNames

        Enumeration<String> getParameterNames()
        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 .
        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.
        Since:
        8.2.0
      • getParameterValues

        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. 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 - a String 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 is null.
        Since:
        8.2.0
        See Also:
        getParameter(java.lang.String)
      • getParameterMap

        Map<String,​String[]> getParameterMap()
        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.

        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[]).
        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 or null 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 parameter cookieName is null.
        Since:
        8.2.0
      • getHeader

        String getHeader​(String header)
        Returns the requested header or null 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 parameter header is null.
        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 parameter parameterName is null.
        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
      • 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 an Object, or null if no attribute of the given name exists.
        Parameters:
        name - 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.
        Throws:
        IllegalArgumentException - if name is null.
      • getAttributeNames

        Enumeration<String> getAttributeNames()
        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.
        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.
      • 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 - a String specifying the name of the attribute
        o - the Object to be stored
        Throws:
        IllegalArgumentException - if name is null.
      • 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 - a String specifying the name of the attribute to be removed
        Throws:
        IllegalArgumentException - if name is null.
      • getScheme

        String getScheme()
        Returns the name of the scheme used to make this request. For example, http or https. 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 current website base URL.
        Returns:
        the path requested by the browser relative to the current website base URL.
        Since:
        8.2.0