model minor fixes
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/social-networking/social-networking-service-model@163355 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
9981a29e90
commit
3a4c65e88f
|
@ -5,6 +5,7 @@ import java.util.Calendar;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
/**
|
/**
|
||||||
|
@ -18,10 +19,12 @@ public class Message {
|
||||||
|
|
||||||
@JsonProperty("subject")
|
@JsonProperty("subject")
|
||||||
@NotNull
|
@NotNull
|
||||||
|
@Size(min=1, message="subject cannot be empty")
|
||||||
private String subject;
|
private String subject;
|
||||||
|
|
||||||
@JsonProperty("body")
|
@JsonProperty("body")
|
||||||
@NotNull
|
@NotNull
|
||||||
|
@Size(min=1, message="body cannot be empty")
|
||||||
private String body;
|
private String body;
|
||||||
|
|
||||||
@JsonProperty("sender")
|
@JsonProperty("sender")
|
||||||
|
@ -38,6 +41,7 @@ public class Message {
|
||||||
|
|
||||||
@JsonProperty("recipients")
|
@JsonProperty("recipients")
|
||||||
@NotNull
|
@NotNull
|
||||||
|
@Size(min=1, message="recipient cannot be empty")
|
||||||
private List<Recipient> recipients;
|
private List<Recipient> recipients;
|
||||||
|
|
||||||
public Message() {
|
public Message() {
|
||||||
|
@ -130,7 +134,7 @@ public class Message {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "MessageOutputBeanMixIn [id=" + id + ", subject=" + subject
|
return "Message [id=" + id + ", subject=" + subject
|
||||||
+ ", body=" + body + ", senderId=" + senderId + ", sendTime="
|
+ ", body=" + body + ", senderId=" + senderId + ", sendTime="
|
||||||
+ sendTime + ", read=" + read + ", attachmentIds="
|
+ sendTime + ", read=" + read + ", attachmentIds="
|
||||||
+ attachmentIds + ", recipients=" + recipients + "]";
|
+ attachmentIds + ", recipients=" + recipients + "]";
|
||||||
|
|
Loading…
Reference in New Issue