Class MCRStoreCenter

java.lang.Object
org.mycore.datamodel.ifs2.MCRStoreCenter

public class MCRStoreCenter extends Object
  • Method Details

    • instance

      public static MCRStoreCenter instance()
    • addStore

      public void addStore(String id, MCRStore store) throws MCRStoreAlreadyExistsException
      Add a store to the store center
      Parameters:
      store - - Add this store to store center
      Throws:
      MCRStoreAlreadyExistsException - If with the same id already exists in the store center
    • getStore

      @Deprecated public <T extends MCRStore> T getStore(String id, Class<T> storeClass)
      Deprecated.
      use getStore(String) instead
      Get the MyCoRe Store with the given ID from store center.
      Parameters:
      id - - The id of the to retrieved store
      storeClass - - The class type of the retrieved store
      Returns:
      The retrieved store or null if not exists
    • getStore

      public <T extends MCRStore> T getStore(String id)
      Get the MyCoRe Store with the given ID from store center.
      Parameters:
      id - - The id of the to retrieved store
      Returns:
      The retrieved store or null if not exists
    • getCurrentStores

      public <T extends MCRStore> Stream<T> getCurrentStores(Class<T> sClass)
      Returns:
      a Stream of all MCRStores that are an instance of <T>
    • removeStore

      public boolean removeStore(String id)
      Remove the store from store center
      Parameters:
      id - - Removed this store from store center
      Returns:
      true if successfully removed or false
    • clear

      public void clear()
      Remove all store from the store center