01: /**
02: * Copyright 2003 IBM Corporation and Sun Microsystems, Inc.
03: * All rights reserved.
04: * Use is subject to license terms.
05: */package javax.portlet;
06:
07: /**
08: * The <CODE>PortletConfig</CODE> interface provides the portlet with
09: * its configuration. The configuration holds information about the
10: * portlet that is valid for all users. The configuration is retrieved
11: * from the portlet definition in the deployment descriptor.
12: * The portlet can only read the configuration data.
13: * <p>
14: * The configuration information contains the portlet name, the portlet
15: * initialization parameters, the portlet resource bundle and the portlet
16: * application context.
17: *
18: * @see Portlet
19: */
20: public interface PortletConfig {
21:
22: /**
23: * Returns the name of the portlet.
24: * <P>
25: * The name may be provided via server administration, assigned in the
26: * portlet application deployment descriptor with the <code>portlet-name</code>
27: * tag.
28: *
29: * @return the portlet name
30: */
31:
32: public String getPortletName();
33:
34: /**
35: * Returns the <code>PortletContext</code> of the portlet application
36: * the portlet is in.
37: *
38: * @return a <code>PortletContext</code> object, used by the
39: * caller to interact with its portlet container
40: *
41: * @see PortletContext
42: */
43:
44: public PortletContext getPortletContext();
45:
46: /**
47: * Gets the resource bundle for the given locale based on the
48: * resource bundle defined in the deployment descriptor
49: * with <code>resource-bundle</code> tag or the inlined resources
50: * defined in the deployment descriptor.
51: *
52: * @param locale the locale for which to retrieve the resource bundle
53: *
54: * @return the resource bundle for the given locale
55: *
56: */
57:
58: public java.util.ResourceBundle getResourceBundle(
59: java.util.Locale locale);
60:
61: /**
62: * Returns a String containing the value of the named initialization parameter,
63: * or null if the parameter does not exist.
64: *
65: * @param name a <code>String</code> specifying the name
66: * of the initialization parameter
67: *
68: * @return a <code>String</code> containing the value
69: * of the initialization parameter
70: *
71: * @exception java.lang.IllegalArgumentException
72: * if name is <code>null</code>.
73: */
74:
75: public String getInitParameter(java.lang.String name);
76:
77: /**
78: * Returns the names of the portlet initialization parameters as an
79: * <code>Enumeration</code> of String objects, or an empty <code>Enumeration</code> if the
80: * portlet has no initialization parameters.
81: *
82: * @return an <code>Enumeration</code> of <code>String</code>
83: * objects containing the names of the portlet
84: * initialization parameters, or an empty <code>Enumeration</code> if the
85: * portlet has no initialization parameters.
86: */
87:
88: public java.util.Enumeration getInitParameterNames();
89: }
|