KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > portlet > PortalContext


1 /**
2   * Copyright 2003 IBM Corporation and Sun Microsystems, Inc.
3   * All rights reserved.
4   * Use is subject to license terms.
5   */

6
7 package javax.portlet;
8
9
10
11 /**
12  * The <CODE>PortalContext</CODE> interface gives the portlet
13  * the ability to retrieve information about the portal calling this portlet.
14  * <p>
15  * The portlet can only read the <CODE>PortalContext</CODE> data.
16  */

17 public interface PortalContext
18 {
19
20   
21   /**
22    * Returns the portal property with the given name,
23    * or a <code>null</code> if there is
24    * no property by that name.
25    *
26    * @param name property name
27    *
28    * @return portal property with key <code>name</code>
29    *
30    * @exception java.lang.IllegalArgumentException
31    * if name is <code>null</code>.
32    */

33
34   public java.lang.String JavaDoc getProperty(java.lang.String JavaDoc name);
35
36
37   /**
38    * Returns all portal property names, or an empty
39    * <code>Enumeration</code> if there are no property names.
40    *
41    * @return All portal property names as an
42    * <code>Enumeration</code> of <code>String</code> objects
43    */

44   public java.util.Enumeration JavaDoc getPropertyNames();
45
46
47   /**
48    * Returns all supported portlet modes by the portal
49    * as an enumertation of <code>PorltetMode</code> objects.
50    * <p>
51    * The portlet modes must at least include the
52    * standard portlet modes <code>EDIT, HELP, VIEW</code>.
53    *
54    * @return All supported portal modes by the portal
55    * as an enumertation of <code>PorltetMode</code> objects.
56    */

57
58   public java.util.Enumeration JavaDoc getSupportedPortletModes();
59
60
61   /**
62    * Returns all supported window states by the portal
63    * as an enumertation of <code>WindowState</code> objects.
64    * <p>
65    * The window states must at least include the
66    * standard window states <code> MINIMIZED, NORMAL, MAXIMIZED</code>.
67    *
68    * @return All supported window states by the portal
69    * as an enumertation of <code>WindowState</code> objects.
70    */

71
72   public java.util.Enumeration JavaDoc getSupportedWindowStates();
73
74
75   /**
76    * Returns information about the portal like vendor, version, etc.
77    * <p>
78    * The form of the returned string is <I>servername/versionnumber</I>. For
79    * example, the reference implementation Pluto may return the string
80    * <CODE>Pluto/1.0</CODE>.
81    * <p>
82    * The portlet container may return other optional information after the
83    * primary string in parentheses, for example, <CODE>Pluto/1.0
84    * (JDK 1.3.1; Windows NT 4.0 x86)</CODE>.
85    *
86    * @return a <CODE>String</CODE> containing at least the portal name and version number
87    */

88
89   public java.lang.String JavaDoc getPortalInfo();
90 }
91
Popular Tags