org.apache.jetspeed.components.portletregistry
Class PersistenceBrokerPortletRegistry

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.ojb.support.PersistenceBrokerDaoSupport
          extended by org.apache.jetspeed.components.dao.InitablePersistenceBrokerDaoSupport
              extended by org.apache.jetspeed.components.portletregistry.PersistenceBrokerPortletRegistry
All Implemented Interfaces:
JetspeedCacheEventListener, PortletRegistry, org.springframework.beans.factory.InitializingBean

public class PersistenceBrokerPortletRegistry
extends InitablePersistenceBrokerDaoSupport
implements PortletRegistry, JetspeedCacheEventListener

OjbPortletRegistry

Version:
$Id: PersistenceBrokerPortletRegistry.java 1089285 2011-04-06 00:37:55Z woonsan $
Author:
Scott T. Weaver

Field Summary
protected  JetspeedCache applicationNameCache
           
protected  JetspeedCache applicationOidCache
           
protected  java.util.List<RegistryEventListener> listeners
           
static java.lang.String PORTLET_UNIQUE_NAME_SEPARATOR
          The separator used to create a unique portlet name as {portletApplication}::{portlet}
protected  JetspeedCache portletNameCache
           
protected  JetspeedCache portletOidCache
           
protected  PortletPreferencesProvider preferenceService
           
protected  SearchEngine searchEngine
           
 
Fields inherited from class org.apache.jetspeed.components.dao.InitablePersistenceBrokerDaoSupport
repositoryPath
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
PersistenceBrokerPortletRegistry(java.lang.String repositoryPath, JetspeedCache applicationOidCache, JetspeedCache portletOidCache, JetspeedCache applicationNameCache, JetspeedCache portletNameCache, PortletPreferencesProvider preferenceService)
           
PersistenceBrokerPortletRegistry(java.lang.String repositoryPath, JetspeedCache applicationOidCache, JetspeedCache portletOidCache, JetspeedCache applicationNameCache, JetspeedCache portletNameCache, PortletPreferencesProvider preferenceService, SearchEngine search)
           
PersistenceBrokerPortletRegistry(java.lang.String repositoryPath, PortletPreferencesProvider preferenceService)
           
 
Method Summary
 void addRegistryListener(RegistryEventListener listener)
           
 PortletDefinition clonePortletDefinition(PortletDefinition source, java.lang.String newPortletName)
           
 java.util.Collection<PortletDefinition> getAllCloneDefinitions()
           
 java.util.Collection<PortletDefinition> getAllDefinitions()
           
 java.util.Collection<PortletDefinition> getAllPortletDefinitions()
           
 PortletApplication getPortletApplication(java.lang.String name)
           
 PortletApplication getPortletApplication(java.lang.String name, boolean fromCache)
           
 java.util.Collection<PortletApplication> getPortletApplications()
           
 PortletDefinition getPortletDefinitionByUniqueName(java.lang.String name)
           
 PortletDefinition getPortletDefinitionByUniqueName(java.lang.String name, boolean fromCache)
           
 void notifyElementAdded(JetspeedCache cache, boolean local, java.lang.Object key, java.lang.Object element)
           
 void notifyElementChanged(JetspeedCache cache, boolean local, java.lang.Object key, java.lang.Object element)
           
 void notifyElementEvicted(JetspeedCache cache, boolean local, java.lang.Object key, java.lang.Object element)
           
 void notifyElementExpired(JetspeedCache cache, boolean local, java.lang.Object key, java.lang.Object element)
           
 void notifyElementRemoved(JetspeedCache cache, boolean local, java.lang.Object key, java.lang.Object element)
           
 boolean portletApplicationExists(java.lang.String name)
           
 boolean portletDefinitionExists(java.lang.String portletName, PortletApplication app)
           
 void registerPortletApplication(PortletApplication newApp)
           
 void removeAllClones(PortletApplication pa)
           
 void removeApplication(PortletApplication app)
           
 void removeClone(PortletDefinition clone)
           
 void removeRegistryEventListener(RegistryEventListener listener)
           
 int restoreClones(PortletApplication pa)
           
 void savePortletDefinition(PortletDefinition portlet)
           
 void updatePortletApplication(PortletApplication app)
           
 
Methods inherited from class org.apache.jetspeed.components.dao.InitablePersistenceBrokerDaoSupport
init
 
Methods inherited from class org.springframework.orm.ojb.support.PersistenceBrokerDaoSupport
checkDaoConfig, convertOjbAccessException, createPersistenceBrokerTemplate, getJcdAlias, getPersistenceBroker, getPersistenceBrokerTemplate, releasePersistenceBroker, setJcdAlias, setPersistenceBrokerTemplate
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PORTLET_UNIQUE_NAME_SEPARATOR

public static final java.lang.String PORTLET_UNIQUE_NAME_SEPARATOR
The separator used to create a unique portlet name as {portletApplication}::{portlet}

See Also:
Constant Field Values

applicationOidCache

protected JetspeedCache applicationOidCache

portletOidCache

protected JetspeedCache portletOidCache

applicationNameCache

protected JetspeedCache applicationNameCache

portletNameCache

protected JetspeedCache portletNameCache

listeners

protected java.util.List<RegistryEventListener> listeners

preferenceService

protected PortletPreferencesProvider preferenceService

searchEngine

protected SearchEngine searchEngine
Constructor Detail

PersistenceBrokerPortletRegistry

public PersistenceBrokerPortletRegistry(java.lang.String repositoryPath,
                                        PortletPreferencesProvider preferenceService)

PersistenceBrokerPortletRegistry

public PersistenceBrokerPortletRegistry(java.lang.String repositoryPath,
                                        JetspeedCache applicationOidCache,
                                        JetspeedCache portletOidCache,
                                        JetspeedCache applicationNameCache,
                                        JetspeedCache portletNameCache,
                                        PortletPreferencesProvider preferenceService)

PersistenceBrokerPortletRegistry

public PersistenceBrokerPortletRegistry(java.lang.String repositoryPath,
                                        JetspeedCache applicationOidCache,
                                        JetspeedCache portletOidCache,
                                        JetspeedCache applicationNameCache,
                                        JetspeedCache portletNameCache,
                                        PortletPreferencesProvider preferenceService,
                                        SearchEngine search)
Method Detail

getAllPortletDefinitions

public java.util.Collection<PortletDefinition> getAllPortletDefinitions()
Specified by:
getAllPortletDefinitions in interface PortletRegistry

getAllDefinitions

public java.util.Collection<PortletDefinition> getAllDefinitions()
Specified by:
getAllDefinitions in interface PortletRegistry

getAllCloneDefinitions

public java.util.Collection<PortletDefinition> getAllCloneDefinitions()
Specified by:
getAllCloneDefinitions in interface PortletRegistry

getPortletApplication

public PortletApplication getPortletApplication(java.lang.String name)
Specified by:
getPortletApplication in interface PortletRegistry

getPortletApplication

public PortletApplication getPortletApplication(java.lang.String name,
                                                boolean fromCache)
Specified by:
getPortletApplication in interface PortletRegistry

getPortletApplications

public java.util.Collection<PortletApplication> getPortletApplications()
Specified by:
getPortletApplications in interface PortletRegistry

getPortletDefinitionByUniqueName

public PortletDefinition getPortletDefinitionByUniqueName(java.lang.String name)
Specified by:
getPortletDefinitionByUniqueName in interface PortletRegistry

getPortletDefinitionByUniqueName

public PortletDefinition getPortletDefinitionByUniqueName(java.lang.String name,
                                                          boolean fromCache)
Specified by:
getPortletDefinitionByUniqueName in interface PortletRegistry

portletApplicationExists

public boolean portletApplicationExists(java.lang.String name)
Specified by:
portletApplicationExists in interface PortletRegistry

portletDefinitionExists

public boolean portletDefinitionExists(java.lang.String portletName,
                                       PortletApplication app)
Specified by:
portletDefinitionExists in interface PortletRegistry

registerPortletApplication

public void registerPortletApplication(PortletApplication newApp)
                                throws RegistryException
Specified by:
registerPortletApplication in interface PortletRegistry
Throws:
RegistryException

removeApplication

public void removeApplication(PortletApplication app)
                       throws RegistryException
Specified by:
removeApplication in interface PortletRegistry
Throws:
RegistryException

updatePortletApplication

public void updatePortletApplication(PortletApplication app)
                              throws RegistryException
Specified by:
updatePortletApplication in interface PortletRegistry
Throws:
RegistryException

savePortletDefinition

public void savePortletDefinition(PortletDefinition portlet)
                           throws FailedToStorePortletDefinitionException
Specified by:
savePortletDefinition in interface PortletRegistry
Throws:
FailedToStorePortletDefinitionException

notifyElementAdded

public void notifyElementAdded(JetspeedCache cache,
                               boolean local,
                               java.lang.Object key,
                               java.lang.Object element)
Specified by:
notifyElementAdded in interface JetspeedCacheEventListener

notifyElementChanged

public void notifyElementChanged(JetspeedCache cache,
                                 boolean local,
                                 java.lang.Object key,
                                 java.lang.Object element)
Specified by:
notifyElementChanged in interface JetspeedCacheEventListener

notifyElementEvicted

public void notifyElementEvicted(JetspeedCache cache,
                                 boolean local,
                                 java.lang.Object key,
                                 java.lang.Object element)
Specified by:
notifyElementEvicted in interface JetspeedCacheEventListener

notifyElementExpired

public void notifyElementExpired(JetspeedCache cache,
                                 boolean local,
                                 java.lang.Object key,
                                 java.lang.Object element)
Specified by:
notifyElementExpired in interface JetspeedCacheEventListener

notifyElementRemoved

public void notifyElementRemoved(JetspeedCache cache,
                                 boolean local,
                                 java.lang.Object key,
                                 java.lang.Object element)
Specified by:
notifyElementRemoved in interface JetspeedCacheEventListener

addRegistryListener

public void addRegistryListener(RegistryEventListener listener)
Specified by:
addRegistryListener in interface PortletRegistry

removeRegistryEventListener

public void removeRegistryEventListener(RegistryEventListener listener)
Specified by:
removeRegistryEventListener in interface PortletRegistry

clonePortletDefinition

public PortletDefinition clonePortletDefinition(PortletDefinition source,
                                                java.lang.String newPortletName)
                                         throws FailedToStorePortletDefinitionException
Specified by:
clonePortletDefinition in interface PortletRegistry
Throws:
FailedToStorePortletDefinitionException

restoreClones

public int restoreClones(PortletApplication pa)
                  throws RegistryException
Specified by:
restoreClones in interface PortletRegistry
Throws:
RegistryException

removeClone

public void removeClone(PortletDefinition clone)
                 throws RegistryException
Specified by:
removeClone in interface PortletRegistry
Throws:
RegistryException

removeAllClones

public void removeAllClones(PortletApplication pa)
                     throws RegistryException
Specified by:
removeAllClones in interface PortletRegistry
Throws:
RegistryException


Copyright © 1999-2011 The Apache Software Foundation. All Rights Reserved.