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

WSRPInvocationContext - JBOSS Portal 2.4 API 英文版文档


org.jboss.portal.wsrp.invocation
Class WSRPInvocationContext

java.lang.Object
  extended byorg.jboss.portal.portlet.impl.spi.AbstractInvocationContext
      extended byorg.jboss.portal.wsrp.invocation.WSRPInvocationContext
All Implemented Interfaces:
InvocationContext
Direct Known Subclasses:
WSRPActionContext, WSRPRenderContext

public class WSRPInvocationContext
extends AbstractInvocationContext
implements InvocationContext


Nested Class Summary
 
Nested classes inherited from class org.jboss.portal.portlet.spi.InvocationContext
InvocationContext.Scope
 
Field Summary
protected  RequestContext requestContext
           
 
Fields inherited from interface org.jboss.portal.portlet.spi.InvocationContext
INVOCATION_SCOPE, PRINCIPAL_SCOPE, SESSION_SCOPE
 
Constructor Summary
WSRPInvocationContext(java.lang.String sessionId, 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.portlet.impl.spi.AbstractInvocationContext
getAttribute, 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.portlet.spi.InvocationContext
getAttribute, setAttribute
 

Field Detail

requestContext

protected RequestContext requestContext
Constructor Detail

WSRPInvocationContext

public WSRPInvocationContext(java.lang.String sessionId,
                             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: AbstractInvocationContext
Return the client request.

Specified by:
getClientRequest in class AbstractInvocationContext

getClientResponse

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

Specified by:
getClientResponse in class AbstractInvocationContext

getNavigationalState

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

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

getMode

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

Specified by:
getMode in interface InvocationContext
Returns:
the mode

getWindowState

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

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

getStreamInfo

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

Specified by:
getStreamInfo in interface InvocationContext
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 InvocationContext
Overrides:
encodeURL in class AbstractInvocationContext

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 InvocationContext
Parameters:
portletURL -
wantSecure -
wantAuthenticated -
relative -
Returns:
the encoded url

contextualize

public void contextualize(PortletInvocation invocation)