Package org.salespointframework.storage
Interface Storage
An application service to store
NamedBinary
instances and obtain them as Resource
s.- Since:
- 7.5
- Author:
- Oliver Drotbohm
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Deletes all files currently contained in theStorage
.forUser
(UserAccount.UserAccountIdentifier userAccountIdentifier) Returns all storedResource
s.getResource
(String filename) Returns theResource
for the given file name.store
(NamedBinary binary) Stores the givenNamedBinary
.
-
Method Details
-
store
Stores the givenNamedBinary
. Publishes aFileStored
event for other interested parties to react to just stored files.- Parameters:
binary
- must not be null.- Returns:
- will never be null.
-
getAllResources
Streamable<Resource> getAllResources()Returns all storedResource
s.- Returns:
- will never be null.
-
getResource
Returns theResource
for the given file name.- Parameters:
filename
- must not be null or empty.- Returns:
- will never be null.
-
deleteAll
void deleteAll()Deletes all files currently contained in theStorage
. -
forUser
- Parameters:
userAccountIdentifier
- must not be null.- Returns:
- will never be null.
-