@Override
  public RequestStatus deleteResources(Request request, Predicate predicate)
      throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {

    Set<Resource> resources = getResources(PropertyHelper.getReadRequest(), predicate);
    for (Resource resource : resources) {
      String resourceId   = (String) resource.getPropertyValue(pkField);
      String instanceName = (String) resource.getPropertyValue(INSTANCE_NAME_PROPERTY_ID);

      try {
        getResourceProvider(instanceName).deleteResource(resourceId);
      } catch (org.apache.ambari.view.NoSuchResourceException e) {
        throw new NoSuchParentResourceException(e.getMessage(), e);
      } catch (org.apache.ambari.view.UnsupportedPropertyException e) {
        throw new UnsupportedPropertyException(getResourceType(e), e.getPropertyIds());
      } catch (Exception e) {
        LOG.error("Caught exception deleting view sub resources.", e);
        throw new SystemException(e.getMessage(), e);
      }
    }
    return new RequestStatusImpl(null);
  }
Construct a view resource provider for the given resource type and bean class.

@param type            the resource type
@param clazz           the resource bean class
@param pkField         the primary key field name
@param viewDefinition  the associated view definition

@throws IntrospectionException if an exception occurs during introspection of the resource bean class
ambari-server/src/main/java/org/apache/ambari/server/view/ViewSubResourceProvider.java