KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > wsrp > consumer > GroupSession


1 package org.exoplatform.services.wsrp.consumer;
2
3 import java.util.Iterator JavaDoc;
4
5 /**
6  * Interface for a consumer based group session.A group session
7  * is used to hold portlet session objects of portlet instances
8  * which belong to the same group of the same producer according to their
9  * portlet description.
10  *
11  * @author Stephan Laertz
12  * @author <a HREF='mailto:peter.fischer@de.ibm.com'>Peter Fischer</a>
13  * @author Benjamin Mestrallet
14  */

15 public interface GroupSession {
16
17   /**
18    * Get the ID of the group this group session belongs to.
19    *
20    * @return The group ID
21    */

22   public String JavaDoc getGroupID();
23
24   /**
25    * Get the portlet session object which is identified with
26    * the givven instanceKey from the group session. If no portlet session
27    * with that instanceKey exists it depends of the implementation wether
28    * null or a newly created portlet session object is returned.
29    *
30    * @param instanceKey The key which identifies the portlet session object
31    * @return The portlet session with the given key
32    */

33   public PortletSession getPortletSession(String JavaDoc instanceKey);
34
35   /**
36    * Get all portlet session objects currently stored in the group session.
37    *
38    * @return Iterator with all portlet session objects in the group session.
39    */

40   public Iterator JavaDoc getAllPortletSessions();
41
42   /**
43    * Check if the group session holds a portlet session with the given key.
44    *
45    * @return True if the group session holds a protlet session with the given key;
46    * false otherwise
47    */

48   public boolean existsPortletSession(String JavaDoc instanceKey);
49
50   /**
51    * Set the ID of the group this group session belongs to.
52    *
53    * @param groupID ID of the group
54    */

55   public void setGroupID(String JavaDoc groupID);
56
57   /**
58    * Add a portlet session to this group session.
59    */

60   public void addPortletSession(PortletSession portletSession);
61
62   /**
63    * Remove the portlet session object with the given key from the
64    * group session. Subsequent calls of getPortletSession with the same
65    * key should either return null or a newly created object.
66    *
67    * @param instanceKey Key which identifies the portlet session object to be removed.
68    */

69   public void removePortletSession(String JavaDoc instanceKey);
70
71   /**
72    * Removes all portlet session objects from the group session. Consequently
73    * this methods can be used to clear the group session.
74    */

75   public void removeAllPortletSessions();
76
77 }
78
Popular Tags