Class MimeResponseWrapper

    • Constructor Detail

      • MimeResponseWrapper

        public MimeResponseWrapper​(MimeResponse response)
        Parameters:
        response - the wrapped response
    • Method Detail

      • setResponse

        public void setResponse​(MimeResponse response)
        Sets the response object being wrapped.
        Parameters:
        response - the response to set
        Throws:
        IllegalArgumentException - if the response is null.
      • getCharacterEncoding

        public String getCharacterEncoding()
        Description copied from interface: MimeResponse
        Returns the name of the charset used for the MIME body sent in this response.

        See RFC 2047 for more information about character encoding and MIME.

        Specified by:
        getCharacterEncoding in interface MimeResponse
        Returns:
        a String specifying the name of the charset, for example, ISO-8859-1
      • getLocale

        public Locale getLocale()
        Description copied from interface: MimeResponse
        Returns the locale assigned to the response.
        Specified by:
        getLocale in interface MimeResponse
        Returns:
        Locale of this response
      • getCacheControl

        public CacheControl getCacheControl()
        Description copied from interface: MimeResponse
        Returns the cache control object allowing to set specific cache settings valid for the markup returned in this response.
        Specified by:
        getCacheControl in interface MimeResponse
        Returns:
        Cache control for the current response.
      • createActionURL

        public <T extends PortletURL & ActionURL> T createActionURL()
                                                             throws IllegalStateException
        Description copied from interface: MimeResponse
        Creates an action URL targeting the portlet. Action URLs are used to create forms or links that, when triggered, update the render state in a non-idempotent manner.

        If a request is triggered by the URL, it results in an action request.

        The returned action URL will not contain any private render parameters per default not contain any parameters from the current request.

        The returned URL can be further extended by adding portlet-specific action parameters, portlet mode, and window state. If no additional portlet mode, window state or security modifier is set on the URL, the values from the current render or resource request are preserved.

        Public render parameters do not need to be explicitly added to the returned action URL, unless the public render parameter value is to be changed. Any public render parameters associated with the portlet will automatically be available during action request processing resulting from activation of the URL.

        If a public render parameter value is set or removed on an action URL, then the public render parameter will be set to the new value or removed when the URL is activated.

        The effect of this method is the same as calling MimeResponse.createRenderURL(Copy) with the parameter set to PUBLIC.

        Specified by:
        createActionURL in interface MimeResponse
        Type Parameters:
        T - the type of the URL, which must be a subtype of both PortletURL and ActionURL
        Returns:
        a portlet action URL
        Throws:
        IllegalStateException
      • createActionURL

        public ActionURL createActionURL​(MimeResponse.Copy option)
                                  throws IllegalStateException
        Description copied from interface: MimeResponse
        Creates an action URL targeting the portlet. Action URLs are used to create forms or links that, when triggered, update the render state in a non-idempotent manner.

        If a request is triggered by the URL, it results in an action request.

        The new action URL will contain render parameters from the current request as specified by the option parameter.

        NONE
        All public and private parameters are removed from the URL.
        ALL
        The public and private parameters governing the current request are added to the URL.
        PUBLIC
        Only public parameters governing the current request are added to the URL.

        The returned URL can be further extended by adding action parameters, portlet mode, and window state. If no additional portlet mode, window state or security modifier is set on the URL, the values from the current render or resource request are preserved.

        If a public render parameter value is set or removed on an action URL, then the public render parameter will be set to the new value or removed when the URL is activated.

        Specified by:
        createActionURL in interface MimeResponse
        Parameters:
        option - Specifies how current parameters are to be copied to the URL
        Returns:
        a portlet action URL
        Throws:
        IllegalStateException
        See Also:
        MimeResponse.Copy
      • createRenderURL

        public <T extends PortletURL & RenderURL> T createRenderURL()
                                                             throws IllegalStateException
        Description copied from interface: MimeResponse
        Creates a render URL targeting the portlet. Render URLs cause idempotent requests that move the portlet to a new view state, for example, to view a different page of data.

        If a request is triggered by the URL, it results in a render request.

        The returned render URL will not contain any private render parameters from the current request.

        The created URL will per default not contain any parameters of the current render request.

        The returned URL can be further extended by adding portlet-specific render parameters, portlet mode, and window state. If no portlet mode, window state or security modifier is set on the URL, the values from the current render or resource request are preserved.

        Public render parameters do not need to be explicitly added to the returned render URL, unless the public render parameter value is to be changed. Any public render parameters associated with the portlet will automatically be available during render request processing resulting from activation of the URL.

        If a public render parameter value is set or removed on a render URL, then the public render parameter will be set to the new value or removed when the URL is activated.

        The effect of this method is the same as calling MimeResponse.createRenderURL(Copy) with the parameter set to PUBLIC.

        Specified by:
        createRenderURL in interface MimeResponse
        Type Parameters:
        T - the type of the URL, which must be a subtype of both PortletURL and RenderURL
        Returns:
        a portlet render URL
        Throws:
        IllegalStateException
      • createRenderURL

        public RenderURL createRenderURL​(MimeResponse.Copy option)
                                  throws IllegalStateException
        Description copied from interface: MimeResponse
        Creates a render URL targeting the portlet. Render URLs cause idempotent requests that move the portlet to a new view state, for example, to view a different page of data.

        If a request is triggered by the URL, it results in a render request.

        The new render URL will contain render parameters from the current request as specified by the option parameter.

        NONE
        All public and private parameters are removed from the URL.
        ALL
        The public and private parameters governing the current request are added to the URL.
        PUBLIC
        Only public parameters governing the current request are added to the URL.
        The URL can be further extended by adding render parameters, portlet mode, and window state. If no additional portlet mode, window state or security modifier is set on the URL, the values from the current render or resource request are preserved.

        If a public render parameter value is set or removed on a render URL, then the public render parameter will be set to the new value or removed when the URL is activated.

        Specified by:
        createRenderURL in interface MimeResponse
        Parameters:
        option - Specifies how current parameters are to be copied to the URL
        Returns:
        a portlet render URL
        Throws:
        IllegalStateException
        See Also:
        MimeResponse.Copy
      • createResourceURL

        public ResourceURL createResourceURL()
                                      throws IllegalStateException
        Description copied from interface: MimeResponse
        Creates a resource URL targeting the portlet. Resource URLs are used to trigger requests for content that applies to the current portlet view state.

        If a request is triggered by the ResourceURL, it results in a serve resource request of the ResourceServingPortlet interface.

        The security settings can be changed for the URL. If the security settings are not explicitly set, the values governing the current request are preserved. The current render parameters, portlet mode, and window state are preserved depending on the cacheability setting for the returned resource URL.

        If cacheability is set to PORTLET or PAGE, the values of the render parameters, portlet mode, and window state are preserved. Otherwise, they will not be preserved.

        If allowed by the cacheability setting, public and private render parameters are added to the URL with their current values. The render parameter values cannot be changed on the URL.

        The URL can be further extended by adding portlet-specific resource parameters.

        The URL will contain the current cacheability setting of the parent resource by default. If no parent resource is available, PAGE is the default.

        If a request is triggered by the PortletURL, it results in a serve resource request of the ResourceServingPortlet interface.

        The returned URL can be further extended by adding portlet-specific parameters .

        The created URL will by default contain the current cacheability setting of the parent resource. If no parent resource is available, PAGE is the default.

        Specified by:
        createResourceURL in interface MimeResponse
        Returns:
        a portlet resource URL
        Throws:
        IllegalStateException