org.apache.pluto.internal.impl
Class RenderResponseImpl

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.MimeResponseImpl
                  extended by org.apache.pluto.internal.impl.RenderResponseImpl
All Implemented Interfaces:
MimeResponse, PortletResponse, RenderResponse, javax.servlet.http.HttpServletResponse, javax.servlet.ServletResponse, InternalPortletResponse, InternalRenderResponse

public class RenderResponseImpl
extends MimeResponseImpl
implements RenderResponse, InternalRenderResponse

Implementation of the javax.portlet.RenderResponse interface.


Field Summary
 
Fields inherited from interface javax.portlet.MimeResponse
CACHE_SCOPE, ETAG, EXPIRATION_CACHE, MARKUP_HEAD_ELEMENT, NAMESPACED_RESPONSE, PRIVATE_SCOPE, PUBLIC_SCOPE, USE_CACHED_CONTENT
 
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
RenderResponseImpl(PortletContainer container, InternalPortletWindow internalPortletWindow, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse)
           
 
Method Summary
 int getBufferSize()
          Returns the actual buffer size used for the response.
 String getContentType()
          Returns the MIME type that can be used to contribute markup to the render response.
 void setCharacterEncoding(String arg0)
           
 void setContentLength(int arg0)
           
 void setContentType(String contentType)
          Sets the MIME type for the render response.
 void setLocale(Locale arg0)
           
 void setNextPossiblePortletModes(Collection<PortletMode> portletModes)
          This method allows the portlet to tell the portal the next possible portlet modes that the make sense from the portlet point of view.
 void setTitle(String title)
          This method sets the title of the portlet.
 
Methods inherited from class org.apache.pluto.internal.impl.MimeResponseImpl
addDateHeader, addHeader, addIntHeader, flushBuffer, getCacheControl, getCharacterEncoding, getLocale, getOutputStream, getPortletOutputStream, getWriter, isCommitted, isValidContentType, reset, resetBuffer, sendRedirect, setBufferSize, setDateHeader, setHeader, setIntHeader, setStatus, setStatus
 
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.InternalPortletResponse
getInternalPortletWindow, isForwarded, isIncluded, setForwarded, setIncluded
 
Methods inherited from interface javax.portlet.MimeResponse
addProperty, createActionURL, createRenderURL, createResourceURL, flushBuffer, getCacheControl, getCharacterEncoding, getLocale, getPortletOutputStream, getWriter, isCommitted, reset, resetBuffer, setBufferSize
 
Methods inherited from interface javax.portlet.PortletResponse
addProperty, addProperty, createElement, encodeURL, getNamespace, setProperty
 

Constructor Detail

RenderResponseImpl

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

setTitle

public void setTitle(String title)
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<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 PortletMode objects with the next possible portlet modes that the make sense from the portlet point of view, must not be null or an empty enumeration.

setCharacterEncoding

public void setCharacterEncoding(String arg0)
Specified by:
setCharacterEncoding in interface javax.servlet.ServletResponse
Overrides:
setCharacterEncoding in class javax.servlet.ServletResponseWrapper

setContentLength

public void setContentLength(int arg0)
Specified by:
setContentLength in interface javax.servlet.ServletResponse
Overrides:
setContentLength in class javax.servlet.ServletResponseWrapper

setLocale

public void setLocale(Locale arg0)
Specified by:
setLocale in interface javax.servlet.ServletResponse
Overrides:
setLocale in class javax.servlet.ServletResponseWrapper

getBufferSize

public int getBufferSize()
Description copied from interface: MimeResponse
Returns the actual buffer size used for the response. If no buffering is used, this method returns 0.

Specified by:
getBufferSize in interface MimeResponse
Specified by:
getBufferSize in interface javax.servlet.ServletResponse
Overrides:
getBufferSize in class javax.servlet.ServletResponseWrapper
Returns:
the actual buffer size used
See Also:
MimeResponse.setBufferSize(int), MimeResponse.flushBuffer(), MimeResponse.isCommitted(), MimeResponse.reset()

setContentType

public void setContentType(String contentType)
                    throws IllegalArgumentException
Description copied from interface: MimeResponse
Sets the MIME type for the render response. The portlet must set the content type before calling MimeResponse.getWriter() or MimeResponse.getPortletOutputStream().

Calling setContentType after getWriter or getOutputStream does not change the content type.

The portlet container will ignore any character encoding specified as part of the content type for render calls.

Specified by:
setContentType in interface MimeResponse
Specified by:
setContentType in interface javax.servlet.ServletResponse
Overrides:
setContentType in class javax.servlet.ServletResponseWrapper
Parameters:
contentType - the content MIME type
Throws:
IllegalArgumentException - for render calls if the given type is not in the list returned by PortletRequest.getResponseContentTypes
See Also:
PortletRequest.getResponseContentTypes(), MimeResponse.getContentType()

getContentType

public String getContentType()
Description copied from interface: MimeResponse
Returns the MIME type that can be used to contribute markup to the render response.

If no content type was set previously using the MimeResponse.setContentType(java.lang.String) method this method returns null.

Specified by:
getContentType in interface MimeResponse
Specified by:
getContentType in interface javax.servlet.ServletResponse
Overrides:
getContentType in class javax.servlet.ServletResponseWrapper
Returns:
the MIME type of the response, or null if no content type is set
See Also:
MimeResponse.setContentType(java.lang.String)


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