Package org.mycore.datamodel.ifs2
Class MCRStoreCenter
java.lang.Object
org.mycore.datamodel.ifs2.MCRStoreCenter
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a store to the store centervoid
clear()
Remove all store from the store centergetCurrentStores
(Class<T> sClass) <T extends MCRStore>
TGet the MyCoRe Store with the given ID from store center.<T extends MCRStore>
TDeprecated.static MCRStoreCenter
instance()
boolean
removeStore
(String id) Remove the store from store center
-
Method Details
-
instance
-
addStore
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.usegetStore(String)
insteadGet the MyCoRe Store with the given ID from store center.- Parameters:
id
- - The id of the to retrieved storestoreClass
- - The class type of the retrieved store- Returns:
- The retrieved store or null if not exists
-
getStore
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
- Returns:
- a Stream of all
MCRStore
s that are an instance of<T>
-
removeStore
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
-
getStore(String)
instead