Class LocalisedEvent
java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
de.gustavblass.fsu.fmi.roombooking.events.LocalisedEvent
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ActorCreatedEvent, EMailChangeEvent, ReservationConfirmedEvent
public class LocalisedEvent
extends org.springframework.context.ApplicationEvent
Represents an
ApplicationEvent that happened in a certain natural language.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @NonNull LocaleThe language that shall be used in the context of thisLocalisedEvent, for example because it's the language of the user whom thisLocalisedEventis associated with.Fields inherited from class EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionLocalisedEvent(Object source, @NonNull Clock clock, @NonNull Locale locale) Constructs a newLocalisedEvent.LocalisedEvent(Object source, @NonNull Locale locale) Constructs a newLocalisedEvent. -
Method Summary
Methods inherited from class org.springframework.context.ApplicationEvent
getTimestampMethods inherited from class EventObject
getSource, toString
-
Field Details
-
locale
The language that shall be used in the context of thisLocalisedEvent, for example because it's the language of the user whom thisLocalisedEventis associated with.
-
-
Constructor Details
-
LocalisedEvent
Constructs a newLocalisedEvent. Uses the current time.- Parameters:
source- TheEventObject.source.locale- Thelocale.
-
LocalisedEvent
public LocalisedEvent(Object source, @NonNull @NonNull Clock clock, @NonNull @NonNull Locale locale) Constructs a newLocalisedEvent.- Parameters:
source- TheEventObject.source.clock- TheApplicationEvent.timestamp.locale- Thelocale.
-