use of org.openforis.collect.io.metadata.codelist.CodeListImportTask in project collect by openforis.
the class CodeListsVM method jobFailed.
@GlobalCommand
public void jobFailed(@BindingParam("job") Job job) {
closeJobStatusPopUp();
if (job instanceof CodeListBatchImportJob && job.getCurrentTask() != null) {
CodeListImportTask lastTask = (CodeListImportTask) ((CodeListBatchImportJob) job).getCurrentTask();
dataImportErrorPopUp = ReferenceDataImportErrorPopUpVM.showPopUp(lastTask.getErrors(), Labels.getLabel("survey.code_list.import_data.error_popup.title", new String[] { lastTask.getEntryName() }));
} else {
String errorMessageKey = job.getErrorMessage();
String errorMessage = StringUtils.defaultIfBlank(Labels.getLabel(errorMessageKey), errorMessageKey);
MessageUtil.showError("global.job_status.failed.message", errorMessage);
}
clearJob(job);
}
Aggregations