private Collection<Resource> getRequestResources(Long clusterId, String clusterName,
      List<Long> requestIds, Set<String> requestedPropertyIds) {

    Map<Long, Resource> resourceMap = new HashMap<>();

    List<RequestEntity> requests = s_requestDAO.findByPks(requestIds, true);


    //todo: this was (and still is) in ActionManager but this class was changed to not use ActionManager recently
    List<RequestEntity> topologyRequestEntities = new ArrayList<>();
    Collection<? extends org.apache.ambari.server.actionmanager.Request> topologyRequests =
        topologyManager.getRequests(requestIds);
    for (org.apache.ambari.server.actionmanager.Request request : topologyRequests) {
      topologyRequestEntities.add(request.constructNewPersistenceEntity());
    }

    // if requests is empty, map is Collections.emptyMap() which can't be added to so create a new map
    if (requests.isEmpty()) {
      requests = new ArrayList<>();
    }

    requests.addAll(topologyRequestEntities);

    for (RequestEntity re : requests) {
      if ((null == clusterId && (null == re.getClusterId() || -1L == re.getClusterId())) ||          // if cluster IS NOT requested AND the db request is not for a cluster
          (null != clusterId && null != re.getRequestId() && re.getClusterId().equals(clusterId))) { // if cluster IS requested and the request has a cluster id equal to the one requested
        Resource r = getRequestResource(re, clusterName, requestedPropertyIds);
        resourceMap.put(re.getRequestId(), r);
      }
    }

    return resourceMap.values();
  }
Gets all of the request resources for the given properties.
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java