class VulnerabilityService implements Constants {

	public List<Map<String, Object>> getVulnerabilitiesDistribution(String assetGroup) throws Exception {

		List<Map<String, Object>> vulnDistributions = new ArrayList<>();
		List<String> vulnTargetTypes = getVulnTargetTypes(assetGroup);
		if (!vulnTargetTypes.isEmpty()) {
			for (String parentType : vulnTargetTypes) {
				vulnDistributions
						.addAll(vulnerabilityRepository.getVulnerabilitiesDistribution(assetGroup, parentType));
			}
		}
		return vulnDistributions;
	}

}