Package javax.portlet
Interface PortletConfig
-
public interface PortletConfigThePortletConfiginterface provides the portlet with its configuration. The configuration holds information about the portlet that is valid for all users. The configuration is retrieved from the portlet definition in the deployment descriptor. The portlet can only read the configuration data. The configuration information contains the portlet name, the portlet initialization parameters, the portlet resource bundle and the portlet application context.- Version:
- $Revision: 5441 $
- Author:
- Julien Viet
- See Also:
Portlet
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetInitParameter(String name)Returns a String containing the value of the named initialization parameter, or null if the parameter does not exist.EnumerationgetInitParameterNames()Returns the names of the portlet initialization parameters as anEnumerationof String objects, or an emptyEnumerationif the portlet has no initialization parameters.PortletContextgetPortletContext()Returns thePortletContextof the portlet application the portlet is in.StringgetPortletName()Returns the name of the portlet.ResourceBundlegetResourceBundle(Locale locale)Gets the resource bundle for the given locale based on the resource bundle defined in the deployment descriptor withresource-bundletag or the inlined resources defined in the deployment descriptor.
-
-
-
Method Detail
-
getPortletName
String getPortletName()
Returns the name of the portlet. The name may be provided via server administration, assigned in the portlet application deployment descriptor with theportlet-nametag.- Returns:
- the portlet name
-
getPortletContext
PortletContext getPortletContext()
Returns thePortletContextof the portlet application the portlet is in.- Returns:
- a
PortletContextobject, used by the caller to interact with its portlet container - See Also:
PortletContext
-
getResourceBundle
ResourceBundle getResourceBundle(Locale locale)
Gets the resource bundle for the given locale based on the resource bundle defined in the deployment descriptor withresource-bundletag or the inlined resources defined in the deployment descriptor.- Parameters:
locale- the locale for which to retrieve the resource bundle- Returns:
- the resource bundle for the given locale
-
getInitParameter
String getInitParameter(String name) throws IllegalArgumentException
Returns a String containing the value of the named initialization parameter, or null if the parameter does not exist.- Parameters:
name- aStringspecifying the name of the initialization parameter- Returns:
- a
Stringcontaining the value of the initialization parameter - Throws:
IllegalArgumentException- if name isnull.
-
getInitParameterNames
Enumeration getInitParameterNames()
Returns the names of the portlet initialization parameters as anEnumerationof String objects, or an emptyEnumerationif the portlet has no initialization parameters.- Returns:
- an
EnumerationofStringobjects containing the names of the portlet initialization parameters, or an emptyEnumerationif the portlet has no initialization parameters.
-
-