Class FhirUtils
java.lang.Object
org.openehealth.ipf.commons.ihe.fhir.support.FhirUtils
Common utilities for handling FHIR resources
- Since:
- 3.6
- Author:
- Christian Ohr
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends BaseServerResponseException>
Texception
(Function<String, T> func, IBaseOperationOutcome operationOutcome, String msg, Object... args) static <T extends BaseServerResponseException>
Texception
(Function<String, T> func, OperationOutcome.IssueSeverity severity, OperationOutcome.IssueType type, String code, String diagnostics, String msg, Object... args) static ForbiddenOperationException
forbiddenOperation
(OperationOutcome.IssueSeverity severity, OperationOutcome.IssueType type, String code, String diagnostics, String msg, Object... args) static Map
<ResourceType, List<Bundle.BundleEntryComponent>> getBundleEntries
(Bundle bundle) Converts aBundle
into a map grouped by the entry resources typesgetOptionalResource
(Bundle bundle, Class<T> clazz) static <T extends Resource>
TgetResource
(Bundle bundle, Class<T> clazz) getResources
(Bundle bundle, Class<T> clazz) static InternalErrorException
internalError
(OperationOutcome.IssueSeverity severity, OperationOutcome.IssueType type, String code, String diagnostics, String msg, Object... args) static InvalidRequestException
invalidRequest
(OperationOutcome.IssueSeverity severity, OperationOutcome.IssueType type, String code, String diagnostics, String msg, Object... args) static ResourceNotFoundException
resourceNotFound
(OperationOutcome.IssueSeverity severity, OperationOutcome.IssueType type, String code, String diagnostics, String msg, Object... args) static UnprocessableEntityException
unprocessableEntity
(OperationOutcome.IssueSeverity severity, OperationOutcome.IssueType type, String code, String diagnostics, String msg, Object... args)
-
Constructor Details
-
FhirUtils
public FhirUtils()
-
-
Method Details
-
getBundleEntries
Converts aBundle
into a map grouped by the entry resources types- Parameters:
bundle
- Bundle- Returns:
- map of entries grouped by their resource type
-
getResources
- See Also:
-
getOptionalResource
-
getResource
-
internalError
public static InternalErrorException internalError(OperationOutcome.IssueSeverity severity, OperationOutcome.IssueType type, String code, String diagnostics, String msg, Object... args) -
unprocessableEntity
public static UnprocessableEntityException unprocessableEntity(OperationOutcome.IssueSeverity severity, OperationOutcome.IssueType type, String code, String diagnostics, String msg, Object... args) -
invalidRequest
public static InvalidRequestException invalidRequest(OperationOutcome.IssueSeverity severity, OperationOutcome.IssueType type, String code, String diagnostics, String msg, Object... args) -
resourceNotFound
public static ResourceNotFoundException resourceNotFound(OperationOutcome.IssueSeverity severity, OperationOutcome.IssueType type, String code, String diagnostics, String msg, Object... args) -
forbiddenOperation
public static ForbiddenOperationException forbiddenOperation(OperationOutcome.IssueSeverity severity, OperationOutcome.IssueType type, String code, String diagnostics, String msg, Object... args) -
exception
public static <T extends BaseServerResponseException> T exception(Function<String, T> func, OperationOutcome.IssueSeverity severity, OperationOutcome.IssueType type, String code, String diagnostics, String msg, Object... args) -
exception
public static <T extends BaseServerResponseException> T exception(Function<String, T> func, IBaseOperationOutcome operationOutcome, String msg, Object... args)
-