net.sourceforge.java.feednread.backend.configuration
Interface IConfigurationPersistenceEngine

All Known Implementing Classes:
XMLConfigurationPersistenceEngine

public interface IConfigurationPersistenceEngine

IConfigurationPersistenceEngine

Interface to create a persistence layer for an application configuration. Implementing classes only have to pay attention on how to retrieve/store the configuration from/to the applied persistent medium. The retrieve() method is used to fetch the data from a persistent medium and store it in a Map using the key/value schema. The persist() method however is responsible for storing the updated configuration data back to the persistent medium.

Author:
Sebastian Machhausen

Method Summary
 void persist()
           Writes the configuration back to a persistent medium, e.g. a file, a database etc.
 Map retrieve()
           Retrieves the configuration data from the persistent medium and deposits it in a Map.
 

Method Detail

retrieve

public Map retrieve()
             throws PersistenceException

Retrieves the configuration data from the persistent medium and deposits it in a Map.

Returns:
a Map cotaining a list of key/value pairs holding the settings from the persistent medium
Throws:
PersistenceException - if an error occured while retrieving the configuration data from the persistent medium

persist

public void persist()
             throws PersistenceException

Writes the configuration back to a persistent medium, e.g. a file, a database etc.

Throws:
PersistenceException - if an error occured while writing the configuration back to the persistent medium