|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ados.hestia.utils.io.StoreRepository
public abstract class StoreRepository
History. Nov 16, 2004. Refactored. Add dependence from folder. Converted from factory to repository. Nov 17, 2004. Clear temp folder on start. Apr 22, 2005. Did this class as base for all other repository type. Implements storing of temporary data at fs. Apr 25, 2005. Add restoreFromRemoteReceiving/prepareForRemoteSending.
Field Summary | |
---|---|
protected File |
m_tempFolder
|
Constructor Summary | |
---|---|
StoreRepository(String tempfolder)
|
Method Summary | |
---|---|
protected static void |
closeStreamSafe(Object stream)
|
IStore |
createStore()
Allocate store at repository. |
IStore |
createStore(InputStream stream)
Allocate and return store. |
abstract IStore |
createStore(String storeID)
Allocate store at repository with required id. |
IStore |
createStore(String storeid,
InputStream stream)
Allocate and return store. |
IStore |
createTempStore()
Create and return temporary store. |
IStore |
createTempStore(InputStream stream)
Create and return temporary store. |
void |
delete(IStore store)
Delete store from repository. |
abstract String |
getID()
Returns uid for repository. |
IStore |
getStore(String storeID)
Returns existing store with specific ID. |
abstract IStore |
getStoreSafe(String storeID)
Returns existing store with specific ID. |
IStore |
prepareForRemoteSending(IRMIStoreAccess rmi,
IStore store)
Create at remote side equvalent for store. |
IStore |
restoreFromRemoteReceiving(IRMIStoreAccess rmi,
IStore store)
Restore store after receiving it from remote side. |
abstract void |
setReferenceID(IStore store,
String referenceID)
Set reference id to requested store. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected File m_tempFolder
Constructor Detail |
---|
public StoreRepository(String tempfolder)
Method Detail |
---|
public abstract void setReferenceID(IStore store, String referenceID) throws IOException
store
- store to process.referenceID
- reference to set.
IOException
- if impossible to set.public IStore createTempStore()
public IStore createTempStore(InputStream stream) throws IOException
stream
- stream to fill content of store
IOException
public IStore getStore(String storeID) throws IOException
storeID
- id of store.
IOException
- if store can not be found;public abstract IStore getStoreSafe(String storeID)
storeID
- id of store.
public IStore createStore()
public abstract IStore createStore(String storeID)
storeID
- required store id
public IStore createStore(InputStream stream) throws IOException
stream
- stream to fill content of store
IOException
public IStore createStore(String storeid, InputStream stream) throws IOException
storeid
- -id of created storestream
- stream to fill content of store
IOException
public void delete(IStore store)
store
- store to delete;protected static void closeStreamSafe(Object stream)
public IStore prepareForRemoteSending(IRMIStoreAccess rmi, IStore store) throws IOException
rmi
- remote access interfacestore
- store to send to remote side
IOException
- if data cannot be allocated, read or wrotepublic IStore restoreFromRemoteReceiving(IRMIStoreAccess rmi, IStore store) throws IOException
rmi
- remote access interfacestore
- store wich was received
IOException
- if data cannot be allocated, read or wrotepublic abstract String getID()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |