Package org.salespointframework.files
Interface FileStorage
An application service to store
NamedBinary instances and obtain them as Resources.- Since:
- 7.5
- Author:
- Oliver Drotbohm
-
Method Summary
Modifier and TypeMethodDescriptionvoidDeletes all files currently contained in theFileStorage.voiddeleteByName(String filename) Deletes the file with the given name.forUser(UserAccount.UserAccountIdentifier userAccountIdentifier) Returns theFileStoragefor theUserAccountidentified by the givenUserAccount.UserAccountIdentifier.Returns all storedResources.getResource(String filename) Returns theResourcefor the given file name.store(NamedBinary binary) Stores the givenNamedBinary.
-
Method Details
-
store
Stores the givenNamedBinary. Publishes aFileStoredevent 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 storedResources.- Returns:
- will never be null.
-
getResource
Returns theResourcefor 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 theFileStorage. -
deleteByName
Deletes the file with the given name.- Parameters:
filename- must not be null or empty.- Since:
- 9.0
-
forUser
Returns theFileStoragefor theUserAccountidentified by the givenUserAccount.UserAccountIdentifier.- Parameters:
userAccountIdentifier- must not be null.- Returns:
- will never be null.
-