@Override
  public void updateProperties(Resource resource, Request request, Predicate predicate) {

    Set<String> propertyIds = getRequestPropertyIds(request, predicate);
    if (contains(propertyIds, COMPONENT_STATE_PROPERTY_ID)) {
      String serviceName   = (String) resource.getPropertyValue(COMPONENT_SERVICE_NAME_PROPERTY_ID);
      String componentName = (String) resource.getPropertyValue(COMPONENT_COMPONENT_NAME_PROPERTY_ID);
      resource.setProperty(COMPONENT_STATE_PROPERTY_ID, getClusterDefinition().getComponentState(serviceName, componentName));
    }
  }
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/ComponentProvider.java