Interface Repository

All Known Implementing Classes:
EnvironmentRepository, InMemoryRepository, PropertiesRepository, SystemPropertiesRepository

public interface Repository
Interface for configuration repositories

A configuration repository can be any data source containing configuration data, e. g. a simple in-memory store, a file, or a database.

Author:
jschalanda
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes the underlying data source when it isn't require any more.
    void
    Opens the configuration repository, e. g. create a database connection, open a file on disk for reading
    read(String name)
    Reads the configuration parameter name from the backing data source.
  • Method Details

    • open

      void open() throws RepositoryException
      Opens the configuration repository, e. g. create a database connection, open a file on disk for reading
      Throws:
      RepositoryException - If an error occurred while opening the data source
    • read

      String read(String name)
      Reads the configuration parameter name from the backing data source. The name is specific to the underlying data source.
      Parameters:
      name - The parameter name
      Returns:
      The value of the provided name as String
    • close

      void close() throws RepositoryException
      Closes the underlying data source when it isn't require any more.
      Throws:
      RepositoryException - If an error occurred while closing the underlying data source