org.jboss.portal.wsrp.invocation
Class WSRPPortletInvocationContext
java.lang.Object
org.jboss.portal.common.invocation.AbstractInvocationContext
org.jboss.portal.portlet.impl.spi.AbstractPortletInvocationContext
org.jboss.portal.wsrp.invocation.WSRPPortletInvocationContext
- All Implemented Interfaces:
- InvocationContext, PortletInvocationContext
- Direct Known Subclasses:
- WSRPActionContext, WSRPRenderContext
public class WSRPPortletInvocationContext
- extends AbstractPortletInvocationContext
- implements PortletInvocationContext
- Version:
- $Revision: 5064 $
- Author:
- Julien Viet, Chris Laprun
Method Summary |
void |
contextualize(PortletInvocation invocation)
|
java.lang.String |
encodeResourceURL(java.lang.String url)
Override the default behavior in order to avoid to encode when it is producer written URL. |
HttpServletRequest |
getClientRequest()
Return the client request. |
HttpServletResponse |
getClientResponse()
Return the client response. |
java.lang.String |
renderURL(PortletURL portletURL,
java.lang.Boolean wantSecure,
java.lang.Boolean wantAuthenticated,
boolean relative)
URL to be re-written are of the form: wsrp_rewrite?wsrp-urlType=value&name1=value1&name2=value2
.../wsrp_rewrite |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
requestContext
protected RequestContext requestContext
WSRPPortletInvocationContext
public WSRPPortletInvocationContext(StateString navigationalState,
SecurityContext securityContext,
MarkupInfo markupInfo,
PortalContext portalContext,
UserContext userContext,
InstanceContext instanceContext,
WindowContext windowContext,
Mode mode,
WindowState windowState)
getClientRequest
public HttpServletRequest getClientRequest()
- Description copied from class:
AbstractPortletInvocationContext
- Return the client request.
- Specified by:
getClientRequest
in class AbstractPortletInvocationContext
- Returns:
- the client request
getClientResponse
public HttpServletResponse getClientResponse()
- Description copied from class:
AbstractPortletInvocationContext
- Return the client response.
- Specified by:
getClientResponse
in class AbstractPortletInvocationContext
- Returns:
- the client response
encodeResourceURL
public java.lang.String encodeResourceURL(java.lang.String url)
- Override the default behavior in order to avoid to encode when it is producer written URL.
- Specified by:
encodeResourceURL
in interface PortletInvocationContext
- Overrides:
encodeResourceURL
in class AbstractPortletInvocationContext
- Parameters:
url
- the url to be encoded
- Returns:
- the encoded url
renderURL
public java.lang.String renderURL(PortletURL portletURL,
java.lang.Boolean wantSecure,
java.lang.Boolean wantAuthenticated,
boolean relative)
URL to be re-written are of the form: wsrp_rewrite?wsrp-urlType=value&name1=value1&name2=value2
.../wsrp_rewrite
Examples: - Load a resource http://test.com/images/test.gif:
wsrp_rewrite?wsrp-urlType=resource&wsrp-url=http%3A%2F%2Ftest.com%2Fimages%2Ftest.gif&wsrp-requiresRewrite=true/wsrp_rewrite
- Declare a secure interaction back to the Portlet:
wsrp_rewrite?wsrp-urlType=blockingAction&wsrp-secureURL=true&wsrp-navigationalState=a8h4K5JD9&wsrp-interactionState=fg4h923mdk/wsrp_rewrite
- Request the Consumer render the Portlet in a different mode and window state:
wsrp_rewrite?wsrp-urlType=render&wsrp-mode=help&wsrp-windowState=maximized/wsrp_rewrite
- Specified by:
renderURL
in interface PortletInvocationContext
- Parameters:
portletURL
- wantSecure
- wantAuthenticated
- relative
-
- Returns:
- the encoded url
contextualize
public void contextualize(PortletInvocation invocation)