org.apache.pluto.internal.impl
Class ActionResponseImpl

java.lang.Object
  extended by javax.servlet.ServletResponseWrapper
      extended by javax.servlet.http.HttpServletResponseWrapper
          extended by org.apache.pluto.internal.impl.PortletResponseImpl
              extended by org.apache.pluto.internal.impl.StateAwareResponseImpl
                  extended by org.apache.pluto.internal.impl.ActionResponseImpl
All Implemented Interfaces:
ActionResponse, PortletResponse, StateAwareResponse, javax.servlet.http.HttpServletResponse, javax.servlet.ServletResponse, InternalActionResponse, InternalPortletResponse

public class ActionResponseImpl
extends StateAwareResponseImpl
implements ActionResponse, InternalActionResponse


Field Summary
 
Fields inherited from class org.apache.pluto.internal.impl.StateAwareResponseImpl
callback, redirected
 
Fields inherited from interface javax.servlet.http.HttpServletResponse
SC_ACCEPTED, SC_BAD_GATEWAY, SC_BAD_REQUEST, SC_CONFLICT, SC_CONTINUE, SC_CREATED, SC_EXPECTATION_FAILED, SC_FORBIDDEN, SC_FOUND, SC_GATEWAY_TIMEOUT, SC_GONE, SC_HTTP_VERSION_NOT_SUPPORTED, SC_INTERNAL_SERVER_ERROR, SC_LENGTH_REQUIRED, SC_METHOD_NOT_ALLOWED, SC_MOVED_PERMANENTLY, SC_MOVED_TEMPORARILY, SC_MULTIPLE_CHOICES, SC_NO_CONTENT, SC_NON_AUTHORITATIVE_INFORMATION, SC_NOT_ACCEPTABLE, SC_NOT_FOUND, SC_NOT_IMPLEMENTED, SC_NOT_MODIFIED, SC_OK, SC_PARTIAL_CONTENT, SC_PAYMENT_REQUIRED, SC_PRECONDITION_FAILED, SC_PROXY_AUTHENTICATION_REQUIRED, SC_REQUEST_ENTITY_TOO_LARGE, SC_REQUEST_TIMEOUT, SC_REQUEST_URI_TOO_LONG, SC_REQUESTED_RANGE_NOT_SATISFIABLE, SC_RESET_CONTENT, SC_SEE_OTHER, SC_SERVICE_UNAVAILABLE, SC_SWITCHING_PROTOCOLS, SC_TEMPORARY_REDIRECT, SC_UNAUTHORIZED, SC_UNSUPPORTED_MEDIA_TYPE, SC_USE_PROXY
 
Constructor Summary
ActionResponseImpl(PortletContainer container, InternalPortletWindow internalPortletWindow, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse)
           
 
Method Summary
 void sendRedirect(java.lang.String location)
          Instructs the portlet container to send a redirect response to the client using the specified redirect location URL.
 void sendRedirect(java.lang.String location, java.lang.String renderUrlParamName)
          Instructs the portlet container to send a redirect response to the client using the specified redirect location URL and encode a render URL as parameter on the redirect URL.
 
Methods inherited from class org.apache.pluto.internal.impl.StateAwareResponseImpl
addDateHeader, addHeader, addIntHeader, flushBuffer, getBufferSize, getChangedPortletMode, getChangedWindowState, getCharacterEncoding, getContentType, getLocale, getOutputStream, getPortletMode, getPublicRenderParameter, getRedirectLocation, getRenderParameterMap, getRenderParameters, getWindowState, getWriter, isCommitted, isPortletModeAllowed, isPortletModeAllowedByPortal, isPortletModeAllowedByPortlet, isWindowStateAllowed, removePublicRenderParameter, reset, resetBuffer, setBufferSize, setCharacterEncoding, setContentLength, setContentType, setDateHeader, setEvent, setEvent, setHeader, setIntHeader, setLocale, setNextPossiblePortletModes, setPortletMode, setRenderParameter, setRenderParameter, setRenderParameters, setStatus, setStatus, setWindowState
 
Methods inherited from class org.apache.pluto.internal.impl.PortletResponseImpl
addCookie, addProperty, addProperty, addProperty, addProperty, containsHeader, createActionURL, createElement, createRenderURL, createResourceURL, createResourceURL, encodeRedirectUrl, encodeRedirectURL, encodeUrl, encodeURL, getContainer, getHttpServletRequest, getHttpServletResponse, getInternalPortletWindow, getNamespace, isForwarded, isIncluded, sendError, sendError, setForwarded, setIncluded, setProperty
 
Methods inherited from class javax.servlet.ServletResponseWrapper
getResponse, setResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.pluto.internal.InternalActionResponse
encodeRedirectURL, getChangedPortletMode, getChangedWindowState, getRedirectLocation, getRenderParameters
 
Methods inherited from interface org.apache.pluto.internal.InternalPortletResponse
getInternalPortletWindow, isForwarded, isIncluded, setForwarded, setIncluded
 

Constructor Detail

ActionResponseImpl

public ActionResponseImpl(PortletContainer container,
                          InternalPortletWindow internalPortletWindow,
                          javax.servlet.http.HttpServletRequest servletRequest,
                          javax.servlet.http.HttpServletResponse servletResponse)
Method Detail

sendRedirect

public void sendRedirect(java.lang.String location)
                  throws java.io.IOException
Description copied from interface: ActionResponse
Instructs the portlet container to send a redirect response to the client using the specified redirect location URL.

This method only accepts an absolute URL (e.g. http://my.co/myportal/mywebap/myfolder/myresource.gif) or a full path URI (e.g. /myportal/mywebap/myfolder/myresource.gif). If required, the portlet container may encode the given URL before the redirection is issued to the client.

The sendRedirect method can not be invoked after any of the following methods of the ActionResponse interface has been called:

Specified by:
sendRedirect in interface ActionResponse
Specified by:
sendRedirect in interface javax.servlet.http.HttpServletResponse
Overrides:
sendRedirect in class StateAwareResponseImpl
Parameters:
location - the redirect location URL
Throws:
java.io.IOException - if an input or output exception occurs.

sendRedirect

public void sendRedirect(java.lang.String location,
                         java.lang.String renderUrlParamName)
                  throws java.io.IOException
Description copied from interface: ActionResponse
Instructs the portlet container to send a redirect response to the client using the specified redirect location URL and encode a render URL as parameter on the redirect URL.

This method only accepts an absolute URL (e.g. http://my.co/myportal/mywebap/myfolder/myresource.gif) or a full path URI (e.g. /myportal/mywebap/myfolder/myresource.gif). If required, the portlet container may encode the given URL before the redirection is issued to the client.

The portlet container will attach a render URL with the currently set portlet mode, window state and render parameters on the ActionResponse and the current public render parameters. The attached URL will be available as query parameter value under the key provided with the renderUrlParamName parameter.

New values for

are only used for creating the render URL and not remembered after the redirect is issued.

Specified by:
sendRedirect in interface ActionResponse
Parameters:
location - the redirect location URL
renderUrlParamName - name of the query parameter under which the portlet container should store a render URL to this portlet
Throws:
java.io.IOException - if an input or output exception occurs.


Copyright © 2003-2010 Apache Software Foundation. All Rights Reserved.