@Override
  public RequestStatus updateResources(Request request, Predicate predicate)
      throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {
    Iterator<Map<String,Object>> iterator = request.getProperties().iterator();

    if (iterator.hasNext()) {
      Map<String,Object> propertyMap = iterator.next();
      Set<Resource>      resources   = getResources(request, predicate);

      for (Resource resource : resources) {
        String resourceId   = (String) resource.getPropertyValue(pkField);
        String instanceName = (String) resource.getPropertyValue(INSTANCE_NAME_PROPERTY_ID);

        try {
          getResourceProvider(instanceName).updateResource(resourceId, propertyMap);
        } 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 updating 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