StateAwareResponseWrapper provides a convenient
implementation of the StateAwareResponse interface
that can be subclassed by developers.
This class implements the Wrapper or Decorator pattern.
Methods default to calling through to the wrapped Response object.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public PortletMode | getPortletMode()
Implements javax.
Returns the current portlet mode of the portlet.
|
| public Map | getRenderParameterMap()
Implements javax.
Deprecated
Returns a Map of the render parameters currently set on
this response.
|
| public MutableRenderParameters | getRenderParameters()
Implements javax.
Gets the mutable render parameters.
|
| public StateAwareResponse | Returns: the wrapped responseOverrides javax. |
| public WindowState | getWindowState()
Implements javax.
Returns the current window state of the portlet.
|
| public void | removePublicRenderParameter(String
a name)String specifying
the name of the public render parameter to be removedImplements javax.
Deprecated
Removes the specified public render parameter.
|
| public void | setEvent(QName
the event name to publish, must not be name, Serializable nullthe value of this event, must have a valid JAXB binding and
be serializable, or value)null.Implements javax. |
| public void | setEvent(String
the local part of the event name to publish, must not be name, Serializable nullthe value of this event, must have a valid JAXB binding and
be serializable, or value)null.Implements javax. |
| public void | setPortletMode(PortletMode
the new portlet mode portletMode)Implements javax.
Sets the portlet mode of a portlet to the given portlet mode.
|
| public void | setRenderParameter(String
key of the render parameter key, String value of the render parameter value)Implements javax.
Deprecated
Sets
a String parameter for the render request.
|
| public void | setRenderParameter(String
key of the render parameter key, String... values of the render parameter values)Implements javax.
Deprecated
Sets
a multi-valued String parameter for the render request.
|
| public void | setRenderParameters(Map<String, String[]>
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 and may not be null or the empty string (""). The values in the parameter
map must be of type String array ( parameters)String[]).
The values array may not be null;
however, the values array elements may be null.
Implements javax.
Deprecated
Sets
a parameter map for the render request.
|
| public void | |
| public void | setWindowState(WindowState
the new portlet window state windowState)Implements javax.
Sets the window state of a portlet to the given window state.
|
| StateAwareResponseWrapper | back to summary |
|---|---|
| public StateAwareResponseWrapper(StateAwareResponse response) | |
| getPortletMode | back to summary |
|---|---|
| public PortletMode getPortletMode() Implements javax. Doc from javax.
Returns the current portlet mode of the portlet.
| |
| getRenderParameterMap | back to summary |
|---|---|
| public Map Implements javax. Doc from javax. Deprecated
Returns a
The values in the returned
The contents of the returned map are immutable in the sense that modifying the map does not directly
affect the render parameters. In order to set the parameters using the modified map,
the
If no parameters exist this method returns an empty | |
| getRenderParameters | back to summary |
|---|---|
| public MutableRenderParameters getRenderParameters() Implements javax. Doc from javax.
Gets the mutable render parameters.
| |
| getResponse | back to summary |
|---|---|
| public StateAwareResponse getResponse() Overrides javax. Return the wrapped response object.
| |
| getWindowState | back to summary |
|---|---|
| public WindowState getWindowState() Implements javax. Doc from javax.
Returns the current window state of the portlet.
| |
| removePublicRenderParameter | back to summary |
|---|---|
| public void removePublicRenderParameter(String name) Implements javax. Doc from javax. Deprecated
Removes the specified public render parameter.
The name must reference a public render parameter defined
in the portlet deployment descriptor under the
| |
| setEvent | back to summary |
|---|---|
| public void setEvent(QName name, Serializable value) Implements javax. Doc from javax. Publishes an Event with the given payload. The object type of the value must be compliant with the specified event type in the portlet deployment descriptor. The value must have a valid JAXB binding and be serializable.
| |
| setEvent | back to summary |
|---|---|
| public void setEvent(String name, Serializable value) Implements javax. Doc from javax. Publishes an Event with the given payload in the default namespace.
The name is treated as local part of the event QName and the namespace
is either taken from the The object type of the value must be compliant with the specified event type in the portlet deployment descriptor. The value must have a valid JAXB binding and be serializable.
| |
| setPortletMode | back to summary |
|---|---|
| public void setPortletMode(PortletMode portletMode) throws PortletModeException Implements javax. Doc from javax.
Sets the portlet mode of a portlet to the given portlet mode.
Possible values are the standard portlet modes and any custom portlet modes supported by the portal and the portlet. Portlets must declare in the deployment descriptor the portlet modes they support for each markup type. Standard portlet modes are:
Not more than one portlet mode can be set. If more than one portlet mode is set, only the last one set is valid. Note The portlet may still be called in a different portlet mode in the next render call, depending on the portlet container / portal.
| |
| setRenderParameter | back to summary |
|---|---|
| public void setRenderParameter(String key, String value) Implements javax. Doc from javax. Deprecated
Sets a String parameter for the render request. These parameters will be accessible in all subsequent render calls until an action or render request is targeted to the portlet. This method replaces all parameters with the given key. The given parameter do not need to be encoded prior to calling this method.
A parameter value of
| |
| setRenderParameter | back to summary |
|---|---|
| public void setRenderParameter(String key, String... values) Implements javax. Doc from javax. Deprecated
Sets a multi-valued String parameter for the render request. These parameters will be accessible in all subsequent render calls until an action or render request is targeted to the portlet. This method replaces all parameter values with the given key. The given parameter do not need to be encoded prior to calling this method.
A values parameter of If the values parameter is not null, elements of the array may be null.
| |
| setRenderParameters | back to summary |
|---|---|
| public void setRenderParameters(Map<String, String[]> parameters) Implements javax. Doc from javax. Deprecated
Sets a parameter map for the render request.
These parameters will be accessible in all sub-sequent render calls via
the The given parameters do not need to be encoded prior to calling this method. The portlet should not modify the map any further after calling this method. This method can be used to set both public and private render parameters. These parameters will be accessible in all subsequent render calls via the PortletRequest.getParameter call until a new request is targeted to the portlet. Any previously set private render parameter that is not contained in the new map is removed. However, public render parameters cannot be removed by excluding them from the map. Public render parameters that are not included in the map remain unchanged. The given parameters do not need to be encoded prior to calling this method. The portlet should not modify the map any further after calling this method.
| |
| setResponse | back to summary |
|---|---|
| public void setResponse(StateAwareResponse response) Sets the response object being wrapped.
| |
| setWindowState | back to summary |
|---|---|
| public void setWindowState(WindowState windowState) throws WindowStateException Implements javax. Doc from javax.
Sets the window state of a portlet to the given window state.
Possible values are the standard window states and any custom window states supported by the portal and the portlet. Standard window states are:
Not more than one window state can be set. If more than one window state is set, only the last one set is valid.
| |