org.exoplatform.services.wsrp2.consumer.impl.helpers
Class GroupSessionImpl

java.lang.Object
  extended by org.exoplatform.services.wsrp2.consumer.templates.InitCookieTemplate
      extended by org.exoplatform.services.wsrp2.consumer.impl.helpers.InitCookieImpl
          extended by org.exoplatform.services.wsrp2.consumer.impl.helpers.GroupSessionImpl
All Implemented Interfaces:
Serializable, GroupSession, GroupSessionMgr, InitCookieInfo

public class GroupSessionImpl
extends InitCookieImpl
implements GroupSessionMgr, Serializable

See Also:
Serialized Form

Field Summary
protected  String groupID
           
protected  Map<String,PortletSession> portletSessions
           
 
Constructor Summary
GroupSessionImpl(String groupID, String markupURL)
           
 
Method Summary
 void addPortletSession(PortletSession portletSession)
          Add a portlet session to this group session.
 boolean existsPortletSession(String instanceKey)
          Check if the group session holds a portlet session with the given key.
 Iterator<PortletSession> getAllPortletSessions()
          Get all portlet session objects currently stored in the group session.
 String getGroupID()
          Get the ID of the group this group session belongs to.
 PortletSession getPortletSession(String portletHandle)
          Get the portlet session object which is identified with the givven instanceKey from the group session.
 void removeAllPortletSessions()
          Removes all portlet session objects from the group session.
 void removePortletSession(String instanceKey)
          Remove the portlet session object with the given key from the group session.
 void setGroupID(String groupID)
          Set the ID of the group this group session belongs to.
 
Methods inherited from class org.exoplatform.services.wsrp2.consumer.impl.helpers.InitCookieImpl
getMarkupInterfaceURL, getWSRPMarkupService, setWSRPMarkupService
 
Methods inherited from class org.exoplatform.services.wsrp2.consumer.templates.InitCookieTemplate
isInitCookieDone, isInitCookieRequired, setInitCookieDone, setInitCookieRequired
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.exoplatform.services.wsrp2.consumer.InitCookieInfo
getMarkupInterfaceURL, getWSRPMarkupService, isInitCookieDone, isInitCookieRequired, setInitCookieDone, setInitCookieRequired, setWSRPMarkupService
 

Field Detail

groupID

protected String groupID

portletSessions

protected Map<String,PortletSession> portletSessions
Constructor Detail

GroupSessionImpl

public GroupSessionImpl(String groupID,
                        String markupURL)
Method Detail

getPortletSession

public PortletSession getPortletSession(String portletHandle)
Description copied from interface: GroupSession
Get the portlet session object which is identified with the givven instanceKey from the group session. If no portlet session with that instanceKey exists it depends of the implementation wether null or a newly created portlet session object is returned.

Specified by:
getPortletSession in interface GroupSession
Parameters:
portletHandle - The key which identifies the portlet session object
Returns:
The portlet session with the given key

getGroupID

public String getGroupID()
Description copied from interface: GroupSession
Get the ID of the group this group session belongs to.

Specified by:
getGroupID in interface GroupSession
Returns:
The group ID

setGroupID

public void setGroupID(String groupID)
Description copied from interface: GroupSession
Set the ID of the group this group session belongs to.

Specified by:
setGroupID in interface GroupSession
Parameters:
groupID - ID of the group

getAllPortletSessions

public Iterator<PortletSession> getAllPortletSessions()
Description copied from interface: GroupSession
Get all portlet session objects currently stored in the group session.

Specified by:
getAllPortletSessions in interface GroupSession
Returns:
Iterator with all portlet session objects in the group session.

existsPortletSession

public boolean existsPortletSession(String instanceKey)
Description copied from interface: GroupSession
Check if the group session holds a portlet session with the given key.

Specified by:
existsPortletSession in interface GroupSession
Returns:
True if the group session holds a protlet session with the given key; false otherwise

addPortletSession

public void addPortletSession(PortletSession portletSession)
Description copied from interface: GroupSession
Add a portlet session to this group session.

Specified by:
addPortletSession in interface GroupSession

removePortletSession

public void removePortletSession(String instanceKey)
Description copied from interface: GroupSession
Remove the portlet session object with the given key from the group session. Subsequent calls of getPortletSession with the same key should either return null or a newly created object.

Specified by:
removePortletSession in interface GroupSession
Parameters:
instanceKey - Key which identifies the portlet session object to be removed.

removeAllPortletSessions

public void removeAllPortletSessions()
Description copied from interface: GroupSession
Removes all portlet session objects from the group session. Consequently this methods can be used to clear the group session.

Specified by:
removeAllPortletSessions in interface GroupSession


Copyright © 2009 eXo Platform SAS. All Rights Reserved.