info.magnolia.cms.util
Class ModuleConfigurationObservingManager

java.lang.Object
  extended by info.magnolia.cms.util.ModuleConfigurationObservingManager
Direct Known Subclasses:
ConfiguredDialogHandlerManager, ConfiguredRendererManager, ConfiguredTemplateDefinitionManager

public abstract class ModuleConfigurationObservingManager
extends Object

Base class for managers that monitor configuration within modules and react when its changed to reload. Configuration is read from a sub path of each modules configuration node. Subclasses override either reload(List) or the pair onClear() and onRegister().

Version:
$Id$

Field Summary
protected  org.slf4j.Logger log
           
 
Constructor Summary
protected ModuleConfigurationObservingManager(String pathWithinModule, ModuleRegistry moduleRegistry)
           
 
Method Summary
protected  List<String> getObservedPaths()
           
protected  Object getReloadMonitor()
          Returns the object used to synchronize on to keep multiple reload operations to occur at the same time.
protected  javax.jcr.Session getSession()
           
protected  void onClear()
           
protected  void onRegister(javax.jcr.Node node)
           
protected  void reload()
           
protected  void reload(List<javax.jcr.Node> nodes)
           
 void start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected final org.slf4j.Logger log
Constructor Detail

ModuleConfigurationObservingManager

protected ModuleConfigurationObservingManager(String pathWithinModule,
                                              ModuleRegistry moduleRegistry)
Method Detail

start

public void start()

reload

protected void reload()

reload

protected void reload(List<javax.jcr.Node> nodes)
               throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

onClear

protected void onClear()
                throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

onRegister

protected void onRegister(javax.jcr.Node node)
                   throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getSession

protected javax.jcr.Session getSession()
                                throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getObservedPaths

protected List<String> getObservedPaths()

getReloadMonitor

protected Object getReloadMonitor()
Returns the object used to synchronize on to keep multiple reload operations to occur at the same time. Useful in subclasses to block calls while the reload is in progress.



Copyright © 2003-2013 Magnolia International Ltd.. All Rights Reserved.