Пример #1
0
    /** @see java.lang.Object#equals(java.lang.Object) */
    public boolean equals(Object obj) {
      if (obj == null) {
        return false;
      }

      AuditError error = (AuditError) obj;
      boolean retval = true;

      retval &= getErrorKey().equals(error.getErrorKey());
      retval &= getMessageKey().equals(error.getMessageKey());
      retval &= getLink().equals(error.getLink());

      retval &= Arrays.equals(getParams(), error.getParams());

      return retval;
    }
Пример #2
0
 /**
  * This method is to put validation errors on UI
  *
  * @param errors List of validation errors which has to be displayed on UI.
  */
 protected void setValidationErrorMessage(List<AuditError> errors) {
   LOG.info("Error list size:" + errors.size() + errors.toString());
   List<AuditError> auditErrors = new ArrayList<AuditError>();
   for (AuditError error : errors) {
     auditErrors.add(
         new AuditError(
             error.getErrorKey(),
             Constants.GRANTS_GOV_GENERIC_ERROR_KEY,
             error.getLink(),
             new String[] {error.getMessageKey()}));
   }
   if (!auditErrors.isEmpty()) {
     KNSGlobalVariables.getAuditErrorMap()
         .put(
             "grantsGovAuditErrors",
             new AuditCluster(
                 Constants.GRANTS_GOV_OPPORTUNITY_PANEL, auditErrors, Constants.GRANTSGOV_ERRORS));
   }
 }