2015-11-23 11:20:20 +01:00
|
|
|
package com.iluwatar.eda.event;
|
|
|
|
|
2015-11-28 15:03:22 +01:00
|
|
|
import com.iluwatar.eda.model.User;
|
|
|
|
|
2015-11-23 11:20:20 +01:00
|
|
|
/**
|
2015-11-28 13:12:16 +01:00
|
|
|
* The {@link UserCreatedEvent} class should should be dispatched whenever a user has been created.
|
2015-11-28 15:03:22 +01:00
|
|
|
* This class can be extended to contain details about the user has been created. In this example,
|
|
|
|
* the entire {@link User} object is passed on as data with the event.
|
2015-11-23 11:20:20 +01:00
|
|
|
*/
|
|
|
|
public class UserCreatedEvent extends Event {
|
2015-11-28 15:03:22 +01:00
|
|
|
|
|
|
|
private User user;
|
|
|
|
|
|
|
|
public UserCreatedEvent(User user) {
|
|
|
|
this.user = user;
|
|
|
|
}
|
|
|
|
|
|
|
|
public User getUser() {
|
|
|
|
return user;
|
|
|
|
}
|
2015-11-23 11:20:20 +01:00
|
|
|
}
|