Package org.salespointframework.files
Class FileStored
java.lang.Object
org.salespointframework.files.FileStored
- All Implemented Interfaces:
org.jmolecules.event.types.DomainEvent
An event published when a
NamedBinary
gets stored.- Since:
- 7.5
- Author:
- Oliver Drotbohm
-
Method Summary
Modifier and TypeMethodDescriptionboolean
belongsTo
(UserAccount.UserAccountIdentifier identifier) Returns whether the file stored belongs to theUserAccount
with the givenUserAccount.UserAccountIdentifier
.boolean
TheResource
for the file just stored.TheUserAccount.UserAccountIdentifier
in case the file was stored in the context of aUserAccount
.int
hashCode()
boolean
Returns whether the file stored is a user-specific file.static FileStored
of
(Resource resource, Optional<UserAccount.UserAccountIdentifier> userAccountIdentifier) toString()
-
Method Details
-
belongsTo
Returns whether the file stored belongs to theUserAccount
with the givenUserAccount.UserAccountIdentifier
.- Parameters:
identifier
- must not be null.- Returns:
- whether the file stored belongs to the
UserAccount
with the givenUserAccount.UserAccountIdentifier
.
-
isUserFile
public boolean isUserFile()Returns whether the file stored is a user-specific file.- Returns:
- whether the file stored is a user-specific file.
-
of
public static FileStored of(Resource resource, Optional<UserAccount.UserAccountIdentifier> userAccountIdentifier) -
getResource
TheResource
for the file just stored. -
getUserAccountIdentifier
TheUserAccount.UserAccountIdentifier
in case the file was stored in the context of aUserAccount
. -
equals
-
hashCode
public int hashCode() -
toString
-