geoportal-data-entry-app/src/main/java/org/gcube/portlets/user/geoportaldataentry/shared/CommitReport.java

160 lines
2.7 KiB
Java

package org.gcube.portlets.user.geoportaldataentry.shared;
import java.io.Serializable;
/**
* The Class CommitReport.
*
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
*
* Jul 30, 2021
*/
public class CommitReport implements Serializable {
/**
*
*/
private static final long serialVersionUID = -9519707669761939L;
/**
* The Enum STATE.
*
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
*
* Oct 21, 2020
*/
public enum STATE {
ERROR, WARN, OK, UNKNOWN
}
public STATE state = STATE.UNKNOWN;
public Long recordId;
public String mongoId;
public String msg;
public String report;
/**
* Instantiates a new commit report.
*/
public CommitReport() {
}
/**
* Instantiates a new commit report.
*
* @param state the state
* @param recordId the record id
* @param mongoId the mongo id
* @param msg the msg
* @param report the report
*/
public CommitReport(STATE state, long recordId, String mongoId, String msg, String report) {
super();
this.state = state;
this.mongoId = mongoId;
this.msg = msg;
this.report = report;
}
/**
* Gets the state.
*
* @return the state
*/
public STATE getState() {
return state;
}
/**
* Sets the state.
*
* @param state the new state
*/
public void setState(STATE state) {
this.state = state;
}
// /**
// * Gets the record id.
// *
// * @return the record id
// */
// public Long getRecordId() {
// return recordId;
// }
/**
* Gets the report.
*
* @return the report
*/
public String getReport() {
return report;
}
/**
* Sets the report.
*
* @param report the new report
*/
public void setReport(String report) {
this.report = report;
}
// /**
// * Sets the record id.
// *
// * @param recordId the new record id
// */
// public void setRecordId(long recordId) {
// this.recordId = recordId;
// }
/**
* Gets the msg.
*
* @return the msg
*/
public String getMsg() {
return msg;
}
public String getMongoId() {
return mongoId;
}
public void setMongoId(String mongoId) {
this.mongoId = mongoId;
}
/**
* Sets the msg.
*
* @param msg the new msg
*/
public void setMsg(String msg) {
this.msg = msg;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("CommitReport [state=");
builder.append(state);
builder.append(", recordId=");
builder.append(recordId);
builder.append(", mongoId=");
builder.append(mongoId);
builder.append(", msg=");
builder.append(msg);
builder.append(", report=");
builder.append(report);
builder.append("]");
return builder.toString();
}
}