Package com.pnfsoftware.jeb.core.dao
Interface IFileStore
- All Known Implementing Classes:
MemoryFileStore,SimpleFSFileStore
public interface IFileStore
Definition of a binary file store: a store where artifacts are byte arrays uniquely identified by
a key.
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]Retrieve the contents of a file from the store.Get the store location.booleanVerify if the given file is contained in the store.list()List all the files in this store.put(byte[] data) Store a new file in the store under a store-decided key.Store a new file in the store under the given key.booleanRemove a file from the store.
-
Method Details
-
getStoreLocation
String getStoreLocation()Get the store location. Example: a root folder, a base url.- Returns:
- the optional store location; may be null
-
has
Verify if the given file is contained in the store.- Parameters:
key- file key- Returns:
- presence indicator
-
remove
Remove a file from the store.- Parameters:
key- file key- Returns:
- success indicator
-
get
Retrieve the contents of a file from the store.- Parameters:
key- file key- Returns:
- file data, null on error
-
put
Store a new file in the store under the given key.- Parameters:
key- file key, null to let the implementor create a new keydata- file data- Returns:
- the file key, null on error
-
put
Store a new file in the store under a store-decided key.- Parameters:
data- file data- Returns:
- the file key, null on error
-
list
List all the files in this store.- Returns:
- a list of file keys
-