org.apache.struts2.portlet.result

## Class PortletResultHelperJSR168

- java.lang.Object
- - org.apache.struts2.portlet.result.PortletResultHelperJSR168

- All Implemented Interfaces:
    PortletResultHelper

      public class PortletResultHelperJSR168
      extends Object
      implements PortletResultHelper

  PortletResultHelperJSR168 implements PortletResultHelper for Portlet 1.0 API (JSR168).
  Author:
    Rene Gielen

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PortletResultHelperJSR168()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `include(javax.portlet.PortletRequestDispatcher dispatcher, String contentType, javax.portlet.PortletRequest request, javax.portlet.PortletResponse response)` Call a dispatcher's include method, abstracted from the used Portlet API version.
    `void` | `setPortletMode(javax.portlet.PortletResponse response, javax.portlet.PortletMode portletMode)` Set a portlet mode, abstracted from the used Portlet API version.
    `void` | `setRenderParameter(javax.portlet.PortletResponse response, String key, String value)` Set a render parameter, abstracted from the used Portlet API version.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PortletResultHelperJSR168

          public PortletResultHelperJSR168()

  - ### Method Detail

    - #### setRenderParameter

          public void setRenderParameter(javax.portlet.PortletResponse response,
                                String key,
                                String value)

      Set a render parameter, abstracted from the used Portlet API version. This implementation assumes that the given response must be a `ActionResponse`, as JSR168 implies.
      Specified by:
        `setRenderParameter` in interface `PortletResultHelper`
      Parameters:
        `response` - The response to set the parameter on.
        `key` - The parameter key to set.
        `value` - The parameter value to set.

    - #### setPortletMode

          public void setPortletMode(javax.portlet.PortletResponse response,
                            javax.portlet.PortletMode portletMode)
                              throws javax.portlet.PortletModeException

      Set a portlet mode, abstracted from the used Portlet API version. This implementation assumes that the given response must be a `ActionResponse`, as JSR168 implies.
      Specified by:
        `setPortletMode` in interface `PortletResultHelper`
      Parameters:
        `response` - The response to set the portlet mode on.
        `portletMode` - The portlet mode to set.
      Throws:
        `javax.portlet.PortletModeException` - in case of errors during setting of portlet mode

    - #### include

          public void include(javax.portlet.PortletRequestDispatcher dispatcher,
                     String contentType,
                     javax.portlet.PortletRequest request,
                     javax.portlet.PortletResponse response)
                       throws IOException,
                              javax.portlet.PortletException

      Call a dispatcher's include method, abstracted from the used Portlet API version. This implementation assumes that the given the request must be a `RenderRequest` and the response must be a `RenderResponse`, as JSR168 implies.
      Specified by:
        `include` in interface `PortletResultHelper`
      Parameters:
        `dispatcher` - The dispatcher to call the include method on.
        `contentType` - The content type to set for the response.
        `request` - The request to use for including
        `response` - The response to use for including
      Throws:
        `IOException` - in case of any I/O errors
        `javax.portlet.PortletException` - in case of any portlet errors

Copyright © 2000–2020 Apache Software Foundation. All rights reserved.