class ComplianceRepositoryImpl implements ComplianceRepository, Constants {

    @Override
    public Boolean exemptAndUpdateIssueDetails(IssueResponse issueException) throws DataException {
        try {
            List<Map<String, Object>> issueDetails = getOpenIssueDetails(issueException.getIssueId());
            if (!issueDetails.isEmpty()) {
                Map<String, Object> issueDetail = issueDetails.get(0);
                Map<String, Object> issueExceptionDetails = issueException.getIssueExceptionDetails();
                issueExceptionDetails.put(TARGET_TYPE, String.valueOf(issueDetail.get(TARGET_TYPE)));
                issueExceptionDetails.put("source", "issueException");
                issueExceptionDetails.put("resourceId", String.valueOf(issueDetail.get(RESOURCEID)));
                String dataSource = issueDetail.get(PAC_DS) + "_" + issueDetail.get(TARGET_TYPE);
                String targetType = issueDetail.get(TYPE) + "_" + issueDetail.get(TARGET_TYPE);
                String id = String.valueOf(issueDetail.get(ES_DOC_ID_KEY));
                String routing = String.valueOf(issueDetail.get(ES_DOC_ROUTING_KEY));
                String parent = String.valueOf(issueDetail.get(ES_DOC_PARENT_KEY));
                Map<String, Object> partialDocument = Maps.newHashMap();
                partialDocument.put(ISSUE_STATUS, EXEMPTED);
                SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT, Locale.US);
                sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
                partialDocument.put(MODIFIED_DATE, sdf.format(new Date()));
                partialDocument.put(STATUS, "enforced");
                Boolean isUpdated = elasticSearchRepository.updatePartialDataToES(dataSource, targetType, id, routing,
                        parent, partialDocument);
                if (isUpdated) {
                    return elasticSearchRepository.saveExceptionDataToES(dataSource, routing, issueExceptionDetails);
                }
            }
            return false;
        } catch (Exception e) {
            throw new DataException(e);
        }
    }

}