org.apache.pluto.internal.impl
Class PortletConfigImpl

java.lang.Object
  extended by org.apache.pluto.internal.impl.PortletConfigImpl
All Implemented Interfaces:
PortletConfig, InternalPortletConfig

public class PortletConfigImpl
extends java.lang.Object
implements PortletConfig, InternalPortletConfig


Field Summary
protected  PortletDD portletDD
          The portlet descriptor.
 
Constructor Summary
PortletConfigImpl(javax.servlet.ServletConfig servletConfig, PortletContext portletContext, PortletDD portletDD, PortletAppDD portletAppDD)
           
 
Method Summary
 java.lang.String getDefaultNamespace()
          Returns the default namespace for events and public render parameters.
 java.lang.String getInitParameter(java.lang.String name)
          Returns a String containing the value of the named initialization parameter, or null if the parameter does not exist.
 java.util.Enumeration<java.lang.String> getInitParameterNames()
          Returns the names of the portlet initialization parameters as an Enumeration of String objects, or an empty Enumeration if the portlet has no initialization parameters.
 PortletContext getPortletContext()
          Returns the PortletContext of the portlet application the portlet is in.
 PortletDD getPortletDefinition()
           
 java.lang.String getPortletName()
          Returns the name of the portlet.
 java.util.Enumeration<javax.xml.namespace.QName> getProcessingEventQNames()
          Returns the QNames of the processing events supported by the portlet as an Enumeration of QName objects, or an empty Enumeration if the portlet has not defined any processing events.
 java.util.Enumeration<java.lang.String> getPublicRenderParameterNames()
          Returns the names of the public render parameters supported by the portlet as an Enumeration of String objects, or an empty Enumeration if the portlet has not defined public render parameters.
 java.util.Enumeration<javax.xml.namespace.QName> getPublishingEventQNames()
          Returns the QNames of the publishing events supported by the portlet as an Enumeration of QName objects, or an empty Enumeration if the portlet has not defined any publishing events.
 java.util.ResourceBundle getResourceBundle(java.util.Locale locale)
          Gets the resource bundle for the given locale based on the resource bundle defined in the deployment descriptor with resource-bundle tag or the inlined resources defined in the deployment descriptor.
 javax.servlet.ServletConfig getServletConfig()
           
 java.util.Enumeration<java.util.Locale> getSupportedLocales()
          Returns the locales supported by the portlet as an Enumeration of Locale objects, or an empty Enumeration if the portlet has not defined any supported locales.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

portletDD

protected PortletDD portletDD
The portlet descriptor.

Constructor Detail

PortletConfigImpl

public PortletConfigImpl(javax.servlet.ServletConfig servletConfig,
                         PortletContext portletContext,
                         PortletDD portletDD,
                         PortletAppDD portletAppDD)
Method Detail

getPortletName

public java.lang.String getPortletName()
Description copied from interface: PortletConfig
Returns the name of the portlet.

The name may be provided via server administration, assigned in the portlet application deployment descriptor with the portlet-name tag.

Specified by:
getPortletName in interface PortletConfig
Returns:
the portlet name

getPortletContext

public PortletContext getPortletContext()
Description copied from interface: PortletConfig
Returns the PortletContext of the portlet application the portlet is in.

Specified by:
getPortletContext in interface PortletConfig
Returns:
a PortletContext object, used by the caller to interact with its portlet container
See Also:
PortletContext

getResourceBundle

public java.util.ResourceBundle getResourceBundle(java.util.Locale locale)
Description copied from interface: PortletConfig
Gets the resource bundle for the given locale based on the resource bundle defined in the deployment descriptor with resource-bundle tag or the inlined resources defined in the deployment descriptor.

Specified by:
getResourceBundle in interface PortletConfig
Parameters:
locale - the locale for which to retrieve the resource bundle
Returns:
the resource bundle for the given locale

getInitParameter

public java.lang.String getInitParameter(java.lang.String name)
Description copied from interface: PortletConfig
Returns a String containing the value of the named initialization parameter, or null if the parameter does not exist.

Specified by:
getInitParameter in interface PortletConfig
Parameters:
name - a String specifying the name of the initialization parameter
Returns:
a String containing the value of the initialization parameter

getInitParameterNames

public java.util.Enumeration<java.lang.String> getInitParameterNames()
Description copied from interface: PortletConfig
Returns the names of the portlet initialization parameters as an Enumeration of String objects, or an empty Enumeration if the portlet has no initialization parameters.

Specified by:
getInitParameterNames in interface PortletConfig
Returns:
an Enumeration of String objects containing the names of the portlet initialization parameters, or an empty Enumeration if the portlet has no initialization parameters.

getServletConfig

public javax.servlet.ServletConfig getServletConfig()
Specified by:
getServletConfig in interface InternalPortletConfig

getPortletDefinition

public PortletDD getPortletDefinition()
Specified by:
getPortletDefinition in interface InternalPortletConfig

getPublicRenderParameterNames

public java.util.Enumeration<java.lang.String> getPublicRenderParameterNames()
Description copied from interface: PortletConfig
Returns the names of the public render parameters supported by the portlet as an Enumeration of String objects, or an empty Enumeration if the portlet has not defined public render parameters.

Public render parameters are defined in the portlet deployment descriptor with the supported-public-render-parameter element.

Specified by:
getPublicRenderParameterNames in interface PortletConfig
Returns:
an Enumeration of String objects containing the names of the public render parameters, or an empty Enumeration if the portlet has not defined support for any public render parameters in the portlet deployment descriptor.

getDefaultNamespace

public java.lang.String getDefaultNamespace()
Description copied from interface: PortletConfig
Returns the default namespace for events and public render parameters. This namespace is defined in the portlet deployment descriptor with the default-namespace element.

If no default namespace is defined in the portlet deployment descriptor this methods returns the XML default namespace XMLConstants.NULL_NS_URI.

Specified by:
getDefaultNamespace in interface PortletConfig
Returns:
the default namespace defined in the portlet deployment descriptor, or XMLConstants.NULL_NS_URI is non is defined.

getProcessingEventQNames

public java.util.Enumeration<javax.xml.namespace.QName> getProcessingEventQNames()
Description copied from interface: PortletConfig
Returns the QNames of the processing events supported by the portlet as an Enumeration of QName objects, or an empty Enumeration if the portlet has not defined any processing events.

Processing events are defined in the portlet deployment descriptor with the supported-processing-event element.

Specified by:
getProcessingEventQNames in interface PortletConfig
Returns:
an Enumeration of QName objects containing the names of the processing events, or an empty Enumeration if the portlet has not defined any support for processing events in the deployment descriptor.

getPublishingEventQNames

public java.util.Enumeration<javax.xml.namespace.QName> getPublishingEventQNames()
Description copied from interface: PortletConfig
Returns the QNames of the publishing events supported by the portlet as an Enumeration of QName objects, or an empty Enumeration if the portlet has not defined any publishing events.

Publishing events are defined in the portlet deployment descriptor with the supported-publishing-event element.

Note that this call does not return any events published that have not been declared in the deployment descriptor as supported.

Specified by:
getPublishingEventQNames in interface PortletConfig
Returns:
an Enumeration of QName objects containing the names of the publishing events, or an empty Enumeration if the portlet has not defined any support for publishing events in the deployment descriptor.

getSupportedLocales

public java.util.Enumeration<java.util.Locale> getSupportedLocales()
Description copied from interface: PortletConfig
Returns the locales supported by the portlet as an Enumeration of Locale objects, or an empty Enumeration if the portlet has not defined any supported locales.

Supported locales are defined in the portlet deployment descriptor with the supported-locale element.

Specified by:
getSupportedLocales in interface PortletConfig
Returns:
an Enumeration of Locale objects containing the supported locales, or an empty Enumeration if the portlet has not defined any supported locales in the deployment descriptor.


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.