aboutsummaryrefslogtreecommitdiff
path: root/juick-server-web/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server-web/src/main')
-rw-r--r--juick-server-web/src/main/java/com/juick/server/component/UserUpdatedEvent.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/juick-server-web/src/main/java/com/juick/server/component/UserUpdatedEvent.java b/juick-server-web/src/main/java/com/juick/server/component/UserUpdatedEvent.java
new file mode 100644
index 00000000..059aeefd
--- /dev/null
+++ b/juick-server-web/src/main/java/com/juick/server/component/UserUpdatedEvent.java
@@ -0,0 +1,23 @@
+package com.juick.server.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;
+ }
+}