org.apache.pluto.spi.optional
Interface PortletRegistryService

All Known Implementing Classes:
PortletContextManager

public interface PortletRegistryService

Interface defining the services used by the container to access portlet application descriptors. The registry acts as both internally as descriptor cache and publically as a mechanism for notifying the container of new applications.

Since:
1.1.0

Method Summary
 void addPortletRegistryListener(PortletRegistryListener listener)
          Add a listener which will recieve notifications of newly registered applications.
 PortletAppDD getPortletApplicationDescriptor(java.lang.String name)
          Retrieve the portlet descriptor for the specified portlet application.
 PortletConfig getPortletConfig(java.lang.String applicationId, java.lang.String portletName)
          Retrieve the portlet configuration for the specified portlet
 PortletContext getPortletContext(java.lang.String applicationId)
          Retrieve the PortletContext for the specified applicationId
 PortletDD getPortletDescriptor(java.lang.String applicationId, java.lang.String portletName)
          Retreive the portlet descriptor for the given portlet.
 java.util.Iterator getRegisteredPortletApplicationIds()
          Retrieve the ids of all registered applications.
 java.util.Iterator getRegisteredPortletApplications()
          Retrieve all registered applications.
 void removePortletRegistryListener(PortletRegistryListener listener)
          Remove a previously registered listener.
 

Method Detail

getRegisteredPortletApplications

java.util.Iterator getRegisteredPortletApplications()
Retrieve all registered applications. This list will only contain those applications which have been registered with the container. Others may or may not be available within the servers.

Returns:
iterator of all application descriptors.

getRegisteredPortletApplicationIds

java.util.Iterator getRegisteredPortletApplicationIds()
Retrieve the ids of all registered applications. This list will only contain those applications which have been registered with the container. Others may or may not be available within the servers.

Returns:
iterator of all ids (strings).

getPortletApplicationDescriptor

PortletAppDD getPortletApplicationDescriptor(java.lang.String name)
                                             throws PortletContainerException
Retrieve the portlet descriptor for the specified portlet application. If the name does not match the name of a contextPath registered with the container the portlet application name must be checked.

Parameters:
name - the name of the portlet application.
Returns:
the named portlet application descriptor.
Throws:
PortletContainerException - if the descriptor can not be found or if the portlet.xml can not be parsed.

getPortletContext

PortletContext getPortletContext(java.lang.String applicationId)
                                 throws PortletContainerException
Retrieve the PortletContext for the specified applicationId

Parameters:
applicationId - context identifier
Returns:
portlet context
Throws:
PortletContainerException - if internal error occurs

getPortletDescriptor

PortletDD getPortletDescriptor(java.lang.String applicationId,
                               java.lang.String portletName)
                               throws PortletContainerException
Retreive the portlet descriptor for the given portlet.

Parameters:
applicationId - context identifier
portletName - portlet name
Returns:
descriptor
Throws:
PortletContainerException - if unexpected error

getPortletConfig

PortletConfig getPortletConfig(java.lang.String applicationId,
                               java.lang.String portletName)
                               throws PortletContainerException
Retrieve the portlet configuration for the specified portlet

Parameters:
applicationId - context identifier
portletName - portlet name
Returns:
portletconfig
Throws:
PortletContainerException - if internal error occurs

addPortletRegistryListener

void addPortletRegistryListener(PortletRegistryListener listener)
Add a listener which will recieve notifications of newly registered applications.

Parameters:
listener - the listener to add

removePortletRegistryListener

void removePortletRegistryListener(PortletRegistryListener listener)
Remove a previously registered listener.

Parameters:
listener - the listener to remove


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