站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.6 API 英文版文档

WSRPPortletInvocationContext - JBOSS Portal 2.6 API 英文版文档


org.jboss.portal.wsrp.invocation
Class WSRPPortletInvocationContext

java.lang.Object
  extended byorg.jboss.portal.common.invocation.AbstractInvocationContext
      extended byorg.jboss.portal.portlet.impl.spi.AbstractPortletInvocationContext
          extended byorg.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

Nested Class Summary
 
Nested classes inherited from class org.jboss.portal.common.invocation.AbstractInvocationContext
 
Field Summary
private  InstanceContext instanceContext
           
private  Mode mode
           
private  StateString navigationalState
           
private  PortalContext portalContext
           
protected  RequestContext requestContext
           
private  SecurityContext securityContext
           
private  HTTPStreamInfo streamInfo
           
private  UserContext userContext
           
private  WindowContext windowContext
           
private  WindowState windowState
           
 
Fields inherited from class org.jboss.portal.common.invocation.AbstractInvocationContext
 
Constructor Summary
WSRPPortletInvocationContext(StateString navigationalState, SecurityContext securityContext, HTTPStreamInfo streamInfo, PortalContext portalContext, UserContext userContext, InstanceContext instanceContext, WindowContext windowContext, Mode mode, WindowState windowState)
           
 
Method Summary
 void contextualize(PortletInvocation invocation)
           
 java.lang.String encodeURL(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
 java.lang.String encodeURL(java.lang.String url)
          Override the default behavior in order to avoid to encode when it is producer written URL.
 javax.servlet.http.HttpServletRequest getClientRequest()
          Return the client request.
 javax.servlet.http.HttpServletResponse getClientResponse()
          Return the client response.
 Mode getMode()
          Returns the mode for this invocation.
 StateString getNavigationalState()
          Returns the navigational state for this invocation.
 HTTPStreamInfo getStreamInfo()
          Return information about the underlying http wire this invocation is performed.
 WindowState getWindowState()
          Returns the window state for this invocation.
 
Methods inherited from class org.jboss.portal.common.invocation.AbstractInvocationContext
addResolver, addResolver, getAttribute, getAttributeResolver, removeAttribute, setAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.portal.common.invocation.InvocationContext
getAttribute, getAttributeResolver, removeAttribute, setAttribute
 

Field Detail

requestContext

protected RequestContext requestContext

navigationalState

private StateString navigationalState

securityContext

private SecurityContext securityContext

streamInfo

private HTTPStreamInfo streamInfo

portalContext

private PortalContext portalContext

userContext

private UserContext userContext

instanceContext

private InstanceContext instanceContext

windowState

private WindowState windowState

mode

private Mode mode

windowContext

private WindowContext windowContext
Constructor Detail

WSRPPortletInvocationContext

public WSRPPortletInvocationContext(StateString navigationalState,
                                    SecurityContext securityContext,
                                    HTTPStreamInfo streamInfo,
                                    PortalContext portalContext,
                                    UserContext userContext,
                                    InstanceContext instanceContext,
                                    WindowContext windowContext,
                                    Mode mode,
                                    WindowState windowState)
Method Detail

getClientRequest

public javax.servlet.http.HttpServletRequest getClientRequest()
Description copied from class: AbstractPortletInvocationContext
Return the client request.

Specified by:
getClientRequest in class AbstractPortletInvocationContext

getClientResponse

public javax.servlet.http.HttpServletResponse getClientResponse()
Description copied from class: AbstractPortletInvocationContext
Return the client response.

Specified by:
getClientResponse in class AbstractPortletInvocationContext

getNavigationalState

public StateString getNavigationalState()
Description copied from interface: PortletInvocationContext
Returns the navigational state for this invocation.

Specified by:
getNavigationalState in interface PortletInvocationContext
Returns:
the navigational state

getMode

public Mode getMode()
Description copied from interface: PortletInvocationContext
Returns the mode for this invocation.

Specified by:
getMode in interface PortletInvocationContext
Returns:
the mode

getWindowState

public WindowState getWindowState()
Description copied from interface: PortletInvocationContext
Returns the window state for this invocation.

Specified by:
getWindowState in interface PortletInvocationContext
Returns:
the window state

getStreamInfo

public HTTPStreamInfo getStreamInfo()
Description copied from interface: PortletInvocationContext
Return information about the underlying http wire this invocation is performed.

Specified by:
getStreamInfo in interface PortletInvocationContext
Returns:
the stream info

encodeURL

public java.lang.String encodeURL(java.lang.String url)
Override the default behavior in order to avoid to encode when it is producer written URL.

Specified by:
encodeURL in interface PortletInvocationContext
Overrides:
encodeURL in class AbstractPortletInvocationContext

encodeURL

public java.lang.String encodeURL(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:
encodeURL in interface PortletInvocationContext
Parameters:
portletURL -
wantSecure -
wantAuthenticated -
relative -
Returns:
the encoded url

contextualize

public void contextualize(PortletInvocation invocation)