| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_STORE_LOCATION
The default location for the XML files
|
protected boolean |
m_storeDirOK
True if the store home has been successfully established
|
protected java.io.File |
m_storeHome
The current home of the store
|
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.io.File>> |
m_stores
Lookup for entries in the stores - just holds entry names and File paths
|
| Constructor and Description |
|---|
XMLFileBasedMetaStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
createStore(java.lang.String storeName)
Create a named store
|
protected void |
establishStoreHome()
Establish the home directory for the store
|
java.lang.Object |
getEntry(java.lang.String storeName,
java.lang.String name,
java.lang.Class<?> clazz)
Get a named entry from the store
|
protected XMLBasicSerialization |
getSerializer()
Gets a serializer to use.
|
java.util.Set<java.lang.String> |
listMetaStoreEntries(java.lang.String storeName)
Get a list of all entries in a named store
|
java.util.Set<java.lang.String> |
listMetaStoreEntries(java.lang.String storeName,
java.lang.String prefix)
Get a list of all named entries starting with the given prefix
|
java.util.Set<java.lang.String> |
listMetaStores()
Get a list of all named meta stores
|
protected void |
lockStore()
Lock the store
|
void |
storeEntry(java.lang.String storeName,
java.lang.String name,
java.lang.Object toStore)
Store a named entry
|
protected void |
unlockStore()
Unlocks the metastore
|
public static final java.lang.String DEFAULT_STORE_LOCATION
protected java.io.File m_storeHome
protected boolean m_storeDirOK
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.io.File>> m_stores
protected void establishStoreHome()
throws java.io.IOException
java.io.IOException - if a problem occurspublic java.util.Set<java.lang.String> listMetaStores()
throws java.io.IOException
MetaStorelistMetaStores in interface MetaStorejava.io.IOException - if a problem occurspublic java.util.Set<java.lang.String> listMetaStoreEntries(java.lang.String storeName)
throws java.io.IOException
MetaStorelistMetaStoreEntries in interface MetaStorestoreName - the name of the store to get entries forjava.io.IOException - if a problem occurspublic java.util.Set<java.lang.String> listMetaStoreEntries(java.lang.String storeName,
java.lang.String prefix)
throws java.io.IOException
MetaStorelistMetaStoreEntries in interface MetaStorestoreName - the name of the store to get entries forprefix - the prefix with which to search for entriesjava.io.IOException - if a problem occurspublic java.lang.Object getEntry(java.lang.String storeName,
java.lang.String name,
java.lang.Class<?> clazz)
throws java.io.IOException
MetaStoregetEntry in interface MetaStorestoreName - the name of the store to usename - the full name of the entry to retrieveclazz - the expected class of the entry when deserializedjava.io.IOException - if the deserialized entry does not match the expected
classpublic void createStore(java.lang.String storeName)
throws java.io.IOException
MetaStorecreateStore in interface MetaStorestoreName - the name of the store to createjava.io.IOException - if a problem occurspublic void storeEntry(java.lang.String storeName,
java.lang.String name,
java.lang.Object toStore)
throws java.io.IOException
MetaStorestoreEntry in interface MetaStorestoreName - the name of the store to usename - the full name of the entry to storetoStore - a beans compliant object to storejava.io.IOException - if a problem occursprotected void lockStore()
throws java.io.IOException
java.io.IOException - if a problem occursprotected void unlockStore()
protected XMLBasicSerialization getSerializer()
XMLBasicSerialization that has allowed properties set for common
option handlers.