public interface ActionResponse extends PortletResponse
ActionResponse interface represents the portlet response to an action request. It extends the
PortletResponse interface to provide specific action response functionality to portlets.ActionResponse object and passes it as argument to the portlet's
processAction method.ActionRequest,
PortletResponse| Modifier and Type | Method and Description |
|---|---|
void |
sendRedirect(String location)
Instructs the portlet container to send a redirect response to the client using the specified redirect location
URL.
|
void |
setPortletMode(PortletMode portletMode)
Sets the portlet mode of a portlet to the given portlet mode.
|
void |
setRenderParameter(String key,
String value)
Sets a String parameter for the render request.
|
void |
setRenderParameter(String key,
String[] values)
Sets a String array parameter for the render request.
|
void |
setRenderParameters(Map parameters)
Sets a parameter map for the render request.
|
void |
setWindowState(WindowState windowState)
Sets the window state of a portlet to the given window state.
|
addProperty, encodeURL, setPropertyvoid setWindowState(WindowState windowState) throws WindowStateException
windowState - the new portlet window stateWindowStateException - 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().IllegalStateException - if the method is invoked after sendRedirect has been called.WindowStatevoid setPortletMode(PortletMode portletMode) throws PortletModeException
portletMode - the new portlet modePortletModeException - 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().IllegalStateException - if the method is invoked after sendRedirect has been called.void sendRedirect(String location) throws IOException, IllegalArgumentException, IllegalStateException
http://my.co/myportal/mywebap/myfolder/myresource.gif)
or a full path URI (e.g. /myportal/mywebap/myfolder/myresource.gif). If required, the portlet
container may encode the given URL before the redirection is issued to the client.
The sendRedirect method can not be invoked after any of the following methods of the ActionResponse interface has
been called: location - the redirect location URLIllegalStateException - if the method is invoked after any of above mentioned methods of the ActionResponse interface has been
called.IOException - if an input or output exception occurs.IllegalArgumentException - if a relative path URL is givenvoid setRenderParameters(Map parameters) throws IllegalArgumentException, IllegalStateException
PortletRequest.getParameter
call until a new request is targeted to the portlet.
The given parameters do not need to be encoded prior to calling this method.parameters - 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[]).IllegalStateException - if the method is invoked after sendRedirect has been called.IllegalArgumentException - if parameters is null, if any of the key/values in the
Map are null, if any of the keys is not a String, or if any of the values is not a String array.void setRenderParameter(String key, String value) throws IllegalArgumentException, IllegalStateException
PortletRequest.getParameter
call until a 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.key - key of the render parametervalue - value of the render parameterIllegalStateException - if the method is invoked after sendRedirect has been called.IllegalArgumentException - if key or value are null.void setRenderParameter(String key, String[] values) throws IllegalArgumentException, IllegalStateException
PortletRequest.getParameter
call until a 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.key - key of the render parametervalues - values of the render parameterIllegalStateException - if the method is invoked after sendRedirect has been called.IllegalArgumentException - if key or value are null.Copyright © 2003-2016 GateIn. All Rights Reserved.