org.apache.cocoon.environment.portlet
Class ActionRequest

java.lang.Object
  extended by org.apache.cocoon.environment.portlet.PortletRequest
      extended by org.apache.cocoon.environment.portlet.ActionRequest
All Implemented Interfaces:
Request

public final class ActionRequest
extends PortletRequest

Implements the Request interface for the JSR-168 (Portlet) environment.

Version:
CVS $Id: ActionRequest.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Alex Rudnev, Vadim Gritsenko

Field Summary
 
Fields inherited from class org.apache.cocoon.environment.portlet.PortletRequest
portletRequestURI
 
Constructor Summary
protected ActionRequest(String servletPath, String pathInfo, javax.portlet.ActionRequest request, PortletEnvironment environment)
          Creates a ActionRequest based on a real ActionRequest object
 
Method Summary
 javax.portlet.ActionRequest getActionRequest()
          Type cast portletRequest to ActionRequest
 String getCharacterEncoding()
          Returns the name of the character encoding used in the body of this request.
 int getContentLength()
          Action request provides content length for custom upload handling
 String getContentType()
          Action request provides content type for custom upload handling
 InputStream getInputStream()
           
 String getMethod()
          Action request can be always recognized by POST method
 BufferedReader getReader()
           
 
Methods inherited from class org.apache.cocoon.environment.portlet.PortletRequest
get, getAttribute, getAttributeNames, getAuthType, getCocoonSession, getCocoonSession, getContextPath, getCookieMap, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getLocale, getLocales, getParameter, getParameterMap, getParameterNames, getParameterValues, getPathInfo, getPathTranslated, getPortalContext, getPortletMode, getPortletRequest, getPortletSession, getPortletSession, getPreferences, getProperties, getProperty, getPropertyNames, getProtocol, getQueryString, getRemoteAddr, getRemoteHost, getRemoteUser, getRequestedSessionId, getRequestURI, getResponseContentType, getResponseContentTypes, getScheme, getServerName, getServerPort, getServletPath, getSession, getSession, getSitemapURI, getSitemapURIPrefix, getUserPrincipal, getWindowState, isPortletModeAllowed, isRequestedSessionIdFromCookie, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isSecure, isUserInRole, isWindowStateAllowed, removeAttribute, setAttribute, setCharacterEncoding, setContainerEncoding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionRequest

protected ActionRequest(String servletPath,
                        String pathInfo,
                        javax.portlet.ActionRequest request,
                        PortletEnvironment environment)
Creates a ActionRequest based on a real ActionRequest object

Method Detail

getCharacterEncoding

public String getCharacterEncoding()
Description copied from interface: Request
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 Request
Overrides:
getCharacterEncoding in class PortletRequest
Returns:
a String containing the name of the chararacter encoding, or null if the request does not specify a character encoding

getMethod

public String getMethod()
Action request can be always recognized by POST method

Specified by:
getMethod in interface Request
Specified by:
getMethod in class PortletRequest
Returns:
a String specifying the name of the method with which this request was made

getActionRequest

public javax.portlet.ActionRequest getActionRequest()
Type cast portletRequest to ActionRequest

Returns:
type casted portletRequest

getInputStream

public InputStream getInputStream()
                           throws IOException
Throws:
IOException

getReader

public BufferedReader getReader()
                         throws IOException
Throws:
IOException

getContentLength

public int getContentLength()
Action request provides content length for custom upload handling

Specified by:
getContentLength in interface Request
Overrides:
getContentLength in class PortletRequest
Returns:
an integer containing the length of the request body or -1 if the length is not known

getContentType

public String getContentType()
Action request provides content type for custom upload handling

Specified by:
getContentType in interface Request
Overrides:
getContentType in class PortletRequest
Returns:
a String containing the name of the MIME type of the request, or -1 if the type is not known


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.