@Override
  public RequestStatus deleteResources(Request request, Predicate predicate)
      throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {
    Authentication authentication = AuthorizationHelper.getAuthentication();

    if (authentication == null || !authentication.isAuthenticated()) {
      throw new AuthorizationException("Authentication data is not available, authorization to perform the requested operation is not granted");
    } else if (!isAuthorizedToDeleteResources(authentication, predicate)) {
      throw new AuthorizationException("The authenticated user does not have the appropriate authorizations to delete the requested resource(s)");
    }

    return deleteResourcesAuthorized(request, predicate);
  }
Delete the resources selected by the given predicate.
<p/>
This implementation attempts to authorize the authenticated user before performing the requested
operation. If authorization fails, an AuthorizationException will be thrown.
<p/>
This method may be overwritten by implementing classes to avoid performing authorization checks
to delete resources.


@param request
@param predicate the predicate object which can be used to filter which
                 resources are deleted
@return the request status
@throws SystemException               an internal system exception occurred
@throws UnsupportedPropertyException  the request contains unsupported property ids
@throws NoSuchResourceException       the resource instance to be deleted doesn't exist
@throws NoSuchParentResourceException a parent resource of the resource doesn't exist
@throws AuthorizationException        if the authenticated user is not authorized to perform this operation
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractAuthorizedResourceProvider.java