@Override
  public Set<Resource> getResources(Request request, Predicate predicate)
      throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {

    Set<Resource> resultSet = new HashSet<Resource>();

    for (Resource resource : getResources()) {
      if (predicate == null || predicate.evaluate(resource)) {
        ResourceImpl newResource = new ResourceImpl(resource);
        updateProperties(newResource, request, predicate);
        resultSet.add(newResource);
      }
    }
    return resultSet;
  }
Construct a resource provider based on the given cluster definition.

@param clusterDefinition  the cluster definition
contrib/ambari-scom/ambari-scom-server/src/main/java/org/apache/ambari/msi/AbstractResourceProvider.java