use of com.axelor.apps.base.service.app.DataBackupService in project axelor-open-suite by axelor.
the class DataBackupController method restoreBackup.
public void restoreBackup(ActionRequest req, ActionResponse res) throws IOException {
DataBackupService dataBackupService = Beans.get(DataBackupService.class);
DataBackup dataBackup = req.getContext().asType(DataBackup.class);
if (dataBackupService.sequencesOrMrpLineTypesExist()) {
res.setError("Remove all Sequences And MrpLineTypes to restore backup");
} else {
dataBackupService.restoreBackUp(dataBackup);
}
res.setReload(true);
}
Aggregations