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 TypeMethodDescriptionbooleanbelongsTo(UserAccount.UserAccountIdentifier identifier) Returns whether the file stored belongs to theUserAccountwith the givenUserAccount.UserAccountIdentifier.booleanTheResourcefor the file just stored.TheUserAccount.UserAccountIdentifierin case the file was stored in the context of aUserAccount.inthashCode()booleanReturns whether the file stored is a user-specific file.static FileStoredof(Resource resource, Optional<UserAccount.UserAccountIdentifier> userAccountIdentifier) Creates a newFileStoredinstance.toString()
-
Method Details
-
belongsTo
Returns whether the file stored belongs to theUserAccountwith the givenUserAccount.UserAccountIdentifier.- Parameters:
identifier- must not be null.- Returns:
- whether the file stored belongs to the
UserAccountwith 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) Creates a newFileStoredinstance.- Parameters:
resource- TheResourcefor the file just stored.userAccountIdentifier- TheUserAccount.UserAccountIdentifierin case the file was stored in the context of aUserAccount.
-
getResource
TheResourcefor the file just stored. -
getUserAccountIdentifier
TheUserAccount.UserAccountIdentifierin case the file was stored in the context of aUserAccount. -
equals
-
hashCode
public int hashCode() -
toString
-