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

InvocationContextSupport - JBOSS Portal 2.4 API 英文版文档


org.jboss.portal.portlet.support.spi
Class InvocationContextSupport

java.lang.Object
  extended byorg.jboss.portal.portlet.support.spi.InvocationContextSupport
All Implemented Interfaces:
InvocationContext
Direct Known Subclasses:
ActionContextSupport, RenderContextSupport

public class InvocationContextSupport
extends java.lang.Object
implements InvocationContext


Nested Class Summary
 
Nested classes inherited from class org.jboss.portal.portlet.spi.InvocationContext
InvocationContext.Scope
 
Field Summary
 
Fields inherited from interface org.jboss.portal.portlet.spi.InvocationContext
INVOCATION_SCOPE, PRINCIPAL_SCOPE, SESSION_SCOPE
 
Constructor Summary
InvocationContextSupport()
           
 
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.
 java.lang.Object getAttribute(InvocationContext.Scope scope, java.lang.String name)
           
 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.
 void setAttribute(InvocationContext.Scope scope, java.lang.String name, java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InvocationContextSupport

public InvocationContextSupport()
Method Detail

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)
                           throws java.lang.IllegalArgumentException
Description copied from interface: InvocationContext

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.

Specified by:
encodeURL in interface InvocationContext
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)
Specified by:
encodeURL in interface InvocationContext
Parameters:
portletURL - the portlet url
wantSecure -
wantAuthenticated -
relative -
Returns:
the url

setAttribute

public void setAttribute(InvocationContext.Scope scope,
                         java.lang.String name,
                         java.lang.Object value)
Specified by:
setAttribute in interface InvocationContext

getAttribute

public java.lang.Object getAttribute(InvocationContext.Scope scope,
                                     java.lang.String name)
Specified by:
getAttribute in interface InvocationContext