Package ca.uhn.fhir.util
Class OperationOutcomeUtil
- java.lang.Object
-
- ca.uhn.fhir.util.OperationOutcomeUtil
-
public class OperationOutcomeUtil extends Object
Utilities for dealing with OperationOutcome resources across various model versions
-
-
Constructor Summary
Constructors Constructor Description OperationOutcomeUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IBaseaddIssue(FhirContext theCtx, IBaseOperationOutcome theOperationOutcome, String theSeverity, String theDetails, String theLocation, String theCode)Add an issue to an OperationOutcomestatic voidaddLocationToIssue(FhirContext theContext, IBase theIssue, String theLocation)static StringgetFirstIssueDetails(FhirContext theCtx, IBaseOperationOutcome theOutcome)static StringgetFirstIssueLocation(FhirContext theCtx, IBaseOperationOutcome theOutcome)static intgetIssueCount(FhirContext theCtx, IBaseOperationOutcome theOutcome)static booleanhasIssues(FhirContext theCtx, IBaseOperationOutcome theOutcome)Returns true if the given OperationOutcome has 1 or more Operation.issue repetitionsstatic IBaseOperationOutcomenewInstance(FhirContext theCtx)
-
-
-
Constructor Detail
-
OperationOutcomeUtil
public OperationOutcomeUtil()
-
-
Method Detail
-
addIssue
public static IBase addIssue(FhirContext theCtx, IBaseOperationOutcome theOperationOutcome, String theSeverity, String theDetails, String theLocation, String theCode)
Add an issue to an OperationOutcome- Parameters:
theCtx- The fhir contexttheOperationOutcome- The OO resource to add totheSeverity- The severity (fatal | error | warning | information)theDetails- The details stringtheCode-- Returns:
- Returns the newly added issue
-
getFirstIssueDetails
public static String getFirstIssueDetails(FhirContext theCtx, IBaseOperationOutcome theOutcome)
-
getFirstIssueLocation
public static String getFirstIssueLocation(FhirContext theCtx, IBaseOperationOutcome theOutcome)
-
hasIssues
public static boolean hasIssues(FhirContext theCtx, IBaseOperationOutcome theOutcome)
Returns true if the given OperationOutcome has 1 or more Operation.issue repetitions
-
getIssueCount
public static int getIssueCount(FhirContext theCtx, IBaseOperationOutcome theOutcome)
-
newInstance
public static IBaseOperationOutcome newInstance(FhirContext theCtx)
-
addLocationToIssue
public static void addLocationToIssue(FhirContext theContext, IBase theIssue, String theLocation)
-
-