Interface IServletResponse

    • Method Detail

      • getValue

        String getValue()
        When type is set to a binary response type (e.g. SHOW_FILE), the file name of the returned file.

        When type is set to a non-binary response (e.g. JSON), the plain-text content of the response.

        When type is set to REDIRECT, the URL to which to redirect.

        Returns:
        The plain-text content of the HTTP response.
      • getContentType

        String getContentType()
        Applies only when type is set to SHOW_FILE:

        Must return the content type (=mime type) that is to be sent along with the binary data. When this is either null or blank, an attempt is made to guess the content type from the binary data. Please note that this may fail to determine the actual content type, you should always provide a content type.

        Returns:
        The content type of the binary data.
        Since:
        5.0
      • getSessionAttributes

        Map<String,​Serializable> getSessionAttributes()
        Returns:
        A Map with attributes that should be written to the HttpSession. Existing values in the HttpSession are overwritten.
        Since:
        5.0
      • getHttpHeader

        default Map<String,​String> getHttpHeader()
        Returns:
        A Map of HTTP headers that should be sent along with the HTTP response.
      • getHttpStatusCode

        default int getHttpStatusCode()
        Returns:
        The HTTP status code of the HTTP response.
      • getType

        EResponseType getType()
        Returns:
        The type of response, such as whether a plain text or binary file should be returned, or a redirect should be performed.
      • getBinValue

        byte[] getBinValue()
        The binary data for the response. Applies only when type is set to SHOW_FILE.
        Returns:
        The binary content of the HTTP response.
      • isForceDownload

        boolean isForceDownload()
        Applies only when type is set to SHOW_FILE.
        Returns:
        If true, attempts to prevent browsers from showing the binary content inline. If false, the browser may show the content inline, which is useful for PDF, image or plain text files. Please note that support for this differs between browsers.
      • getLongValue

        default long getLongValue()
        Applies only when type is set to FORM_RECORD is set, this is the ID of the form record to which to redirect.
        Returns:
        The long value content for the response.