42 lines
1000 B
Java
42 lines
1000 B
Java
|
package org.gcube.portal.socialnetworking.model.input;
|
||
|
|
||
|
import java.io.Serializable;
|
||
|
|
||
|
import javax.validation.constraints.NotNull;
|
||
|
import javax.validation.constraints.Size;
|
||
|
|
||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||
|
|
||
|
/**
|
||
|
* Recipient message bean
|
||
|
* @author Costantino Perciante at ISTI-CNR
|
||
|
* (costantino.perciante@isti.cnr.it)
|
||
|
*
|
||
|
*/
|
||
|
@JsonIgnoreProperties(ignoreUnknown = true) // ignore in serialization/deserialization
|
||
|
public class Recipient implements Serializable{
|
||
|
|
||
|
private static final long serialVersionUID = 1071412144446514138L;
|
||
|
|
||
|
@JsonProperty("id")
|
||
|
@NotNull(message="recipient id must not be null")
|
||
|
@Size(min=1, message="recipient id must not be empty")
|
||
|
private String id;
|
||
|
|
||
|
public Recipient(String id) {
|
||
|
super();
|
||
|
this.id = id;
|
||
|
}
|
||
|
public String getId() {
|
||
|
return id;
|
||
|
}
|
||
|
public void setId(String id) {
|
||
|
this.id = id;
|
||
|
}
|
||
|
@Override
|
||
|
public String toString() {
|
||
|
return "Recipient [id=" + id + "]";
|
||
|
}
|
||
|
}
|