Added EventProcessor and methods to handle MessageStatus changes
additionally cleaned up whole project, fixed some Javadoc errors and added a few database and connection options. Sorry for the huge commit, there was almost no time inbetween where a commit would have been possible, as to solve every problem, a new problem arose. However, as of now, f/message_handling should be ready to be merged into develop, besides that it could not be tested yet.
This commit is contained in:
@ -33,16 +33,42 @@ public class User {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private long id;
|
||||
private String name;
|
||||
private byte[] passwordHash;
|
||||
private long id;
|
||||
private String name;
|
||||
private byte[] passwordHash;
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date lastSeen;
|
||||
private envoy.data.User.UserStatus status;
|
||||
|
||||
@ElementCollection
|
||||
private List<User> contacts;
|
||||
private List<User> contacts;
|
||||
|
||||
/**
|
||||
* Creates an instance of @link{User}.
|
||||
* Solely used for JPA/ Hibernate
|
||||
*
|
||||
* @since Envoy Server Standalone v0.1-alpha
|
||||
*/
|
||||
public User() {}
|
||||
|
||||
/**
|
||||
* Creates an instance of @link{User}.
|
||||
*
|
||||
* @param user the {@link envoy.data.User} to convert
|
||||
* @since Envoy Server Standalone v0.1-alpha
|
||||
*/
|
||||
public User(envoy.data.User user) {
|
||||
id = user.getId();
|
||||
name = user.getName();
|
||||
status = user.getStatus();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a database {@link User} converted into an {@link envoy.data.User}
|
||||
* @since Envoy Server Standalone v0.1-alpha
|
||||
*/
|
||||
public envoy.data.User toCommonUser() { return new envoy.data.User(this.id, this.name); }
|
||||
|
||||
/**
|
||||
* @return the id of a {link envoy.data.User}
|
||||
|
Reference in New Issue
Block a user