class StackDependencyResourceProvider extends AbstractResourceProvider {

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

    Set<Resource> resources = new HashSet<>();
    Set<Map<String, Object>> requestProps = getPropertyMaps(predicate);

    for (Map<String, Object> properties : requestProps) {
      try {
        resources.addAll(getDependencyResources(properties,
            getRequestPropertyIds(request, predicate)));
      } catch (NoSuchResourceException | NoSuchParentResourceException e) {
        if (requestProps.size() == 1) {
          throw e;
        }
      }
    }
    return resources;
  }

  protected  StackDependencyResourceProvider();

}