Tabnine Logo
ValidationException.getSeverity
Code IndexAdd Tabnine to your IDE (free)

How to use
getSeverity
method
in
ca.uhn.hl7v2.validation.ValidationException

Best Java code snippets using ca.uhn.hl7v2.validation.ValidationException.getSeverity (Showing top 8 results out of 315)

origin: ca.uhn.hapi/hapi-base

/**
 * @see ca.uhn.hl7v2.validation.ValidationExceptionHandler#hasFailed()
 */
public boolean hasFailed() {
  for (ValidationException ve : exceptions) {
    if (ve.getSeverity() == Severity.ERROR) return true;
  }
  return false;
}
 
origin: ca.uhn.hapi/hapi-osgi-base

/**
 * @see ca.uhn.hl7v2.validation.ValidationExceptionHandler#hasFailed()
 */
public boolean hasFailed() {
  for (ValidationException ve : exceptions) {
    if (ve.getSeverity() == Severity.ERROR) return true;
  }
  return false;
}
 
origin: ca.uhn.hapi/hapi-base

/**
 * Logs all exceptions
 * 
 * @see ca.uhn.hl7v2.validation.CollectingValidationExceptionHandler#onExceptions(ca.uhn.hl7v2.validation.ValidationException[])
 */
public void onExceptions(ValidationException... exceptions) {
  if (firstException == null)
    firstException = exceptions[0];
  for (ValidationException ve : exceptions) {
    switch (ve.getSeverity()) {
      case ERROR : LOG.error("Invalid message", ve); break;
      case WARNING: LOG.warn("Message with warnings", ve); break;
      case INFO: LOG.info("Message with comments", ve); break;
    }
  }
}
origin: ca.uhn.hapi/hapi-osgi-base

/**
 * Logs all exceptions
 * 
 * @see ca.uhn.hl7v2.validation.CollectingValidationExceptionHandler#onExceptions(ca.uhn.hl7v2.validation.ValidationException[])
 */
public void onExceptions(ValidationException... exceptions) {
  if (firstException == null)
    firstException = exceptions[0];
  for (ValidationException ve : exceptions) {
    switch (ve.getSeverity()) {
      case ERROR : LOG.error("Invalid message", ve); break;
      case WARNING: LOG.warn("Message with warnings", ve); break;
      case INFO: LOG.info("Message with comments", ve); break;
    }
  }
}
origin: ca.uhn.hapi/hapi-base

/**
 * Populates the generated response based on the collected
 * {@link ValidationException}s. In case of exceptions, each exception will
 * cause an entry in one or more ERR segments.
 * 
 * @param response response message to be populated
 * @throws HL7Exception
 */
protected void populateResponseMessage(Message response) throws HL7Exception {
  if (response == null)
    return;
  List<ValidationException> exceptions = getExceptions();
  for (int i = 0; i < exceptions.size(); i++) {
    ValidationException ve = exceptions.get(i);
    // TODO respect minimumSeverity here?
    if (ve.getSeverity() == Severity.ERROR) {
      ve.populateResponse(response, getErrorAcknowledgementCode(), i);
    }
  }
}
origin: ca.uhn.hapi/hapi-osgi-base

/**
 * Populates the generated response based on the collected
 * {@link ValidationException}s. In case of exceptions, each exception will
 * cause an entry in one or more ERR segments.
 * 
 * @param response response message to be populated
 * @throws HL7Exception
 */
protected void populateResponseMessage(Message response) throws HL7Exception {
  if (response == null)
    return;
  List<ValidationException> exceptions = getExceptions();
  for (int i = 0; i < exceptions.size(); i++) {
    ValidationException ve = exceptions.get(i);
    // TODO respect minimumSeverity here?
    if (ve.getSeverity() == Severity.ERROR) {
      ve.populateResponse(response, getErrorAcknowledgementCode(), i);
    }
  }
}
origin: ca.uhn.hapi/hapi-base

public void onExceptions(ValidationException... exceptions) {
  for (ValidationException ve : exceptions) {
    switch (ve.getSeverity()) {
    case ERROR:
      error(ve);
      break;
    case INFO:
      info(ve);
      break;
    case WARNING:
      warning(ve);
      break;
    }
  }
}
origin: ca.uhn.hapi/hapi-osgi-base

public void onExceptions(ValidationException... exceptions) {
  for (ValidationException ve : exceptions) {
    switch (ve.getSeverity()) {
    case ERROR:
      error(ve);
      break;
    case INFO:
      info(ve);
      break;
    case WARNING:
      warning(ve);
      break;
    }
  }
}
ca.uhn.hl7v2.validationValidationExceptiongetSeverity

Popular methods of ValidationException

  • <init>
  • setError
  • setSeverity
  • fromHL7Exception
  • getMessage
  • populateResponse
  • setErrorCode
  • setLocation
  • setFieldPosition
  • setSegmentName

Popular in Java

  • Making http requests using okhttp
  • putExtra (Intent)
  • compareTo (BigDecimal)
  • setRequestProperty (URLConnection)
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now