|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mycore.datamodel.ifs.MCRContentStoreFactory
public class MCRContentStoreFactory
This class manages instances of MCRContentStore and MCRAudioVideoExtender and provides methods to get these for a given Store ID or MCRFile instance. The class is responsible for looking up, loading, instantiating and remembering the implementations of MCRContentStore and MCRAudioVideoExtender that are used in the system.
| Field Summary | |
|---|---|
protected static Hashtable |
EXTENDER_CLASSES
Hashtable StoreID to Class that implements MCRAudioVideoExtender |
protected static Hashtable |
INDEX_STORES
Hashtable StoreID to MCRContentStore implementing org.mycore.services.query.MCRTextSearchInterface |
protected static MCRContentStoreSelector |
STORE_SELECTOR
The MCRContentStoreSelector implementation that will be used |
protected static Hashtable |
STORES
Hashtable StoreID to MCRContentStore instance |
| Constructor Summary | |
|---|---|
MCRContentStoreFactory()
|
|
| Method Summary | |
|---|---|
(package private) static MCRAudioVideoExtender |
buildExtender(MCRFileReader file)
If the MCRContentStore of the MCRFile given provides an MCRAudioVideoExtender implementation, this method creates and initializes the MCRAudioVideoExtender instance for the MCRFile. |
protected static Class |
getExtenderClass(String storeID)
Returns the Class instance that implements the MCRAudioVideoExtender for the MCRContentStore with the given ID. |
static MCRContentStore |
getStore(String storeID)
Returns the MCRContentStore instance that is configured for this StoreID. |
(package private) static boolean |
providesAudioVideoExtender(String storeID)
Returns true if the MCRContentStore with the given StoreID provides an MCRAudioVideoExtender implementation, false otherwise. |
static MCRContentStore |
selectStore(MCRFile file)
Returns the MCRContentStore instance that should be used to store the content of the given file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static Hashtable STORES
protected static Hashtable EXTENDER_CLASSES
protected static Hashtable INDEX_STORES
org.mycore.services.query.MCRTextSearchInterface
protected static MCRContentStoreSelector STORE_SELECTOR
| Constructor Detail |
|---|
public MCRContentStoreFactory()
| Method Detail |
|---|
public static MCRContentStore getStore(String storeID)
storeID - the non-null ID of the MCRContentStore implementation
MCRConfigurationException - if no MCRContentStore implementation is configured for this
storeIDpublic static MCRContentStore selectStore(MCRFile file)
MCRContentStoreSelector,
MCRContentStoreprotected static Class getExtenderClass(String storeID)
storeID - the non-null StoreID of the MCRContentStore
MCRConfigurationException - if the MCRAudioVideoExtender implementation class could not
be loadedstatic boolean providesAudioVideoExtender(String storeID)
storeID - the non-null StoreID of the MCRContentStore
MCRConfigurationException - if the MCRAudioVideoExtender implementation class could not
be loadedstatic MCRAudioVideoExtender buildExtender(MCRFileReader file)
file - the non-null MCRFile that should get an MCRAudioVideoExtender
MCRConfigurationException - if the MCRAudioVideoExtender implementation class could not
be loaded
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||