@Override @SuppressWarnings("unchecked") public List<AwardSyncLog> getLogsFromAuditErrors(AwardSyncStatus awardStatus) { List<AwardSyncLog> result = new ArrayList<AwardSyncLog>(); for (Object object : GlobalVariables.getAuditErrorMap().values()) { AuditCluster cluster = (AuditCluster) object; boolean logSuccess = StringUtils.equals(cluster.getCategory(), Constants.AUDIT_WARNINGS); for (AuditError error : (List<AuditError>) cluster.getAuditErrorList()) { awardStatus.addValidationLog( expandErrorString(error.getMessageKey(), error.getParams()), logSuccess, error.getMessageKey()); } } GlobalVariables.getAuditErrorMap().clear(); return result; }
protected boolean copyAuditErrorsToPage(String auditClusterCategory, String errorkey) { boolean auditClusterFound = false; Iterator<String> iter = getGlobalVariableService().getAuditErrorMap().keySet().iterator(); while (iter.hasNext()) { String errorKey = (String) iter.next(); AuditCluster auditCluster = getGlobalVariableService().getAuditErrorMap().get(errorKey); if (auditClusterCategory == null || StringUtils.equalsIgnoreCase(auditCluster.getCategory(), auditClusterCategory)) { auditClusterFound = true; for (Object error : auditCluster.getAuditErrorList()) { AuditError auditError = (AuditError) error; getGlobalVariableService() .getMessageMap() .putError( errorKey == null ? auditError.getErrorKey() : errorKey, auditError.getMessageKey(), auditError.getParams()); } } } return auditClusterFound; }