org.apache.jetspeed.components.portletregistry
Interface PortletRegistry


public interface PortletRegistry

PortletRegistryComponentImpl

Version:
$ $
Author:
Scott T. Weaver

Method Summary
 void addRegistryListener(RegistryEventListener listener)
           
 org.apache.pluto.om.common.Language createLanguage(Locale locale, String title, String shortTitle, String description, Collection keywords)
           
 Collection getAllPortletDefinitions()
           
 MutablePortletApplication getPortletApplication(org.apache.pluto.om.common.ObjectID id)
          Retreives a PortletApplication by it's unique ObjectID.
 MutablePortletApplication getPortletApplication(String name)
          Retreives a PortletApplication by it's unique name.
 MutablePortletApplication getPortletApplicationByIdentifier(String identifier)
          Locates a portlet application using it's unique identifier field.
 Collection getPortletApplications()
           
 PortletDefinitionComposite getPortletDefinition(org.apache.pluto.om.common.ObjectID id)
          Locates the portlet defintion by its unique ObjectID.
 PortletDefinitionComposite getPortletDefinitionByIdentifier(String identifier)
          Locates a portlet using it's unique identifier field.
 PortletDefinitionComposite getPortletDefinitionByUniqueName(String name)
          unique name is a string formed by the combination of a portlet's unique within it's parent application plus the parent application's unique name within the portlet container using ":" as a delimiter.
 boolean namedPortletApplicationExists(String appName)
           namedPortletApplicationExists
 boolean portletApplicationExists(String appIentity)
          Checks whether or not a portlet application with this identity has all ready been registered to the container.
 boolean portletDefinitionExists(String portletIndentity)
          Checks whether or not a portlet with this identity has all ready been registered to the container.
 boolean portletDefinitionExists(String portletName, MutablePortletApplication app)
          Checks whether or not a portlet with this identity has all ready been registered to the PortletApplication.
 void registerPortletApplication(org.apache.pluto.om.portlet.PortletApplicationDefinition newApp)
          Creates a new PortletApplicationDefinition within the Portal.
 void removeApplication(org.apache.pluto.om.portlet.PortletApplicationDefinition app)
           
 void removeRegistryEventListner(RegistryEventListener listener)
           
 void savePortletDefinition(org.apache.pluto.om.portlet.PortletDefinition portlet)
           savePortletDefinition
 void updatePortletApplication(org.apache.pluto.om.portlet.PortletApplicationDefinition app)
          Makes any changes to the PortletApplicationDefinition persistent.
 

Method Detail

createLanguage

org.apache.pluto.om.common.Language createLanguage(Locale locale,
                                                   String title,
                                                   String shortTitle,
                                                   String description,
                                                   Collection keywords)
                                                   throws RegistryException
Throws:
RegistryException

getAllPortletDefinitions

Collection getAllPortletDefinitions()

getPortletApplication

MutablePortletApplication getPortletApplication(org.apache.pluto.om.common.ObjectID id)
Retreives a PortletApplication by it's unique ObjectID. The unqiue ObjectID is generally a function of the native storage mechanism of the container whether it be auto-generated by an RDBMS, O/R tool or some other mechanism. This is different than the portlet applaiction's unique indentfier which is specified within the portlet.xml

Parameters:
id -
Returns:

getPortletApplication

MutablePortletApplication getPortletApplication(String name)
Retreives a PortletApplication by it's unique name. We use PortletApplicationComposite interface which extends the PortletApplication and adds additional functionallity to it.

Parameters:
id -
Returns:
PortletApplicationComposite

getPortletApplicationByIdentifier

MutablePortletApplication getPortletApplicationByIdentifier(String identifier)
Locates a portlet application using it's unique identifier field.

Parameters:
identifier - Unique id for this portlet application
Returns:
portlet application matching this unique id.

getPortletApplications

Collection getPortletApplications()

getPortletDefinitionByIdentifier

PortletDefinitionComposite getPortletDefinitionByIdentifier(String identifier)
Locates a portlet using it's unique identifier field.
This method automatically calls getStoreableInstance(PortletDefinitionComposite portlet) on the returned PortletEntityInstance

Parameters:
identifier - Unique id for this portlet
Returns:
Portlet matching this unique id.
Throws:
IllegalStateException - If PortletDefinitionComposite != null AND PortletDefinitionComposite.getPortletApplicationDefinition() == null. The reason for this is that every PortletDefinition is required to have a parent PortletApplicationDefinition

getPortletDefinition

PortletDefinitionComposite getPortletDefinition(org.apache.pluto.om.common.ObjectID id)
Locates the portlet defintion by its unique ObjectID. The ObjectID is generated internally by the portal when the portlet definition is first registered and has no connection to the information stored within the portlet.xml.

Parameters:
id -
Returns:
PortletDefinitionComposite

getPortletDefinitionByUniqueName

PortletDefinitionComposite getPortletDefinitionByUniqueName(String name)
unique name is a string formed by the combination of a portlet's unique within it's parent application plus the parent application's unique name within the portlet container using ":" as a delimiter.
FORMAT: application name::portlet name
EXAMPLE: com.myapp.portletApp1::weather-portlet
This methos automatically calls getStoreableInstance(PortletDefinitionComposite portlet) on the returned PortletEntityInstance

Parameters:
name - portlets unique name.
Returns:
Portlet that matches the unique name
Throws:
IllegalStateException - If PortletDefinitionComposite != null AND PortletDefinitionComposite.getPortletApplicationDefinition() == null. The reason for this is that every PortletDefinition is required to have a parent PortletApplicationDefinition

portletApplicationExists

boolean portletApplicationExists(String appIentity)
Checks whether or not a portlet application with this identity has all ready been registered to the container.

Parameters:
appIdentity - portlet application indetity to check for.
Returns:
boolean true if a portlet application with this identity is alreay registered, false if it has not.

namedPortletApplicationExists

boolean namedPortletApplicationExists(String appName)

namedPortletApplicationExists

Parameters:
appName -
Returns:

portletDefinitionExists

boolean portletDefinitionExists(String portletIndentity)
Checks whether or not a portlet with this identity has all ready been registered to the container.

Parameters:
portletIndentity - portlet indetity to check for.
Returns:
boolean true if a portlet with this identity is alreay registered, false if it has not.

portletDefinitionExists

boolean portletDefinitionExists(String portletName,
                                MutablePortletApplication app)
Checks whether or not a portlet with this identity has all ready been registered to the PortletApplication.

Parameters:
portletIndentity - portlet indetity to check for.
app - PortletApplication to check .
Returns:
boolean true if a portlet with this identity is alreay registered, false if it has not.

registerPortletApplication

void registerPortletApplication(org.apache.pluto.om.portlet.PortletApplicationDefinition newApp)
                                throws RegistryException
Creates a new PortletApplicationDefinition within the Portal.

Parameters:
newApp -
Throws:
RegistryException

removeApplication

void removeApplication(org.apache.pluto.om.portlet.PortletApplicationDefinition app)
                       throws RegistryException
Throws:
RegistryException

updatePortletApplication

void updatePortletApplication(org.apache.pluto.om.portlet.PortletApplicationDefinition app)
                              throws RegistryException
Makes any changes to the PortletApplicationDefinition persistent.

Parameters:
app -
Throws:
RegistryException

savePortletDefinition

void savePortletDefinition(org.apache.pluto.om.portlet.PortletDefinition portlet)
                           throws FailedToStorePortletDefinitionException

savePortletDefinition

Parameters:
portlet -
Throws:
FailedToStorePortletDefinitionException

addRegistryListener

void addRegistryListener(RegistryEventListener listener)

removeRegistryEventListner

void removeRegistryEventListner(RegistryEventListener listener)


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.