com.ail.core.configure
Class WebServiceConfigurationLoader

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

public class WebServiceConfigurationLoader
extends AbstractConfigurationLoader

This configuration loader acts as a web services client.

Version:
$Revision: 1.5 $

Constructor Summary
WebServiceConfigurationLoader()
           
 
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 it.
 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

WebServiceConfigurationLoader

public WebServiceConfigurationLoader()
Method Detail

loadConfiguration

public Configuration loadConfiguration(java.lang.String namespace,
                                       VersionEffectiveDate date)
Fetch the configuration associated with a given namespace, and return it.

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)
                       throws ConfigurationUpdateCollisionError
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.
Throws:
ConfigurationUpdateCollisionError - If the configuration being written is stale (i.e. has be updated in persistent store since it was read).

getNamespaces

public java.util.Collection<java.lang.String> getNamespaces()
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()
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.

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