Changed unimportant stuff
This commit is contained in:
parent
1b81b4b3d5
commit
ab789927eb
@ -5,6 +5,8 @@ import java.util.Map;
|
|||||||
|
|
||||||
import javax.persistence.*;
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
import envoy.data.MessageBuilder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Project: <strong>envoy-server-standalone</strong><br>
|
* Project: <strong>envoy-server-standalone</strong><br>
|
||||||
* File: <strong>GroupMessage.java</strong><br>
|
* File: <strong>GroupMessage.java</strong><br>
|
||||||
@ -74,7 +76,26 @@ public class GroupMessage {
|
|||||||
// YET
|
// YET
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO Implement GroupMessageBuilder and add toCommonGroupMessage method here
|
/**
|
||||||
|
* Converts this groupMessage into an instance of
|
||||||
|
* {@link envoy.data.GroupMessage}.
|
||||||
|
*
|
||||||
|
* @return a {@link envoy.data.GroupMessage} containing the same values as this
|
||||||
|
* groupMessage
|
||||||
|
* @since Envoy Server Standalone v0.1-beta
|
||||||
|
*/
|
||||||
|
public envoy.data.GroupMessage toCommonGroupMessage() {
|
||||||
|
// TODO: Attachment
|
||||||
|
envoy.data.GroupMessage groupMessage = new MessageBuilder(sender.getID(), group.getID(), id).setDate(creationDate)
|
||||||
|
.setForwarded(forwarded)
|
||||||
|
.setStatus(status)
|
||||||
|
.setText(text)
|
||||||
|
// .setAttachment(attachment) TODO make this work
|
||||||
|
.buildGroupMessage(group.toCommon(), memberMessageStatus);
|
||||||
|
groupMessage.setReceivedDate(receivedDate);
|
||||||
|
groupMessage.setReadDate(readDate);
|
||||||
|
return groupMessage;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the id
|
* @return the id
|
||||||
|
@ -105,6 +105,7 @@ public class Message {
|
|||||||
.setDate(creationDate)
|
.setDate(creationDate)
|
||||||
.setStatus(status)
|
.setStatus(status)
|
||||||
.setForwarded(forwarded)
|
.setForwarded(forwarded)
|
||||||
|
// .setAttachment(attachment) TODO make this work
|
||||||
.build();
|
.build();
|
||||||
message.setReceivedDate(receivedDate);
|
message.setReceivedDate(receivedDate);
|
||||||
message.setReadDate(readDate);
|
message.setReadDate(readDate);
|
||||||
|
Reference in New Issue
Block a user