use of org.jumpmind.symmetric.model.IncomingBatch in project symmetric-ds by JumpMind.
the class RestService method loadProfileImpl.
private void loadProfileImpl(ISymmetricEngine engine, MultipartFile file) {
IDataLoaderService dataLoaderService = engine.getDataLoaderService();
boolean inError = false;
try {
String content = new String(file.getBytes());
List<IncomingBatch> batches = dataLoaderService.loadDataBatch(content);
for (IncomingBatch batch : batches) {
if (batch.getStatus() == Status.ER) {
inError = true;
}
}
} catch (Exception e) {
inError = true;
}
if (inError) {
throw new InternalServerErrorException();
}
}
Aggregations