2020-06-09 16:51:53 +02:00
|
|
|
package org.gcube.data_catalogue.grsf_publish_ws.AAA_UNNEEDED;
|
2016-10-08 20:46:17 +02:00
|
|
|
|
2020-06-09 16:57:27 +02:00
|
|
|
import org.gcube.datacatalogue.common.AAA_PORTED.Constants;
|
2017-11-09 09:28:22 +01:00
|
|
|
|
2016-10-13 11:46:42 +02:00
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
|
|
2016-10-08 20:46:17 +02:00
|
|
|
/**
|
2017-07-12 18:05:35 +02:00
|
|
|
* A bean used to reply to a product creation/patch method.
|
2016-10-08 20:46:17 +02:00
|
|
|
* @author Costantino Perciante at ISTI-CNR
|
|
|
|
*/
|
|
|
|
public class ResponseCreationBean {
|
|
|
|
|
2017-11-09 09:28:22 +01:00
|
|
|
@JsonProperty(Constants.RESPONSE_CREATE_PATCH_ID)
|
2016-10-08 20:46:17 +02:00
|
|
|
private String id;
|
2016-11-04 16:26:19 +01:00
|
|
|
|
2017-11-09 09:28:22 +01:00
|
|
|
@JsonProperty(Constants.RESPONSE_CREATE_KNOWLEDGE_BASE_ID)
|
2016-11-04 16:26:19 +01:00
|
|
|
private String kbUuid; // the original uuid given by the KB
|
2016-10-13 11:46:42 +02:00
|
|
|
|
2017-11-09 09:28:22 +01:00
|
|
|
@JsonProperty(Constants.RESPONSE_CREATE_PRODUCT_URL)
|
2017-10-04 17:30:07 +02:00
|
|
|
private String itemUrl;
|
2016-10-13 11:46:42 +02:00
|
|
|
|
2017-11-09 09:28:22 +01:00
|
|
|
@JsonProperty(Constants.RESPONSE_CREATE_ERROR_MESSAGE)
|
2016-10-08 20:46:17 +02:00
|
|
|
private String error; // in case of error
|
|
|
|
|
|
|
|
public ResponseCreationBean() {
|
|
|
|
super();
|
|
|
|
}
|
|
|
|
|
2016-10-13 11:46:42 +02:00
|
|
|
/**
|
|
|
|
* @param id
|
2016-11-04 16:26:19 +01:00
|
|
|
* @param kbUuid
|
2016-11-01 22:35:52 +01:00
|
|
|
* @param productUrl
|
2016-10-13 11:46:42 +02:00
|
|
|
* @param error
|
|
|
|
*/
|
2017-07-12 18:05:35 +02:00
|
|
|
public ResponseCreationBean(String id, String kbUuid, String itemUrl,
|
2016-11-04 16:26:19 +01:00
|
|
|
String error) {
|
2016-10-08 20:46:17 +02:00
|
|
|
super();
|
|
|
|
this.id = id;
|
2016-11-04 16:26:19 +01:00
|
|
|
this.kbUuid = kbUuid;
|
2017-02-19 15:53:42 +01:00
|
|
|
this.itemUrl = itemUrl;
|
2016-10-08 20:46:17 +02:00
|
|
|
this.error = error;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getId() {
|
|
|
|
return id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setId(String id) {
|
|
|
|
this.id = id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getError() {
|
|
|
|
return error;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setError(String error) {
|
|
|
|
this.error = error;
|
|
|
|
}
|
|
|
|
|
2016-11-04 16:26:19 +01:00
|
|
|
public String getKbUuid() {
|
|
|
|
return kbUuid;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setKbUuid(String kbUuid) {
|
|
|
|
this.kbUuid = kbUuid;
|
|
|
|
}
|
|
|
|
|
2017-02-19 15:53:42 +01:00
|
|
|
public String getItemUrl() {
|
|
|
|
return itemUrl;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setItemUrl(String itemUrl) {
|
|
|
|
this.itemUrl = itemUrl;
|
2016-11-04 16:26:19 +01:00
|
|
|
}
|
|
|
|
|
2016-10-08 20:46:17 +02:00
|
|
|
@Override
|
|
|
|
public String toString() {
|
2016-11-04 16:26:19 +01:00
|
|
|
return "ResponseCreationBean [id=" + id + ", kbUuid=" + kbUuid
|
2017-02-19 15:53:42 +01:00
|
|
|
+ ", itemUrl=" + itemUrl + ", error=" + error + "]";
|
2016-10-08 20:46:17 +02:00
|
|
|
}
|
2017-02-19 15:53:42 +01:00
|
|
|
|
2017-07-12 18:05:35 +02:00
|
|
|
}
|