2017-10-25 16:45:34 +02:00
|
|
|
package org.gcube.data_catalogue.grsf_publish_ws.json.input.others;
|
2016-10-14 18:44:34 +02:00
|
|
|
|
|
|
|
import javax.validation.constraints.NotNull;
|
|
|
|
import javax.validation.constraints.Size;
|
|
|
|
|
2017-11-09 09:28:22 +01:00
|
|
|
import org.gcube.datacatalogue.common.Constants;
|
|
|
|
|
2016-10-14 18:44:34 +02:00
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Bean to be used for input of delete-product methods
|
|
|
|
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
|
|
|
*/
|
|
|
|
@JsonIgnoreProperties(ignoreUnknown = true) // ignore in serialization/deserialization
|
2017-10-04 17:30:07 +02:00
|
|
|
public class DeleteRecord {
|
2016-10-14 18:44:34 +02:00
|
|
|
|
2017-11-09 09:28:22 +01:00
|
|
|
@JsonProperty(Constants.DELETE_RECORD_ID)
|
|
|
|
@NotNull(message= Constants.DELETE_RECORD_ID + " cannot be null")
|
|
|
|
@Size(min=1, message= Constants.DELETE_RECORD_ID + " cannot be empty")
|
2016-10-14 18:44:34 +02:00
|
|
|
private String id;
|
|
|
|
|
2017-10-04 17:30:07 +02:00
|
|
|
public DeleteRecord() {
|
2016-10-14 18:44:34 +02:00
|
|
|
super();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2016-11-06 21:21:11 +01:00
|
|
|
* Create a product deleted bean for the product that had the id 'id'
|
2016-10-14 18:44:34 +02:00
|
|
|
* @param id
|
|
|
|
*/
|
2017-10-04 17:30:07 +02:00
|
|
|
public DeleteRecord(String id) {
|
2016-10-14 18:44:34 +02:00
|
|
|
this.id = id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getId() {
|
|
|
|
return id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setId(String id) {
|
|
|
|
this.id = id;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String toString() {
|
|
|
|
return "DeleteProductBean [id=" + id + "]";
|
|
|
|
}
|
|
|
|
}
|