aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/service/component/UserUpdatedEvent.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/service/component/UserUpdatedEvent.java')
-rw-r--r--src/main/java/com/juick/service/component/UserUpdatedEvent.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/main/java/com/juick/service/component/UserUpdatedEvent.java b/src/main/java/com/juick/service/component/UserUpdatedEvent.java
new file mode 100644
index 00000000..af2f579a
--- /dev/null
+++ b/src/main/java/com/juick/service/component/UserUpdatedEvent.java
@@ -0,0 +1,23 @@
+package com.juick.service.component;
+
+import com.juick.User;
+import org.springframework.context.ApplicationEvent;
+import org.springframework.lang.NonNull;
+
+public class UserUpdatedEvent extends ApplicationEvent {
+ private User user;
+ /**
+ * Generated when user is updated (avatar changed, etc).
+ *
+ * @param source the object on which the event initially occurred (never {@code null})
+ * @param user updated user
+ */
+ public UserUpdatedEvent(@NonNull Object source, User user) {
+ super(source);
+ this.user = user;
+ }
+
+ public User getUser() {
+ return user;
+ }
+}