code: public static boolean isAuditRequired(String eventType, String outcome) throws AuditServiceUnavailableException {
          AuditService auditService = SecurityUtils.getAuditService();
          if (auditService != null) {
              return auditService.isAuditRequired(eventType, outcome);
          } else {
              throw new AuditServiceUnavailableException();
          }
      }
docs: Check to see if auditing is required for an event type and outcome.
  
  @param eventType SECURITY_AUTHN, SECURITY_AUTHZ, etc
  @param outcome OUTCOME_SUCCESS, OUTCOME_DENIED, etc.
  @return true - events with the type/outcome should be audited
  false - events with the type/outcome should not be audited
  
  @throws AuditServiceUnavailableException