Class RenderResponseWrapper

  • All Implemented Interfaces:
    MimeResponse, PortletResponse, RenderResponse

    public class RenderResponseWrapper
    extends MimeResponseWrapper
    implements RenderResponse
    The RenderResponseWrapper provides a convenient implementation of the RenderResponse interface that can be subclassed by developers. This class implements the Wrapper or Decorator pattern. Methods default to calling through to the wrapped response object.
    Since:
    2.0
    See Also:
    RenderResponse
    • Constructor Detail

      • RenderResponseWrapper

        public RenderResponseWrapper​(RenderResponse response)
        Creates an RenderResponse adaptor wrapping the given response object.
        Parameters:
        response - the event response to wrap
        Throws:
        IllegalArgumentException - if the response is null
    • Method Detail

      • setResponse

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

        @Deprecated
        public void setTitle​(String title)
        Deprecated.
        Description copied from interface: RenderResponse
        This method sets the title of the portlet.

        The value can be a text String

        Specified by:
        setTitle in interface RenderResponse
        Parameters:
        title - portlet title as text String or resource URI
      • setNextPossiblePortletModes

        public void setNextPossiblePortletModes​(Collection<? extends PortletMode> portletModes)
        Description copied from interface: RenderResponse
        This method allows the portlet to tell the portal the next possible portlet modes that the make sense from the portlet point of view.

        If set, the portal should honor these enumeration of portlet modes and only provide the end user with choices to the provided portlet modes or a subset of these modes based on access control considerations.

        If the portlet does not set any next possible portlet modes the default is that all portlet modes that the portlet has defined supporting in the portlet deployment descriptor are meaningful new portlet modes.

        Specified by:
        setNextPossiblePortletModes in interface RenderResponse
        Parameters:
        portletModes - Enumeration of objects of type PortletMode or any subtype of PortletMode with the next possible portlet modes that the make sense from the portlet point of view, must not be null or an empty enumeration.