class VulnerabilityController implements Constants {

	@RequestMapping(path = "/v1/vulnerabilities/summary/{resourceId}", method = RequestMethod.GET)
	public ResponseEntity<Object> getVulnerabilitysummaryByResourceId(
			@PathVariable(name = "resourceId", required = true) String resourceId) {

		DitributionDTO response;
		try {
			response = new DitributionDTO(vulnerabilityService.getVulnerabilitysummaryByResourceId(resourceId));
		} catch (Exception e) {
			LOGGER.error("Exception in getVulnerabilitysummary ", e);
			return ResponseUtils.buildFailureResponse(e);
		}
		return ResponseUtils.buildSucessResponse(response);
	}

}