org.exoplatform.services.wsrp.consumer.templates
Class PortletSessionTemplate

java.lang.Object
  extended by org.exoplatform.services.wsrp.consumer.templates.PortletSessionTemplate
All Implemented Interfaces:
PortletSession
Direct Known Subclasses:
PortletSessionImpl

public abstract class PortletSessionTemplate
extends java.lang.Object
implements PortletSession


Field Summary
protected  java.lang.String portletHandle
           
protected  java.util.Map<java.lang.String,PortletWindowSession> portletWindowSessions
           
 
Constructor Summary
PortletSessionTemplate()
           
 
Method Summary
 java.util.Iterator getAllPorletWindowSessions()
          Get all window session which belong to the portlet session
 java.lang.String getPortletHandle()
          Get the portlet handle which uniquely identifies the portlet session at the consumer side.
abstract  PortletWindowSession getPortletWindowSession(java.lang.String windowID)
          Get the SimplePortletWindowSession of the portlet window with the given ID.
 SessionContext getSessionContext()
          Get the WSRP session context of the portlet instance.
 void removeAllPortletWindowSessions()
          Remove all portlet window sessions which belong to this portlet session.
 PortletWindowSession removePortletWindowSession(java.lang.String windowID)
          Remove the porlet window session with the given window id.
 void setPortletHandle(java.lang.String portletHandle)
          Set the portlet handle of the portlet this session belongs to.
 void setSessionContext(SessionContext sessionContext)
          Set the session context of the portlet instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

portletHandle

protected java.lang.String portletHandle

portletWindowSessions

protected java.util.Map<java.lang.String,PortletWindowSession> portletWindowSessions
Constructor Detail

PortletSessionTemplate

public PortletSessionTemplate()
Method Detail

getPortletHandle

public java.lang.String getPortletHandle()
Description copied from interface: PortletSession
Get the portlet handle which uniquely identifies the portlet session at the consumer side.

Specified by:
getPortletHandle in interface PortletSession
Returns:
The portlet handle

setPortletHandle

public void setPortletHandle(java.lang.String portletHandle)
Description copied from interface: PortletSession
Set the portlet handle of the portlet this session belongs to.

Specified by:
setPortletHandle in interface PortletSession
Parameters:
portletHandle - The portlet handle

getSessionContext

public SessionContext getSessionContext()
Description copied from interface: PortletSession
Get the WSRP session context of the portlet instance. If no session context was set from the producer this method returns null.

Specified by:
getSessionContext in interface PortletSession
Returns:
The the session context if set from the producer or null otherwise.

setSessionContext

public void setSessionContext(SessionContext sessionContext)
Description copied from interface: PortletSession
Set the session context of the portlet instance.

Specified by:
setSessionContext in interface PortletSession
Parameters:
sessionContext - The session context.

getPortletWindowSession

public abstract PortletWindowSession getPortletWindowSession(java.lang.String windowID)
Description copied from interface: PortletSession
Get the SimplePortletWindowSession of the portlet window with the given ID.

Specified by:
getPortletWindowSession in interface PortletSession
Parameters:
windowID - The ID of the portlet window
Returns:
The PorletWindowSession with the given ID.

getAllPorletWindowSessions

public java.util.Iterator getAllPorletWindowSessions()
Description copied from interface: PortletSession
Get all window session which belong to the portlet session

Specified by:
getAllPorletWindowSessions in interface PortletSession
Returns:
An Iterator of SimplePortletWindowSession objects.

removePortletWindowSession

public PortletWindowSession removePortletWindowSession(java.lang.String windowID)
Description copied from interface: PortletSession
Remove the porlet window session with the given window id.

Specified by:
removePortletWindowSession in interface PortletSession
Parameters:
windowID - The ObjectID of the portlet window whichs session shoul dbe removed
Returns:
The portlet window session which has been removed or null if the session did not exist.

removeAllPortletWindowSessions

public void removeAllPortletWindowSessions()
Description copied from interface: PortletSession
Remove all portlet window sessions which belong to this portlet session.

Specified by:
removeAllPortletWindowSessions in interface PortletSession


Copyright © 2010 eXo Platform SAS. All Rights Reserved.