class VulnerabilityRepository implements Constants {

	public List<Map<String, Object>> getAllVulnerabilities(List<String> vulnAssetsAffectedQids) throws DataException {

		List<Map<String, Object>> results = new ArrayList<>();
		StringBuilder urlToQuery = new StringBuilder(esUrl).append("/qualys-kb/kb/_search");
		String responseJson = "";
		try {
			for (int index = 0; index <= (vulnAssetsAffectedQids.size() / THOUSAND_TWENTY_FOUR); index++) {
				int from = index * THOUSAND_TWENTY_FOUR;
				int to = from + THOUSAND_TWENTY_FOUR;
				if (vulnAssetsAffectedQids.size() < to) {
					to = vulnAssetsAffectedQids.size();
				}
				StringBuilder requestBody = new StringBuilder(
						"{\"size\":10000,\"query\":{\"bool\":{\"must\":[{\"match\":{\"latest\":\"true\"}},{\"terms\":{\"qid.keyword\":");
				requestBody.append(vulnAssetsAffectedQids.subList(from, to));
				requestBody.append("}}");
				requestBody.append("]}}}");
				responseJson = PacHttpUtils.doHttpPost(urlToQuery.toString(), requestBody.toString());
				elasticSearchRepository.processResponseAndSendTheScrollBack(responseJson, results);
			}
		} catch (Exception e) {
			LOGGER.error("Error in getVulnerabilityData", e);
			throw new DataException();
		}
		return results;
	}

}