|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.olat.core.logging.LogDelegator
org.olat.core.configuration.AbstractOLATModule
public abstract class AbstractOLATModule
Description:
Default/abstract class with helper methods.
The abstract olat module features reading and writing of configuration
properties to config and properties files. The idea is that the system can be
configured with default values either in the config xml file or by providing
reasonable default values directly in the module code.
The developer should provide a GUI for each value that can be configured at runtime without the need of rebooting the entire system. But this is up to the programmer who implements the setter methods for the config values.
The getter methods will load the configuration in the following order:
olatdata/system/configuration/fully.qualified.ClassName.properties
webapp/WEB-INF/olat_config.xmlolatdata/system/configuration/fully.qualified.ClassName.properties
and not in the olat_config.xml, those are only the default values in case no
other configuration.
To work properly in a cluster environment, the module will fire a ModuleConfiguratoinChangedEvent at the end of each save cycle. This event is catched automatically and the abstract method initFromChangedProperties() is called.
For more information on how the storing mechanism of the configuration works please have a look at the PersistedProperties class.
NOTE: This code will be refactored in the future. The olat_config.xml is a very old configuration concept. Target is to remove this file entirely and configure everything via Spring. In the future we try to achieve a better separation between code configuration (Spring, needs to be configured in xml files) and application configuration (properties, can be configured via GUI). If you want to use the properties mechanism in a spring loaded class, use the PersistedProperties class directly to read/write your application configuration.
Initial Date: 01.10.2007
| Constructor Summary | |
|---|---|
AbstractOLATModule()
|
|
| Method Summary | |
|---|---|
void |
destroy()
Destroy the module resources. |
void |
event(Event event)
|
void |
init(com.anthonyeden.lib.config.Configuration moduleConfig)
Initialize the module. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractOLATModule()
| Method Detail |
|---|
public final void init(com.anthonyeden.lib.config.Configuration moduleConfig)
init in interface OLATModulepublic void destroy()
destroy in interface OLATModulepublic void event(Event event)
event in interface GenericEventListenerGenericEventListener.event(org.olat.core.gui.control.Event)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||