@Override
  public Map<Long, ClusterEntity> getResourceEntities(Map<String, Object> properties) {

    String clusterName = (String) properties.get(CLUSTER_NAME);

    if (clusterName == null) {
      Map<Long, ClusterEntity> resourceEntities = new HashMap<>();

      List<ClusterEntity> clusterEntities = clusterDAO.findAll();

      for (ClusterEntity clusterEntity : clusterEntities) {
        resourceEntities.put(clusterEntity.getResource().getId(), clusterEntity);
      }
      return resourceEntities;
    }
    ClusterEntity clusterEntity = clusterDAO.findByName(clusterName);
    return Collections.singletonMap(clusterEntity.getResource().getId(), clusterEntity);
  }
Static initialization.

@param dao  the cluster data access object
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterPrivilegeResourceProvider.java