class StackConfigurationDependencyResourceProvider extends
    ReadOnlyResourceProvider {

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

    final Set<StackConfigurationDependencyRequest> requests =
      new HashSet<>();

    if (predicate == null) {
      requests.add(getRequest(Collections.emptyMap()));
    } else {
      for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
        requests.add(getRequest(propertyMap));
      }
    }

    Set<String> requestedIds = getRequestPropertyIds(request, predicate);

    Set<StackConfigurationDependencyResponse> responses = getResources(new Command<Set<StackConfigurationDependencyResponse>>() {
      @Override
      public Set<StackConfigurationDependencyResponse> invoke() throws AmbariException {
        return getManagementController().getStackConfigurationDependencies(requests);
      }
    });

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

    for (StackConfigurationDependencyResponse response : responses) {
      Resource resource = new ResourceImpl(Type.StackConfigurationDependency);

      setResourceProperty(resource, STACK_NAME_PROPERTY_ID,
          response.getStackName(), requestedIds);

      setResourceProperty(resource, STACK_VERSION_PROPERTY_ID,
          response.getStackVersion(), requestedIds);

      setResourceProperty(resource, SERVICE_NAME_PROPERTY_ID,
          response.getServiceName(), requestedIds);

      setResourceProperty(resource, PROPERTY_NAME_PROPERTY_ID,
          response.getPropertyName(), requestedIds);

      setResourceProperty(resource, DEPENDENCY_NAME_PROPERTY_ID,
          response.getDependencyName(), requestedIds);

      setResourceProperty(resource, DEPENDENCY_TYPE_PROPERTY_ID,
          response.getDependencyType(), requestedIds);


      resources.add(resource);
    }

    return resources;
  }

  protected  StackConfigurationDependencyResourceProvider(AmbariManagementController managementController);

}