Class DataStorageRegistry


  • public class DataStorageRegistry
    extends Object
    This class define a registry for data storages.
    Since:
    3.0
    Author:
    Laurent Jourdren
    • Constructor Detail

      • DataStorageRegistry

        public DataStorageRegistry()
    • Method Detail

      • add

        public void add​(String name,
                        DataStorage storage)
        Add a storage to the registry
        Parameters:
        name -
        storage -
      • get

        public DataStorage get​(String name)
                        throws Aozan3Exception
        Get a data storage from its name
        Parameters:
        name - name of the data storage
        Returns:
        a DataStorage object
        Throws:
        Aozan3Exception - if the data storage does not exists
      • remove

        public boolean remove​(String name)
        Remove a data storage.
        Parameters:
        name - name of the data storage to remove
        Returns:
        true if the storage has been removed
      • exists

        public boolean exists​(String name)
        Test if a storage exists.
        Parameters:
        name - name of the storage
        Returns:
        true if the storage exists
      • names

        public Set<String> names()
        Get the names of registered storages.
        Returns:
        a set with the names of the registered storages