com.ail.core.configure
Class FileConfigurationLoader

java.lang.Object
  extended by com.ail.core.configure.AbstractConfigurationLoader
      extended by com.ail.core.configure.FileConfigurationLoader

public class FileConfigurationLoader
extends AbstractConfigurationLoader

This class handles the loading and saving of property (configuration) information held in files.

Version:
$Revision: 1.5 $

Constructor Summary
FileConfigurationLoader()
           
 
Method Summary
 void deleteConfigurationRepository()
          Delete the repository holding configuration information.
 java.util.Collection<java.lang.String> getNamespaces()
          Build and return a list of the namespaces currently being used.
 java.util.Collection<ConfigurationSummary> getNamespacesHistorySummary(java.lang.String namespace)
          Fetch the details of a specific configurations history.
 java.util.Collection<ConfigurationSummary> getNamespacesSummary()
          Fetch the summary details for all the configurations that are current.
 Configuration loadConfiguration(java.lang.String namespace, VersionEffectiveDate date)
          Fetch the configuration associated with a given namespace, and return them.
 void purgeAllConfigurations()
          Delete ALL configuration information.
 void reset()
          When the configuration handler is asked to "reset", it passes that request onto the loader currently in user.
 void saveConfiguration(java.lang.String namespace, Configuration config)
          Save (and update) the configuration associated with the specificed namespace.
 
Methods inherited from class com.ail.core.configure.AbstractConfigurationLoader
getLoaderParams, loadLoader
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileConfigurationLoader

public FileConfigurationLoader()
Method Detail

loadConfiguration

public Configuration loadConfiguration(java.lang.String namespace,
                                       VersionEffectiveDate date)
Description copied from class: AbstractConfigurationLoader
Fetch the configuration associated with a given namespace, and return them.

Specified by:
loadConfiguration in class AbstractConfigurationLoader
Parameters:
namespace - The namespace to load for.
date - The effective date to load the configuration for.
Returns:
loaded configuration.

saveConfiguration

public void saveConfiguration(java.lang.String namespace,
                              Configuration config)
Description copied from class: AbstractConfigurationLoader
Save (and update) the configuration associated with the specificed namespace.

Specified by:
saveConfiguration in class AbstractConfigurationLoader
Parameters:
namespace - The namespace to save to.
config - The configuration to save.

getNamespaces

public java.util.Collection<java.lang.String> getNamespaces()
Description copied from class: AbstractConfigurationLoader
Build and return a list of the namespaces currently being used. More specifically this includes only those that are stored and are current.

Specified by:
getNamespaces in class AbstractConfigurationLoader
Returns:
A collection of namespace names as Strings.

reset

public void reset()
Description copied from class: AbstractConfigurationLoader
When the configuration handler is asked to "reset", it passes that request onto the loader currently in user. The loader should reset any internal state in this method. "state" here means memory state only - the persisted configurations will not be altered.

Specified by:
reset in class AbstractConfigurationLoader

purgeAllConfigurations

public void purgeAllConfigurations()
Delete ALL configuration information. This will include all historical configuration information.

NOTE: ALL CONFIGURATION INFORMATION WILL BE LOST!

Specified by:
purgeAllConfigurations in class AbstractConfigurationLoader

deleteConfigurationRepository

public void deleteConfigurationRepository()
Delete the repository holding configuration information. This not only removes all configuration information purgeAllConfigurations() but also removes the repository itself.

NOTE: ALL CONFIGURATION INFORMATION WILL BE LOST!

Specified by:
deleteConfigurationRepository in class AbstractConfigurationLoader

getNamespacesSummary

public java.util.Collection<ConfigurationSummary> getNamespacesSummary()
Fetch the summary details for all the configurations that are current. In this context "current" means the latest version (i.e. with a validTo of zero). The collection returned is made up of instances of ConfigurationSummary.

Specified by:
getNamespacesSummary in class AbstractConfigurationLoader
Returns:
A collection of ConfigurationSummary

getNamespacesHistorySummary

public java.util.Collection<ConfigurationSummary> getNamespacesHistorySummary(java.lang.String namespace)
Fetch the details of a specific configurations history.

Specified by:
getNamespacesHistorySummary in class AbstractConfigurationLoader
Parameters:
namespace - Namespace to get history for.
Returns:
A collection of ConfigurationSummary