Class SimpleFSFileStore
java.lang.Object
com.pnfsoftware.jeb.core.dao.impl.SimpleFSFileStore
- All Implemented Interfaces:
IFileStore
Implementation of a file-store where the record data is kept on the file system.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Retrieve the contents of a file from the store.Get the store location.boolean
Verify 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.boolean
Remove a file from the store.
-
Constructor Details
-
SimpleFSFileStore
-
-
Method Details
-
getStoreLocation
Description copied from interface:IFileStore
Get the store location. Example: a root folder, a base url.- Specified by:
getStoreLocation
in interfaceIFileStore
- Returns:
- the optional store location; may be null
-
has
Description copied from interface:IFileStore
Verify if the given file is contained in the store.- Specified by:
has
in interfaceIFileStore
- Parameters:
key
- file key- Returns:
- presence indicator
-
remove
Description copied from interface:IFileStore
Remove a file from the store.- Specified by:
remove
in interfaceIFileStore
- Parameters:
key
- file key- Returns:
- success indicator
-
get
Description copied from interface:IFileStore
Retrieve the contents of a file from the store.- Specified by:
get
in interfaceIFileStore
- Parameters:
key
- file key- Returns:
- file data, null on error
-
put
Description copied from interface:IFileStore
Store a new file in the store under a store-decided key.- Specified by:
put
in interfaceIFileStore
- Parameters:
data
- file data- Returns:
- the file key, null on error
-
put
Description copied from interface:IFileStore
Store a new file in the store under the given key.- Specified by:
put
in interfaceIFileStore
- Parameters:
key
- file key, null to let the implementor create a new keydata
- file data- Returns:
- the file key, null on error
-
list
Description copied from interface:IFileStore
List all the files in this store.- Specified by:
list
in interfaceIFileStore
- Returns:
- a list of file keys
-