2019-04-05 16:39:46 +02:00
|
|
|
package org.gcube.portal.social.networking.ws.outputs;
|
|
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Response bean
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
public class ResponseBean implements Serializable {
|
|
|
|
|
|
|
|
private static final long serialVersionUID = -2725238162673879658L;
|
2022-04-07 16:25:26 +02:00
|
|
|
/**
|
|
|
|
* The result of the request: true if it succeeded, false otherwise
|
|
|
|
*/
|
2019-04-05 16:39:46 +02:00
|
|
|
private boolean success;
|
|
|
|
|
2022-04-07 16:25:26 +02:00
|
|
|
/**
|
|
|
|
* An error message if something wrong happened, null/empty otherwise
|
|
|
|
*/
|
2019-04-05 16:39:46 +02:00
|
|
|
private String message;
|
2022-04-07 16:25:26 +02:00
|
|
|
/**
|
|
|
|
* The result object of the request
|
|
|
|
*/
|
2019-04-05 16:39:46 +02:00
|
|
|
private Object result;
|
|
|
|
|
|
|
|
public ResponseBean() {
|
|
|
|
super();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param success
|
|
|
|
* @param message
|
|
|
|
* @param result
|
2023-11-13 11:33:37 +01:00
|
|
|
*/
|
2019-04-05 16:39:46 +02:00
|
|
|
public ResponseBean(boolean success, String message, Object result) {
|
|
|
|
super();
|
|
|
|
this.success = success;
|
|
|
|
this.message = message;
|
|
|
|
this.result = result;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public boolean isSuccess() {
|
|
|
|
return success;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void setSuccess(boolean success) {
|
|
|
|
this.success = success;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public String getMessage() {
|
|
|
|
return message;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void setMessage(String message) {
|
|
|
|
this.message = message;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Object getResult() {
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void setResult(Object result) {
|
|
|
|
this.result = result;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String toString() {
|
|
|
|
return "ResponseBean [success=" + success
|
|
|
|
+ ", message=" + message + ", result=" + result + "]";
|
|
|
|
}
|
|
|
|
}
|