aboutsummaryrefslogtreecommitdiff
path: root/juick-server-web/src/main/java/com/juick/server/component/UserUpdatedEvent.java
blob: 059aeefdaca015e84830cf4432127e0626aae9a2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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;
    }
}