| |
|
| javax.portlet.ActionResponse
All known Subclasses: org.gridsphere.portlet.impl.ActionResponseImpl,
ActionResponse | public interface ActionResponse extends PortletResponse(Code) | | The ActionResponse interface represents the portlet
response to an action request.
It extends the PortletResponse interface to provide specific
action response functionality to portlets.
The portlet container creates an ActionResponse object and
passes it as argument to the portlet's processAction method.
See Also: ActionRequest See Also: PortletResponse |
Method Summary | |
public void | sendRedirect(String location) Instructs the portlet container to send a redirect response
to the client using the specified redirect location URL.
This method only accepts an absolute URL (e.g.
http://my.co/myportal/mywebap/myfolder/myresource.gif )
or a full path URI (e.g. | public void | setPortletMode(PortletMode portletMode) 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. | public void | setRenderParameter(String key, String value) Sets a String parameter for the render request. | public void | setRenderParameter(String key, String[] values) Sets a String array parameter for the render request. | public void | setRenderParameters(java.util.Map parameters) Sets a parameter map for the render request.
All previously set render parameters are cleared.
These parameters will be accessible in all
sub-sequent render calls via the
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: parameters - Map containing parameter names forthe render phase askeys and parameter values as mapvalues. | public void | setWindowState(WindowState windowState) Sets the window state of a portlet to the given window state. |
sendRedirect | public void sendRedirect(String location) throws java.io.IOException(Code) | | Instructs the portlet container to send a redirect response
to the client using the specified redirect location URL.
This method only accepts an absolute URL (e.g.
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:
- setPortletMode
- setWindowState
- setRenderParameter
- setRenderParameters
throws: java.lang.IllegalStateException - if the method is invoked after any of above mentioned methods ofthe ActionResponse interface has been called. Parameters: location - the redirect location URL exception: java.io.IOException - if an input or output exception occurs. exception: java.lang.IllegalArgumentException - if a relative path URL is given |
setPortletMode | public void setPortletMode(PortletMode portletMode) throws PortletModeException(Code) | | 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:
Note: The portlet may still be called in a different window
state in the next render call, depending on the portlet container / portal.
Parameters: portletMode - the new portlet mode throws: 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 allowedportlet modes with Request.isPortletModeAllowed() . throws: java.lang.IllegalStateException - if the method is invoked after sendRedirect has been called. |
setRenderParameter | public void setRenderParameter(String key, String value)(Code) | | Sets a String parameter for the render request.
These parameters will be accessible in all
sub-sequent render calls via the
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.
Parameters: key - key of the render parameter Parameters: value - value of the render parameter throws: java.lang.IllegalStateException - if the method is invoked after sendRedirect has been called. exception: java.lang.IllegalArgumentException - if key or value are null . |
setRenderParameter | public void setRenderParameter(String key, String[] values)(Code) | | Sets a String array parameter for the render request.
These parameters will be accessible in all
sub-sequent render calls via the
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.
Parameters: key - key of the render parameter Parameters: values - values of the render parameter throws: java.lang.IllegalStateException - if the method is invoked after sendRedirect has been called. exception: java.lang.IllegalArgumentException - if key or value are null . |
setRenderParameters | public void setRenderParameters(java.util.Map parameters)(Code) | | Sets a parameter map for the render request.
All previously set render parameters are cleared.
These parameters will be accessible in all
sub-sequent render calls via the
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: parameters - Map containing parameter names forthe render phase askeys and parameter values as mapvalues. The keys in the parametermap must be of type String. The valuesin the parameter map must be of typeString array (String[] ). throws: java.lang.IllegalStateException - if the method is invoked after sendRedirect has been called. exception: java.lang.IllegalArgumentException - if parameters is null , ifany of the key/values in the Map are null ,if any of the keys is not a String, or if any ofthe values is not a String array. |
setWindowState | public void setWindowState(WindowState windowState) throws WindowStateException(Code) | | 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:
- MINIMIZED
- NORMAL
- MAXIMIZED
Parameters: windowState - the new portlet window state throws: WindowStateException - if the portlet cannot switch to the specified window state.To avoid this exception the portlet can check the allowedwindow states with Request.isWindowStateAllowed() . throws: java.lang.IllegalStateException - if the method is invoked after sendRedirect has been called. See Also: WindowState |
|
|
|