use of org.activityinfo.promise.PromiseExecutionOperation in project activityinfo by bedatadriven.
the class SchemaImporterV3 method persist.
@Override
public void persist(final AsyncCallback<Void> callback) {
List<PromiseExecutionOperation> operations = new ArrayList<>();
for (final FormClass formClass : toSave()) {
operations.add(new PromiseExecutionOperation() {
@Nullable
@Override
public Promise<Void> apply(@Nullable Void aVoid) {
return locator.persist(formClass);
}
});
}
PromisesExecutionGuard.newInstance().executeSerially(operations).then(callback);
}
Aggregations