Package javax.portlet
Interface RenderResponse
-
- All Superinterfaces:
MimeResponse
,PortletResponse
- All Known Implementing Classes:
RenderResponseWrapper
public interface RenderResponse extends MimeResponse
TheRenderResponse
defines an object to assist a portlet in sending a response to the portal. It extends theMimeResponse
interface to provide specific render response functionality to portlets.
The portlet container creates aRenderResponse
object and passes it as argument to the portlet'srender
method.- See Also:
RenderRequest
,PortletResponse
,MimeResponse
-
-
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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
setContentType(java.lang.String type)
Sets the MIME type for the render response.void
setNextPossiblePortletModes(java.util.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(java.lang.String title)
This method sets the title of the portlet.-
Methods inherited from interface javax.portlet.MimeResponse
createActionURL, createRenderURL, createResourceURL, flushBuffer, getBufferSize, getCacheControl, getCharacterEncoding, getContentType, getLocale, getPortletOutputStream, getWriter, isCommitted, reset, resetBuffer, setBufferSize
-
Methods inherited from interface javax.portlet.PortletResponse
addProperty, addProperty, addProperty, createElement, encodeURL, getNamespace, setProperty
-
-
-
-
Method Detail
-
setTitle
void setTitle(java.lang.String title)
This method sets the title of the portlet.The value can be a text String
- Parameters:
title
- portlet title as text String or resource URI
-
setNextPossiblePortletModes
void setNextPossiblePortletModes(java.util.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.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.
- Parameters:
portletModes
-Enumeration
ofPortletMode
objects with the next possible portlet modes that the make sense from the portlet point of view, must not benull
or an empty enumeration.- Since:
- 2.0
-
setContentType
void setContentType(java.lang.String type)
Sets the MIME type for the render response. The portlet should set the content type before callingMimeResponse.getWriter()
orMimeResponse.getPortletOutputStream()
.Calling
setContentType
aftergetWriter
orgetOutputStream
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 interfaceMimeResponse
- Parameters:
type
- the content MIME type- Throws:
java.lang.IllegalArgumentException
- if the given type is not in the list returned byPortletRequest.getResponseContentTypes
- See Also:
PortletRequest.getResponseContentTypes()
,MimeResponse.getContentType()
-
-