KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.exoplatform.services.wsrp.consumer;
2
3
4 import java.util.Iterator JavaDoc;
5 import org.exoplatform.services.wsrp.type.SessionContext;
6
7 /**
8  * Defines a session object at the consumer-side
9  * to store remote portlet related information that
10  * are needed to interact with the portlet.
11  * Since a session context is not mandatory in WSRP
12  * a consumer portlet instance key is taken to
13  * uniquely identify a portlet session.
14  *
15  * @author Benjamin Mestrallet
16  */

17 public interface PortletSession {
18   /**
19    * Get the portlet handle which uniquely identifies the
20    * portlet session at the consumer side.
21    *
22    * @return The portlet handle
23    */

24   public String JavaDoc getPortletHandle();
25
26   /**
27    * Set the portlet handle of the portlet
28    * this session belongs to.
29    *
30    * @param portletHandle The portlet handle
31    */

32   public void setPortletHandle(String JavaDoc portletHandle);
33
34   /**
35    * Get the WSRP session context of
36    * the portlet instance. If no session context was set
37    * from the producer this method returns null.
38    *
39    * @return The the session context if set from the producer
40    * or null otherwise.
41    */

42   public SessionContext getSessionContext();
43
44   /**
45    * Set the session context of the portlet instance.
46    *
47    * @param sessionContext The session context.
48    */

49   public void setSessionContext(SessionContext sessionContext);
50
51   /**
52    * Get the <code>SimplePortletWindowSession</code> of the portlet window with the given ID.
53    *
54    * @param windowID The ID of the portlet window
55    * @return The <code>PorletWindowSession</code> with the given ID.
56    */

57   public PortletWindowSession getPortletWindowSession(String JavaDoc windowID);
58
59   /**
60    * Get all window session which belong to the portlet session
61    *
62    * @return An Iterator of <code>SimplePortletWindowSession</code> objects.
63    */

64   public Iterator JavaDoc getAllPorletWindowSessions();
65
66   /**
67    * Remove the porlet window session with the given window id.
68    *
69    * @param windowID The ObjectID of the portlet window whichs session shoul dbe removed
70    * @return The portlet window session which has been removed or null if the session did not exist.
71    */

72   public PortletWindowSession removePortletWindowSession(String JavaDoc windowID);
73
74   /**
75    * Remove all portlet window sessions which belong to this portlet session.
76    */

77   public void removeAllPortletWindowSessions();
78 }
79
Popular Tags