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 javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
/**
|
||||
|
@ -18,10 +19,12 @@ public class Message {
|
|||
|
||||
@JsonProperty("subject")
|
||||
@NotNull
|
||||
@Size(min=1, message="subject cannot be empty")
|
||||
private String subject;
|
||||
|
||||
@JsonProperty("body")
|
||||
@NotNull
|
||||
@Size(min=1, message="body cannot be empty")
|
||||
private String body;
|
||||
|
||||
@JsonProperty("sender")
|
||||
|
@ -38,6 +41,7 @@ public class Message {
|
|||
|
||||
@JsonProperty("recipients")
|
||||
@NotNull
|
||||
@Size(min=1, message="recipient cannot be empty")
|
||||
private List<Recipient> recipients;
|
||||
|
||||
public Message() {
|
||||
|
@ -130,7 +134,7 @@ public class Message {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MessageOutputBeanMixIn [id=" + id + ", subject=" + subject
|
||||
return "Message [id=" + id + ", subject=" + subject
|
||||
+ ", body=" + body + ", senderId=" + senderId + ", sendTime="
|
||||
+ sendTime + ", read=" + read + ", attachmentIds="
|
||||
+ attachmentIds + ", recipients=" + recipients + "]";
|
||||
|
|
Loading…
Reference in New Issue