Ejemplo n.º 1
0
  @Override
  public BulkActionResult bulk(final BulkAction bulkAction) {
    BulkActionResult result = new BulkActionResult();

    if (bulkAction.getType() == BulkAction.Type.DELETE) {
      for (String name : bulkAction.getTargets()) {
        try {
          result.getResults().put(logic.delete(name).getKey(), BulkActionResult.Status.SUCCESS);
        } catch (Exception e) {
          LOG.error("Error performing delete for resource {}", name, e);
          result.getResults().put(name, BulkActionResult.Status.FAILURE);
        }
      }
    }

    return result;
  }
Ejemplo n.º 2
0
 @Override
 public void delete(final String key) {
   logic.delete(key);
 }