|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.portal.portlet.impl.jsr168.PortletResponseImpl org.jboss.portal.portlet.impl.jsr168.ActionResponseImpl
Field Summary | |
protected int |
decision
|
private static org.apache.log4j.Logger |
log
|
protected PortletInvocationResponse |
response
|
protected static int |
WANT_NOTHING
|
protected static int |
WANT_REDIRECT
|
protected static int |
WANT_RENDER
|
Fields inherited from class org.jboss.portal.portlet.impl.jsr168.PortletResponseImpl |
invocation, preq |
Constructor Summary | |
ActionResponseImpl(ActionInvocation invocation,
PortletRequestImpl preq)
|
Method Summary | |
PortletInvocationResponse |
getResult()
|
protected void |
sendRedirect(RedirectionResponse redirect)
Generic send redirect. |
void |
sendRedirect(java.lang.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(java.lang.String name,
java.lang.String value)
Sets a String parameter for the render request. |
void |
setRenderParameter(java.lang.String name,
java.lang.String[] values)
Sets a String array parameter for the render request. |
void |
setRenderParameters(java.util.Map map)
Sets a parameter map for the render request. |
void |
setWindowState(WindowState windowState)
Sets the window state of a portlet to the given window state. |
Methods inherited from class org.jboss.portal.portlet.impl.jsr168.PortletResponseImpl |
addProperty, encodeURL, setProperty |
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, encodeURL, setProperty |
Field Detail |
private static final org.apache.log4j.Logger log
protected static final int WANT_NOTHING
protected static final int WANT_RENDER
protected static final int WANT_REDIRECT
protected PortletInvocationResponse response
protected int decision
Constructor Detail |
public ActionResponseImpl(ActionInvocation invocation, PortletRequestImpl preq)
Method Detail |
public PortletInvocationResponse getResult()
public void setWindowState(WindowState windowState) throws WindowStateException
ActionResponse
setWindowState
in interface ActionResponse
windowState
- 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()
.WindowState
public void setPortletMode(PortletMode portletMode) throws PortletModeException
ActionResponse
setPortletMode
in interface ActionResponse
portletMode
- 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 sendRedirect(java.lang.String location) throws java.io.IOException
ActionResponse
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:
sendRedirect
in interface ActionResponse
location
- the redirect location URL
java.io.IOException
- if an input or output exception occurs.protected final void sendRedirect(RedirectionResponse redirect) throws java.lang.IllegalStateException
redirect
-
java.lang.IllegalStateException
- implement jsr168 behavior if the portlet as already commited stuffpublic void setRenderParameters(java.util.Map map)
ActionResponse
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.
setRenderParameters
in interface ActionResponse
map
- 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 setRenderParameter(java.lang.String name, java.lang.String value)
ActionResponse
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.
setRenderParameter
in interface ActionResponse
name
- key of the render parametervalue
- value of the render parameterpublic void setRenderParameter(java.lang.String name, java.lang.String[] values)
ActionResponse
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.
setRenderParameter
in interface ActionResponse
name
- key of the render parametervalues
- values of the render parameter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |