Tabnine Logo
ResultSeverityEnum.ordinal
Code IndexAdd Tabnine to your IDE (free)

How to use
ordinal
method
in
ca.uhn.fhir.validation.ResultSeverityEnum

Best Java code snippets using ca.uhn.fhir.validation.ResultSeverityEnum.ordinal (Showing top 10 results out of 315)

origin: jamesagnew/hapi-fhir

/**
 * Sets the minimum severity at which an issue detected by the validator will result in a header being added to the
 * response. Default is {@link ResultSeverityEnum#INFORMATION}. Set to <code>null</code> to disable this behaviour.
 * 
 * @see #setResponseHeaderName(String)
 * @see #setResponseHeaderValue(String)
 */
public void setAddResponseHeaderOnSeverity(ResultSeverityEnum theSeverity) {
  myAddResponseIssueHeaderOnSeverity = theSeverity != null ? theSeverity.ordinal() : null;
}
origin: jamesagnew/hapi-fhir

/**
 * If the validation produces a result with at least the given severity, a header with the name
 * specified by {@link #setResponseOutcomeHeaderName(String)} will be added containing a JSON encoded
 * OperationOutcome resource containing the validation results.
 */
public void setAddResponseOutcomeHeaderOnSeverity(ResultSeverityEnum theAddResponseOutcomeHeaderOnSeverity) {
  myAddResponseOutcomeHeaderOnSeverity = theAddResponseOutcomeHeaderOnSeverity != null ? theAddResponseOutcomeHeaderOnSeverity.ordinal() : null;
}
origin: jamesagnew/hapi-fhir

/**
 * Sets the minimum severity at which an issue detected by the validator will fail/reject the request. Default is
 * {@link ResultSeverityEnum#ERROR}. Set to <code>null</code> to disable this behaviour.
 */
public void setFailOnSeverity(ResultSeverityEnum theSeverity) {
  myFailOnSeverity = theSeverity != null ? theSeverity.ordinal() : null;
}
origin: jamesagnew/hapi-fhir

public ValidationResult(FhirContext theCtx, List<SingleValidationMessage> theMessages) {
  boolean successful = true;
  myCtx = theCtx;
  myMessages = theMessages;
  for (SingleValidationMessage next : myMessages) {
    next.getSeverity();
    if (next.getSeverity() == null || next.getSeverity().ordinal() > ResultSeverityEnum.WARNING.ordinal()) {
      successful = false;
    }
  }
  myIsSuccessful = successful;
}
origin: ca.uhn.hapi.fhir/hapi-fhir-server

/**
 * Sets the minimum severity at which an issue detected by the validator will result in a header being added to the
 * response. Default is {@link ResultSeverityEnum#INFORMATION}. Set to <code>null</code> to disable this behaviour.
 * 
 * @see #setResponseHeaderName(String)
 * @see #setResponseHeaderValue(String)
 */
public void setAddResponseHeaderOnSeverity(ResultSeverityEnum theSeverity) {
  myAddResponseIssueHeaderOnSeverity = theSeverity != null ? theSeverity.ordinal() : null;
}
origin: ca.uhn.hapi.fhir/hapi-fhir-server

/**
 * Sets the minimum severity at which an issue detected by the validator will fail/reject the request. Default is
 * {@link ResultSeverityEnum#ERROR}. Set to <code>null</code> to disable this behaviour.
 */
public void setFailOnSeverity(ResultSeverityEnum theSeverity) {
  myFailOnSeverity = theSeverity != null ? theSeverity.ordinal() : null;
}
origin: ca.uhn.hapi.fhir/hapi-fhir-server

/**
 * If the validation produces a result with at least the given severity, a header with the name
 * specified by {@link #setResponseOutcomeHeaderName(String)} will be added containing a JSON encoded
 * OperationOutcome resource containing the validation results.
 */
public void setAddResponseOutcomeHeaderOnSeverity(ResultSeverityEnum theAddResponseOutcomeHeaderOnSeverity) {
  myAddResponseOutcomeHeaderOnSeverity = theAddResponseOutcomeHeaderOnSeverity != null ? theAddResponseOutcomeHeaderOnSeverity.ordinal() : null;
}
origin: jamesagnew/hapi-fhir

boolean found = false;
for (SingleValidationMessage next : validationResult.getMessages()) {
  if (next.getSeverity().ordinal() >= myAddResponseIssueHeaderOnSeverity) {
    addResponseIssueHeader(theRequestDetails, next);
    found = true;
  if (next.getSeverity().ordinal() >= myFailOnSeverity) {
    postProcessResultOnFailure(theRequestDetails, validationResult);
    fail(theRequestDetails, validationResult);
IBaseOperationOutcome outcome = null;
for (SingleValidationMessage next : validationResult.getMessages()) {
  if (next.getSeverity().ordinal() >= myAddResponseOutcomeHeaderOnSeverity) {
    outcome = validationResult.toOperationOutcome();
    break;
if (outcome == null && myAddResponseOutcomeHeaderOnSeverity != null && myAddResponseOutcomeHeaderOnSeverity == ResultSeverityEnum.INFORMATION.ordinal()) {
  FhirContext ctx = theRequestDetails.getServer().getFhirContext();
  outcome = OperationOutcomeUtil.newInstance(ctx);
origin: ca.uhn.hapi.fhir/hapi-fhir-base

public ValidationResult(FhirContext theCtx, List<SingleValidationMessage> theMessages) {
  boolean successful = true;
  myCtx = theCtx;
  myMessages = theMessages;
  for (SingleValidationMessage next : myMessages) {
    next.getSeverity();
    if (next.getSeverity() == null || next.getSeverity().ordinal() > ResultSeverityEnum.WARNING.ordinal()) {
      successful = false;
    }
  }
  myIsSuccessful = successful;
}
origin: ca.uhn.hapi.fhir/hapi-fhir-server

boolean found = false;
for (SingleValidationMessage next : validationResult.getMessages()) {
  if (next.getSeverity().ordinal() >= myAddResponseIssueHeaderOnSeverity) {
    addResponseIssueHeader(theRequestDetails, next);
    found = true;
  if (next.getSeverity().ordinal() >= myFailOnSeverity) {
    postProcessResultOnFailure(theRequestDetails, validationResult);
    fail(theRequestDetails, validationResult);
IBaseOperationOutcome outcome = null;
for (SingleValidationMessage next : validationResult.getMessages()) {
  if (next.getSeverity().ordinal() >= myAddResponseOutcomeHeaderOnSeverity) {
    outcome = validationResult.toOperationOutcome();
    break;
if (outcome == null && myAddResponseOutcomeHeaderOnSeverity != null && myAddResponseOutcomeHeaderOnSeverity == ResultSeverityEnum.INFORMATION.ordinal()) {
  FhirContext ctx = theRequestDetails.getServer().getFhirContext();
  outcome = OperationOutcomeUtil.newInstance(ctx);
ca.uhn.fhir.validationResultSeverityEnumordinal

Popular methods of ResultSeverityEnum

  • fromCode
  • name
  • values
  • getCode
  • toString

Popular in Java

  • Making http requests using okhttp
  • setScale (BigDecimal)
  • runOnUiThread (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • CodeWhisperer alternatives
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