public class HeaderResponseWrapper extends MimeResponseWrapper implements HeaderResponse
HeaderResponseWrapperprovides a convenient implementation of the
HeaderResponseinterface that can be subclassed by developers. This class implements the Wrapper or Decorator pattern. Methods default to calling through to the wrapped Response object.
|Constructor and Description|
|Modifier and Type||Method and Description|
Adds a dependency on a page-level resource that is managed by the portal.
Adds a dependency on a page-level resource that is managed by the portal and adds a resource for addition to the page for the dependency.
Return the wrapped response object.
Sets the response object being wrapped.
This method sets the title of the portlet.
createActionURL, createActionURL, createRenderURL, createRenderURL, createResourceURL, flushBuffer, getBufferSize, getCacheControl, getCharacterEncoding, getContentType, getLocale, getPortletOutputStream, getWriter, isCommitted, reset, resetBuffer, setBufferSize, setContentType, setResponse
addProperty, addProperty, addProperty, createElement, encodeURL, getNamespace, getProperty, getPropertyNames, getPropertyValues, setProperty, setResponse
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPortletOutputStream, getWriter, setContentType
createActionURL, createActionURL, createRenderURL, createRenderURL, createResourceURL, flushBuffer, getBufferSize, getCacheControl, getCharacterEncoding, getContentType, getLocale, isCommitted, reset, resetBuffer, setBufferSize
public HeaderResponseWrapper(HeaderResponse response)
public HeaderResponse getResponse()
public void setResponse(HeaderResponse response)
response- the response to set
IllegalArgumentException- if the response is null.
public void setTitle(String title)
The value can be a text String
When a portlet is aggregated onto a page, it may designate resources such as
that it needs to have on the page in order to operate correctly.
These resources typically should be added to the aggregated document
Such resources are known as portlet dependencies.
The portal implementation is responsible for adding the portlet dependencies to the page during aggregation. The resources declared as dependencies are typically such that they should be added to the page only a single time, but may be used by multiple portlets.
Portlet dependencies may be configured statically either through annotations or through the portlet deployment descriptor. The resources to satisfy such dependencies will be made available on all pages on which the portlet is rendered.
The dependency added dynamically through this method is added to the statically declared dependencies for the portlet for the current rendering cycle only.
This method should only be used to add portlet dependencies that can potentially be
required by or shared with other portlets as well.
should be added to to document head section using the
PortletResponse#addProperty(String, Element) method or by using either the
OutputStream object obtained
The manner in which the portal maps the specified name, scope, and version to specific resources is left to the portal implementation.
name- the resource name
scope- the resource scope, may be
version- the resource version, may be
HeaderResponse.addDependency(String, String, String) for a discussion of
The specified markup element representing the resource must be suitable for inclusion
in the aggregated portal document
It will generally be either a
This method does not directly place markup into the aggregated page document. The aggregating portal will use the identifying information name, scope, and version along with identifying information for other available page resources to determine which resources will be added to the page.
For example, if a portlet provides a resource with a version of 2.0.0 but another portlet on the same page provides a resource with the same name and scope but a version of 2.1.0, the aggregating portal may choose to include the later version of the resource on the page.
Java Portlet 3.0 API Specification. See the Copyright and License provided with this distribution. Use is subject to license terms.