|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ail.core.configure.AbstractConfigurationLoader
public abstract class AbstractConfigurationLoader
This class is extended by classes capable of loading and saving configurations to/from some form of persistent store.
The handling of configurations is key to the operation of the Core system. To be as flexible as possible, this abstract class leaves the details of how configurations are loaded and stored to its concrete implementors. At runtime the loadLoader method is responsible for creating an instance of a concrete implementation of this class. That instance is then used by all core users in that VM to load/save their configurations.
That actual concrete implementation can be specified in the following ways (in decending order of preference):
com.ail.core.configure.loader. If defined the system will
create an instance of the class it names. This instance is then used as the loader for the VM.
On the command line you might specify this as follows:-Dcom.ail.core.configure.loader=com.ail.core.configure.EJBConfigurationLoadercom.ail.core.configure.loaderParam.<paramName>.
-Dcom.ail.core.configure.loader=com.ail.core.configure.ConnectionPoolConfigurationLoader
-Dcom.ail.core.configure.loaderParam.jndiname=java:/CoreDS
com.ail.core.configure.loaderPropertiesFile. If this
is found to be defined, the file it names is opened and the properties read from it. The
file is expected to be in the same form as defined below.
java:comp/env/ConfigurationLoader.classname
and java:comp/env/ConfigurationLoader.params must be defined, and must
be Strings. The former is taken to be the full name of the class to instantiate and use as
the concrete loader. The latter is a semi-colon separated list of name=value parameters to
initialize the concrete loader.
loader.properties. This property file
must as a minimum define the property loaderClass with a value
identifying the fully qualified class name of the implementation. Any additional
properties defined in the file will be passed to the concrete implementation.
For example, the JDBCConfigurationLoader expects a driver property.
JDBCConfigurationLoader,
EJBConfigurationLoader,
ConnectionPoolConfigurationLoader,
FileConfigurationLoader| Constructor Summary | |
|---|---|
AbstractConfigurationLoader()
|
|
| Method Summary | |
|---|---|
abstract void |
deleteConfigurationRepository()
Delete the repository holding configuration information. |
java.util.Properties |
getLoaderParams()
Return the configuration parameters associated with the loader. |
abstract java.util.Collection<java.lang.String> |
getNamespaces()
Build and return a list of the namespaces currently being used. |
abstract java.util.Collection<ConfigurationSummary> |
getNamespacesHistorySummary(java.lang.String namespace)
Build and return a list of the details of a namespaces versions. |
abstract java.util.Collection<ConfigurationSummary> |
getNamespacesSummary()
Build and return a list of the details of the namespaces currently being used. |
abstract Configuration |
loadConfiguration(java.lang.String namespace,
VersionEffectiveDate date)
Fetch the configuration associated with a given namespace, and return them. |
static AbstractConfigurationLoader |
loadLoader()
Create an instance of the loader to be used. |
abstract void |
purgeAllConfigurations()
Delete ALL configuration information. |
abstract void |
reset()
When the configuration handler is asked to "reset", it passes that request onto the loader currently in user. |
abstract void |
saveConfiguration(java.lang.String namespace,
Configuration config)
Save (and update) the configuration associated with the specificed namespace. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractConfigurationLoader()
| Method Detail |
|---|
public static AbstractConfigurationLoader loadLoader()
public java.util.Properties getLoaderParams()
public abstract Configuration loadConfiguration(java.lang.String namespace,
VersionEffectiveDate date)
namespace - The namespace to load for.date - The effective date to load the configuration for.
public abstract void saveConfiguration(java.lang.String namespace,
Configuration config)
throws ConfigurationUpdateCollisionError
namespace - The namespace to save to.config - The configuration to save.
ConfigurationUpdateCollisionError - If the configuration being written is stale (i.e. has be updated in persistent store since it was read).public abstract java.util.Collection<java.lang.String> getNamespaces()
public abstract java.util.Collection<ConfigurationSummary> getNamespacesSummary()
ConfigurationSummary..public abstract java.util.Collection<ConfigurationSummary> getNamespacesHistorySummary(java.lang.String namespace)
namespace - The namespace to fetch the history for.
ConfigurationSummary..public abstract void reset()
public abstract void purgeAllConfigurations()
NOTE: ALL CONFIGURATION INFORMATION WILL BE LOST!
public abstract void deleteConfigurationRepository()
purgeAllConfigurations() but also removes the
repository itself.NOTE: ALL CONFIGURATION INFORMATION WILL BE LOST!
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||