Class HTTPServletWebDepictContext

    • Constructor Detail

      • HTTPServletWebDepictContext

        public HTTPServletWebDepictContext​(HTTPServletGuiseRequest guiseRequest,
                                           javax.servlet.http.HttpServletResponse response,
                                           GuiseSession session,
                                           Destination destination)
                                    throws java.io.IOException
        Constructor.
        Parameters:
        guiseRequest - Guise request information.
        response - The HTTP servlet response.
        session - The Guise user session of which this context is a part.
        destination - The destination with which this context is associated.
        Throws:
        java.lang.NullPointerException - if the given Guise request, session, and/or destination is null.
        java.io.IOException - If there was an I/O error loading a needed resource.
    • Method Detail

      • getResponse

        protected javax.servlet.http.HttpServletResponse getResponse()
        Returns:
        The HTTP servlet response.
      • getDepictionURI

        public java.net.URI getDepictionURI()
        Returns:
        The current full absolute URI for this depiction, including any query.
      • getOutputCharset

        public java.nio.charset.Charset getOutputCharset()
        Returns:
        The charset currently used for the text output.
      • getOutputContentType

        public com.globalmentor.net.ContentType getOutputContentType()
        Returns:
        The current content type of the text output.
      • setOutputContentType

        public void setOutputContentType​(com.globalmentor.net.ContentType contentType)
        Sets the content type of the text output.

        This implementation removes all parameters and adds a character set parameter of the current encoding.

        Parameters:
        contentType - The content type of the text output.