class AbstractBundleHintProvider implements ComponentBundleHintProvider {

    @Override
    public Map<Long, BundleHintsResponse> provide(Namespace namespace, SecurityContext securityContext, Subject subject) {

        Map<Long, BundleHintsResponse> hintMap = new HashMap<>();
        Collection<NamespaceServiceClusterMap> serviceMappings = environmentService.listServiceClusterMapping(
                namespace.getId(), getServiceName());
        for (NamespaceServiceClusterMap mapping : serviceMappings) {
            Long clusterId = mapping.getClusterId();
            Cluster cluster = environmentService.getCluster(clusterId);
            if (cluster == null) {
                throw new RuntimeException(new ClusterNotFoundException(clusterId));
            }

            BundleHintsResponse response = new BundleHintsResponse(cluster, getHintsOnCluster(cluster, securityContext, subject));
            hintMap.put(clusterId, response);
        }

        return hintMap;
    }

}