org.apache.jetspeed.components.portletregistry
Interface PortletRegistry


public interface PortletRegistry

PortletRegistryComponentImpl

Version:
$ $
Author:
Scott T. Weaver

Method Summary
 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 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

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

getAllPortletDefinitions

public Collection getAllPortletDefinitions()

getPortletApplication

public 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

public 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.

Returns:
PortletApplicationComposite

getPortletApplicationByIdentifier

public 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

public Collection getPortletApplications()

getPortletDefinitionByIdentifier

public 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

public 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

public 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

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

Returns:
boolean true if a portlet application with this identity is alreay registered, false if it has not.

namedPortletApplicationExists

public boolean namedPortletApplicationExists(String appName)

namedPortletApplicationExists

Parameters:
appName -
Returns:

portletDefinitionExists

public 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

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

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

registerPortletApplication

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

Parameters:
newApp -
Throws:
RegistryException

removeApplication

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

updatePortletApplication

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

Parameters:
app -
Throws:
RegistryException

savePortletDefinition

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

savePortletDefinition

Parameters:
portlet -
Throws:
FailedToStorePortletDefinitionException


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