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

PortletInvocationContext - JBOSS Portal 2.6 API 英文版文档


org.jboss.portal.portlet.spi
Interface PortletInvocationContext

All Superinterfaces:
InvocationContext
All Known Subinterfaces:
ActionContext, RenderContext
All Known Implementing Classes:
AbstractPortletInvocationContext, ActionContextSupport, ControllerActionContext, ControllerPortletInvocationContext, ControllerRenderContext, PortletController.ActionContextImpl, PortletController.PortletInvocationContextImpl, PortletController.RenderContextImpl, PortletInvocationContextSupport, RenderContextSupport, TestPortletInvocationContext, WSRPActionContext, WSRPPortletInvocationContext, WSRPRenderContext

public interface PortletInvocationContext
extends InvocationContext

Version:
$Revision: 5064 $
Author:
Julien Viet

Method Summary
 java.lang.String encodeURL(PortletURL portletURL, java.lang.Boolean wantSecure, java.lang.Boolean wantAuthenticated, boolean relative)
           
 java.lang.String encodeURL(java.lang.String url)
          Encodes the specified URL by including the session ID in it, or, if encoding is not needed, returns the URL unchanged.
 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 interface org.jboss.portal.common.invocation.InvocationContext
getAttribute, getAttributeResolver, removeAttribute, setAttribute
 

Method Detail

getNavigationalState

public StateString getNavigationalState()
Returns the navigational state for this invocation.

Returns:
the navigational state

getMode

public Mode getMode()
Returns the mode for this invocation.

Returns:
the mode

getWindowState

public WindowState getWindowState()
Returns the window state for this invocation.

Returns:
the window state

getStreamInfo

public HTTPStreamInfo getStreamInfo()
Return information about the underlying http wire this invocation is performed.

Returns:
the stream info

encodeURL

public java.lang.String encodeURL(java.lang.String url)
                           throws java.lang.IllegalArgumentException

Encodes the specified URL by including the session ID in it, or, if encoding is not needed, returns the URL unchanged. The implementation of this method includes the logic to determine whether the session ID needs to be encoded in the URL. For example, if the browser supports cookies, or session tracking is turned off, URL encoding is unnecessary.

For robust session tracking, all URLs emitted by a servlet should be run through this method. Otherwise, URL rewriting cannot be used with browsers which do not support cookies.

Parameters:
url - the url to be encoded
Returns:
the encoded URL if encoding is needed, the unchanged URL otherwise
Throws:
java.lang.IllegalArgumentException - if the url is not valid or null

encodeURL

public java.lang.String encodeURL(PortletURL portletURL,
                                  java.lang.Boolean wantSecure,
                                  java.lang.Boolean wantAuthenticated,
                                  boolean relative)
Parameters:
portletURL - the portlet url
wantSecure -
wantAuthenticated -
relative -
Returns:
the url