use of com.intel.mtwilson.datatypes.RepositoryDeleteException in project OpenAttestation by OpenAttestation.
the class KvAttributeRepository method delete.
@Override
public // @RequiresPermissions("tag_kv_attributes:delete,search")
void delete(KvAttributeFilterCriteria criteria) {
log.debug("KvAttribute:Delete - Got request to delete KvAttribute by search criteria.");
KvAttributeCollection objCollection = search(criteria);
try {
for (KvAttribute obj : objCollection.getKvAttributes()) {
KvAttributeLocator locator = new KvAttributeLocator();
locator.id = obj.getId();
delete(locator);
}
} catch (RepositoryException re) {
throw re;
} catch (Exception ex) {
log.error("KvAttribute:Delete - Error during KvAttribute deletion.", ex);
throw new RepositoryDeleteException(ex);
}
}
Aggregations