@Override
  public int updateProperties(Resource resource, Map<String, Object> properties) {
    int requestId = -1;
    if (properties.containsKey(SERVICE_SERVICE_STATE_PROPERTY_ID)) {
      String state       = (String) properties.get(SERVICE_SERVICE_STATE_PROPERTY_ID);
      String serviceName = (String) resource.getPropertyValue(SERVICE_SERVICE_NAME_PROPERTY_ID);

      requestId = getClusterDefinition().setServiceState(serviceName, state);
    }
    return requestId;
  }
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/ServiceProvider.java