class VulnerabilityService implements Constants {

	public List<Map<String, Object>> getVulnerabilityByAppAndEnv(String assetGroup, String filter, String application)
			throws Exception {

		List<Map<String, Object>> vulnApplications = new ArrayList<>();
		List<String> vulnTargetTypes = getVulnTargetTypes(assetGroup);

		if (!vulnTargetTypes.isEmpty()) {
			for (String parentType : vulnTargetTypes) {
				vulnApplications.addAll(vulnerabilityRepository.getVulnerabilyAcrossAppAndEnv(assetGroup, filter,
						application, parentType, null));
			}
		}

		return vulnApplications;
	}

}