From c411409249737b094fa564ec3fdeb21ac04d4dce Mon Sep 17 00:00:00 2001 From: Notmoo Date: Wed, 26 Jul 2017 19:52:04 +0200 Subject: [PATCH] Clss Message : ajout attribut user et replyTo --- .../pqt/core/entities/messages/Message.java | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/Workspace/core/src/main/java/com/pqt/core/entities/messages/Message.java b/Workspace/core/src/main/java/com/pqt/core/entities/messages/Message.java index 78080326..e6f83a95 100644 --- a/Workspace/core/src/main/java/com/pqt/core/entities/messages/Message.java +++ b/Workspace/core/src/main/java/com/pqt/core/entities/messages/Message.java @@ -1,6 +1,7 @@ package com.pqt.core.entities.messages; import com.pqt.core.entities.members.PqtMember; +import com.pqt.core.entities.user_account.Account; import java.util.ArrayList; import java.util.HashMap; @@ -12,15 +13,19 @@ public class Message { private Map fields; private MessageType type; private PqtMember emitter, receiver; + private Account user; + private Message replyTo; - public Message(MessageType type, PqtMember emitter, PqtMember receiver) { - this(type, emitter, receiver, null); + public Message(MessageType type, PqtMember emitter, PqtMember receiver, Account user, Message replyTo) { + this(type, emitter, receiver, user, replyTo, null); } - public Message(MessageType type, PqtMember emitter, PqtMember receiver, Map fields) { + public Message(MessageType type, PqtMember emitter, PqtMember receiver, Account user, Message replyTo, Map fields) { this.emitter = emitter; this.receiver = receiver; this.type = type; + this.user = user; + this.replyTo = replyTo; this.fields = new HashMap<>(); if(fields!=null) for(String key : fields.keySet()){ @@ -51,4 +56,12 @@ public class Message { public MessageType getType() { return type; } + + public Account getUser() { + return user; + } + + public Message getReplyTo() { + return replyTo; + } }