|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.portlet.filter.PortletResponseWrapper
javax.portlet.filter.EventResponseWrapper
public class EventResponseWrapper
The EventResponseWrapper provides a convenient
implementation of the EventResponse interface
that can be subclassed by developers wishing to adapt the response.
This class implements the Wrapper or Decorator pattern.
Methods default to calling through to the wrapped response object.
EventResponse| Constructor Summary | |
|---|---|
EventResponseWrapper(EventResponse response)
Creates an EventResponse adaptor
wrapping the given response object. |
|
| Method Summary | |
|---|---|
PortletMode |
getPortletMode()
The default behavior of this method is to call getPortletMode() on the wrapped response object. |
java.util.Map<java.lang.String,java.lang.String[]> |
getRenderParameterMap()
The default behavior of this method is to call getRenderParameterMap() on the wrapped response object. |
EventResponse |
getResponse()
Return the wrapped response object. |
WindowState |
getWindowState()
The default behavior of this method is to call getWindowState() on the wrapped response object. |
void |
removePublicRenderParameter(java.lang.String name)
The default behavior of this method is to call removePublicRenderParameter() on the wrapped response object. |
void |
setEvent(javax.xml.namespace.QName name,
java.io.Serializable value)
The default behavior of this method is to call setEvent(name, value) on the wrapped response object. |
void |
setEvent(java.lang.String name,
java.io.Serializable value)
The default behavior of this method is to call setEvent() on the wrapped response object. |
void |
setPortletMode(PortletMode portletMode)
The default behavior of this method is to call setPortletMode(portletMode) on the wrapped response object. |
void |
setRenderParameter(java.lang.String key,
java.lang.String value)
The default behavior of this method is to call setRenderParameter(key, value) on the wrapped response object. |
void |
setRenderParameter(java.lang.String key,
java.lang.String[] values)
The default behavior of this method is to call setRenderParameter(key, value) on the wrapped response object. |
void |
setRenderParameters(EventRequest request)
The default behavior of this method is to call setRenderParameters() on the wrapped response object. |
void |
setRenderParameters(java.util.Map<java.lang.String,java.lang.String[]> parameters)
The default behavior of this method is to call setRenderParameters(parameters) on the wrapped response object. |
void |
setResponse(EventResponse response)
Sets the response object being wrapped. |
void |
setWindowState(WindowState windowState)
The default behavior of this method is to call setWindowState(windowState) on the wrapped response object. |
| Methods inherited from class javax.portlet.filter.PortletResponseWrapper |
|---|
addProperty, addProperty, addProperty, createElement, encodeURL, getNamespace, setProperty, setResponse |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.portlet.PortletResponse |
|---|
addProperty, addProperty, addProperty, createElement, encodeURL, getNamespace, setProperty |
| Constructor Detail |
|---|
public EventResponseWrapper(EventResponse response)
EventResponse adaptor
wrapping the given response object.
response - the event response to wrap
java.lang.IllegalArgumentException - if the response is null| Method Detail |
|---|
public void setEvent(javax.xml.namespace.QName name,
java.io.Serializable value)
setEvent(name, value) on the wrapped response object.
setEvent in interface StateAwareResponsename - the event name to publish, must not be nullvalue - the value of this event, must have a valid JAXB binding and
be serializable, or null.
public void setPortletMode(PortletMode portletMode)
throws PortletModeException
setPortletMode(portletMode) on the wrapped response object.
setPortletMode in interface StateAwareResponseportletMode - the new portlet mode
PortletModeException - if the portlet cannot switch to this portlet mode, because
the portlet or portal does not support it for this markup,
or the current user is not allowed to switch to this
portlet mode. To avoid this exception the portlet can
check the allowed portlet modes with
Request.isPortletModeAllowed().
public void setRenderParameter(java.lang.String key,
java.lang.String value)
setRenderParameter(key, value) on the wrapped response object.
setRenderParameter in interface StateAwareResponsekey - key of the render parametervalue - value of the render parameter
public void setRenderParameter(java.lang.String key,
java.lang.String[] values)
setRenderParameter(key, value) on the wrapped response object.
setRenderParameter in interface StateAwareResponsekey - key of the render parametervalues - values of the render parameterpublic void setRenderParameters(java.util.Map<java.lang.String,java.lang.String[]> parameters)
setRenderParameters(parameters) on the wrapped response object.
setRenderParameters in interface StateAwareResponseparameters - Map containing parameter names for the render phase as keys
and parameter values as map values. The keys in the parameter
map must be of type String. The values in the parameter map
must be of type String array (String[]).
public void setWindowState(WindowState windowState)
throws WindowStateException
setWindowState(windowState) on the wrapped response object.
setWindowState in interface StateAwareResponsewindowState - the new portlet window state
WindowStateException - if the portlet cannot switch to the specified window
state. To avoid this exception the portlet can check the
allowed window states with
Request.isWindowStateAllowed().WindowStatepublic EventResponse getResponse()
getResponse in class PortletResponseWrapperpublic void setResponse(EventResponse response)
response - the response to set
java.lang.IllegalArgumentException - if the response is null.public PortletMode getPortletMode()
getPortletMode() on the wrapped response object.
getPortletMode in interface StateAwareResponsenull if none is setpublic java.util.Map<java.lang.String,java.lang.String[]> getRenderParameterMap()
getRenderParameterMap() on the wrapped response object.
getRenderParameterMap in interface StateAwareResponseMap containing render parameter names as keys and
parameter values as map values, or an empty Map if
no parameters exist. The keys in the parameter map are of type
String. The values in the parameter map are of type String array (String[]).public WindowState getWindowState()
getWindowState() on the wrapped response object.
getWindowState in interface StateAwareResponsenull if none is setpublic void setRenderParameters(EventRequest request)
setRenderParameters() on the wrapped response object.
setRenderParameters in interface EventResponserequest - The request the portlet has been provided
with by the portlet container for the current
processEvent call, must not be
null.
public void setEvent(java.lang.String name,
java.io.Serializable value)
setEvent() on the wrapped response object.
setEvent in interface StateAwareResponsename - the local part of the event name to publish, must not be nullvalue - the value of this event, must have a valid JAXB binding and
be serializable, or null.public void removePublicRenderParameter(java.lang.String name)
removePublicRenderParameter() on the wrapped response object.
removePublicRenderParameter in interface StateAwareResponsename - a String specifying
the name of the public render parameter to be removed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||