use of org.hisp.dhis.dxf2.webmessage.responses.ImportReportWebMessageResponse in project dhis2-core by dhis2.
the class WebMessageUtils method importReport.
public static WebMessage importReport(ImportReport importReport) {
WebMessage webMessage = new WebMessage();
webMessage.setResponse(new ImportReportWebMessageResponse(importReport));
webMessage.setStatus(importReport.getStatus());
if (webMessage.getStatus() != Status.OK) {
webMessage.setMessage("One more more errors occurred, please see full details in import report.");
webMessage.setStatus(Status.WARNING);
webMessage.setHttpStatus(HttpStatus.CONFLICT);
}
return webMessage;
}
Aggregations