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

java.lang.Object
  extended by org.jboss.portal.common.invocation.AbstractInvocationContext
      extended by org.jboss.portal.portlet.support.spi.PortletInvocationContextSupport
All Implemented Interfaces:
InvocationContext, PortletInvocationContext
Direct Known Subclasses:
ActionContextSupport, RenderContextSupport

public class PortletInvocationContextSupport
extends AbstractInvocationContext
implements PortletInvocationContext

Version:
$Revision: 5064 $
Author:
Julien Viet

Constructor Summary
PortletInvocationContextSupport()
           
 
Method Summary
 java.lang.String encodeResourceURL(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.
 MarkupInfo getMarkupInfo()
          Return information about the underlying http wire this invocation is performed.
 Mode getMode()
          Returns the mode for this invocation.
 StateString getNavigationalState()
          Returns the navigational state for this invocation.
 WindowState getWindowState()
          Returns the window state for this invocation.
 java.lang.String renderURL(PortletURL portletURL, java.lang.Boolean wantSecure, java.lang.Boolean wantAuthenticated, boolean relative)
           
 
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
 

Constructor Detail

PortletInvocationContextSupport

public PortletInvocationContextSupport()
Method Detail

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

getMarkupInfo

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

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

encodeResourceURL

public java.lang.String encodeResourceURL(java.lang.String url)
                                   throws java.lang.IllegalArgumentException
Description copied from interface: PortletInvocationContext

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:
encodeResourceURL in interface PortletInvocationContext
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

renderURL

public java.lang.String renderURL(PortletURL portletURL,
                                  java.lang.Boolean wantSecure,
                                  java.lang.Boolean wantAuthenticated,
                                  boolean relative)
Specified by:
renderURL in interface PortletInvocationContext
Parameters:
portletURL - the portlet url
Returns:
the url