use of org.hisp.dhis.feedback.TypeReport in project dhis2-core by dhis2.
the class AbstractCrudController method addCollectionItems.
private WebMessage addCollectionItems(String pvProperty, T object, IdentifiableObjects items) throws Exception {
preUpdateItems(object, items);
TypeReport deletions = collectionService.delCollectionItems(object, pvProperty, items.getDeletions());
TypeReport additions = collectionService.addCollectionItems(object, pvProperty, items.getAdditions());
postUpdateItems(object, items);
return typeReport(deletions.mergeAllowEmpty(additions));
}
use of org.hisp.dhis.feedback.TypeReport in project dhis2-core by dhis2.
the class AbstractCrudController method deleteCollectionItems.
private WebMessage deleteCollectionItems(String pvProperty, T object, IdentifiableObjects items) throws Exception {
preUpdateItems(object, items);
TypeReport report = collectionService.delCollectionItems(object, pvProperty, items.getIdentifiableObjects());
postUpdateItems(object, items);
return typeReport(report);
}
Aggregations