public interface BinaryStorageService
Modifier and Type | Method and Description |
---|---|
byte[] |
fetchAsByte(java.lang.String id)
Fetch an already persisted attachment through (
BinaryStorageService.storeRecordAttachment ) from binary
storage as byte array. |
java.io.InputStream |
fetchAsStream(java.lang.String id)
Fetch an already persisted attachment through (
BinaryStorageService.storeRecordAttachment ) from binary
storage as InputStream. |
long |
fetchSize(java.lang.String id)
Fetch size of persisted attachment.
|
void |
remove(java.lang.String id)
Removes folder&file structure from the binary storage, based on the passed key.
|
void |
store(java.lang.String id,
byte[] blob)
Save the attachment byte array content in the binary storage location.
|
void |
store(java.lang.String id,
java.io.InputStream stream)
Save the attachment stream in the binary storage location.
|
void store(java.lang.String id, java.io.InputStream stream) throws BinaryStorageException
id
- String - calculated key (attachment id) from blackboard service based on record Id and file name. The key
will serve to identify (persistence scope) current folder & file inside of binary storage.stream
- InputStream - attachment streamBinaryStorageException
- in case of any exceptionvoid store(java.lang.String id, byte[] blob) throws BinaryStorageException
id
- String - calculated key (attachment id) from blackboard service based on record Id and file name. The key
will serve to identify (persistence scope) current folder & file inside of binary storage.blob
- byte[] - file content to be stored in binary storageBinaryStorageException
- in case of any exceptionbyte[] fetchAsByte(java.lang.String id) throws BinaryStorageException
BinaryStorageService.storeRecordAttachment
) from binary
storage as byte array.id
- String - calculated key (attachment id) from blackboard service based on record Id and file name. The key
value passed by the Blackboard service shall be identically with the same one, passed one step previously
(through the createStorageFile service) in order to get exactly the same file content.BinaryStorageException
- in case of any exceptionjava.io.InputStream fetchAsStream(java.lang.String id) throws BinaryStorageException
BinaryStorageService.storeRecordAttachment
) from binary
storage as InputStream.id
- String - calculated key (attachment id) from blackboard service based on record Id and file name. The key
value passed by the Blackboard service shall be identically with the same one, passed one step previously
(through the createStorageFile service) in order to get exactly the same file content.BinaryStorageException
- in case of any exceptionvoid remove(java.lang.String id) throws BinaryStorageException
id
- String - calculated key (attachment id) from blackboard service based on record Id and file name.BinaryStorageException
- in case of any exceptionlong fetchSize(java.lang.String id) throws BinaryStorageException
id
- BinaryStorageException
- in case of any exception