Add hash field in messages
This commit is contained in:
parent
a30e0591f4
commit
5ad8cded18
@ -10,16 +10,18 @@ public class Message {
|
||||
private Email from;
|
||||
private String subject = "";
|
||||
private String data = "";
|
||||
private String hash = "";
|
||||
private Integer id;
|
||||
|
||||
public Message() {
|
||||
}
|
||||
|
||||
public Message(ArrayList<Email> to, Email from, String subject, String data) {
|
||||
public Message(ArrayList<Email> to, Email from, String subject, String data, String hash) {
|
||||
this.to = to;
|
||||
this.from = from;
|
||||
this.subject = subject;
|
||||
this.data = data;
|
||||
this.hash = hash;
|
||||
}
|
||||
|
||||
public void allFieldsSet() throws MissingInputException {
|
||||
@ -79,6 +81,14 @@ public class Message {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getHash() {
|
||||
return hash;
|
||||
}
|
||||
|
||||
public void setHash(String hash) {
|
||||
this.hash = hash;
|
||||
}
|
||||
|
||||
public String listMessage() {
|
||||
return getId() + " " + getFrom() + " " + getSubject();
|
||||
}
|
||||
@ -88,6 +98,7 @@ public class Message {
|
||||
return "from " + getFrom().toString() + "\n" +
|
||||
"to " + printTo() + "\n" +
|
||||
"subject " + getSubject() + "\n" +
|
||||
"data " + getData() + "\n";
|
||||
"data " + getData() + "\n" +
|
||||
"hash " + getHash() + "\n";
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user