Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.portal.portlet.impl.jsr168.api
Class ActionRequestImpl

    java.lang.Object
      org.jboss.portal.portlet.impl.jsr168.api.PortletRequestImpl
          org.jboss.portal.portlet.impl.jsr168.api.ActionRequestImpl

All Implemented Interfaces:
  ActionRequest, PortletRequest

Direct Known Subclasses:
  JBossActionRequest

    public class ActionRequestImpl

extends PortletRequestImpl
implements ActionRequest

Version:
  $Revision: 6697 $
Author:
  Julien Viet

Field Summary
`protected ActionContext` | `actionContext` .

Fields inherited from class org.jboss.portal.portlet.impl.jsr168.api.PortletRequestImpl
`attributes, container, dreq, invocation, log, parameters, portalContext, preferences, psession, requestContext, securityContext, sessionStatus, userContext, windowContext`

Fields inherited from interface javax.portlet.PortletRequest
`BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH, USER_INFO`

Constructor Summary
`ActionRequestImpl(ActionInvocation invocation)`

Method Summary
`java.lang.String` | `getCharacterEncoding()` Returns the name of the character encoding used in the body of this request.
`int` | `getContentLength()` Returns the length, in bytes, of the request body which is made available by the input stream, or -1 if the length is not known.
`java.lang.String` | `getContentType()` Returns the MIME type of the body of the request, or null if the type is not known.
`java.io.InputStream` | `getPortletInputStream()` Retrieves the body of the HTTP request from client to portal as binary data using an `InputStream`.
`java.io.BufferedReader` | `getReader()` Retrieves the body of the HTTP request from the client to the portal as character data using a `BufferedReader`.
`void` | `setCharacterEncoding(java.lang.String s)` Overrides the name of the character encoding used in the body of this request.

Methods inherited from class org.jboss.portal.portlet.impl.jsr168.api.PortletRequestImpl
`getAttribute, getAttributeNames, getAttributes, getAuthType, getContextPath, getLocale, getLocales, getParameter, getParameterMap, getParameterNames, getParameterValues, getPortalContext, getPortletMode, getPortletSession, getPortletSession, getPreferences, getProperties, getProperty, getPropertyNames, getRemoteUser, getRequestedSessionId, getResponseContentType, getResponseContentTypes, getScheme, getServerName, getServerPort, getUserPrincipal, getWindowState, isPortletModeAllowed, isRequestedSessionIdValid, isSecure, isUserInRole, isWindowStateAllowed, removeAttribute, setAttribute`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface javax.portlet.PortletRequest
`getAttribute, getAttributeNames, getAuthType, getContextPath, getLocale, getLocales, getParameter, getParameterMap, getParameterNames, getParameterValues, getPortalContext, getPortletMode, getPortletSession, getPortletSession, getPreferences, getProperties, getProperty, getPropertyNames, getRemoteUser, getRequestedSessionId, getResponseContentType, getResponseContentTypes, getScheme, getServerName, getServerPort, getUserPrincipal, getWindowState, isPortletModeAllowed, isRequestedSessionIdValid, isSecure, isUserInRole, isWindowStateAllowed, removeAttribute, setAttribute`

Field Detail

### actionContext

    protected final ActionContext actionContext

  .

Constructor Detail

### ActionRequestImpl

    public ActionRequestImpl(ActionInvocation invocation)

Method Detail

### getPortletInputStream

    public java.io.InputStream getPortletInputStream()
                                              throws java.io.IOException

  Description copied from interface: `ActionRequest`
  Retrieves the body of the HTTP request from client to portal as binary data using an `InputStream`. Either this method or `ActionRequest.getReader()` may be called to read the body, but not both.

  For HTTP POST data of type application/x-www-form-urlencoded this method throws an `IllegalStateException` as this data has been already processed by the portal/portlet-container and is available as request parameters.

  Specified by:
    `getPortletInputStream` in interface `ActionRequest`
  Returns:
    an input stream containing the body of the request
  Throws:
    `java.io.IOException` - if an input or output exception occurred

### setCharacterEncoding

    public void setCharacterEncoding(java.lang.String s)
                              throws java.io.UnsupportedEncodingException

  Description copied from interface: `ActionRequest`
  Overrides the name of the character encoding used in the body of this request. This method must be called prior to reading input using `ActionRequest.getReader()` or `ActionRequest.getPortletInputStream()`.

  This method only sets the character set for the Reader that the `ActionRequest.getReader()` method returns.

  Specified by:
    `setCharacterEncoding` in interface `ActionRequest`
  Parameters:
    `s` - a `String` containing the name of the chararacter encoding.
  Throws:
    `java.io.UnsupportedEncodingException` - if this is not a valid encoding

### getReader

    public java.io.BufferedReader getReader()
                                     throws java.io.UnsupportedEncodingException,
                                            java.io.IOException

  Description copied from interface: `ActionRequest`
  Retrieves the body of the HTTP request from the client to the portal as character data using a `BufferedReader`. The reader translates the character data according to the character encoding used on the body. Either this method or `ActionRequest.getPortletInputStream()` may be called to read the body, not both.

  For HTTP POST data of type application/x-www-form-urlencoded this method throws an `IllegalStateException` as this data has been already processed by the portal/portlet-container and is available as request parameters.

  Specified by:
    `getReader` in interface `ActionRequest`
  Returns:
    a `BufferedReader` containing the body of the request
  Throws:
    `java.io.UnsupportedEncodingException` - if the character set encoding used is not supported and the text cannot be decoded
    `java.io.IOException` - if an input or output exception occurred
  See Also:
    `ActionRequest.getPortletInputStream()`

### getCharacterEncoding

    public java.lang.String getCharacterEncoding()

  Description copied from interface: `ActionRequest`
  Returns the name of the character encoding used in the body of this request. This method returns `null` if the request does not specify a character encoding.

  Specified by:
    `getCharacterEncoding` in interface `ActionRequest`
  Returns:
    a `String` containing the name of the chararacter encoding, or `null` if the request does not specify a character encoding.

### getContentType

    public java.lang.String getContentType()

  Description copied from interface: `ActionRequest`
  Returns the MIME type of the body of the request, or null if the type is not known.

  Specified by:
    `getContentType` in interface `ActionRequest`
  Returns:
    a `String` containing the name of the MIME type of the request, or null if the type is not known.

### getContentLength

    public int getContentLength()

  Description copied from interface: `ActionRequest`
  Returns the length, in bytes, of the request body which is made available by the input stream, or -1 if the length is not known.

  Specified by:
    `getContentLength` in interface `ActionRequest`
  Returns:
    an integer containing the length of the request body or -1 if the length is not known

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD