Class FhirProvider
java.lang.Object
org.openehealth.ipf.commons.ihe.fhir.FhirProvider
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AbstractPlainProvider
,SharedFhirProvider
Base class for all Resource Providers defined in IPF
- Author:
- Christian Ohr
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionenrichParameters
(FhirSearchParameters parameters, javax.servlet.http.HttpServletRequest httpServletRequest, RequestDetails requestDetails) Utility method the adds HTTP servlet request parameters and query parameters to a map of Camel headersprotected abstract FhirContext
protected abstract Optional<RequestConsumer>
getRequestConsumer
(RequestDetails requestDetails) Returns the first consumer that is able to handle the provided payloadboolean
boolean
abstract void
setConsumer
(RequestConsumer consumer) Ensures that the provided consumer is considered by this providerabstract void
unsetConsumer
(RequestConsumer consumer) Ensures that the provided consumer is not considered by this provider
-
Constructor Details
-
FhirProvider
public FhirProvider()
-
-
Method Details
-
getFhirContext
- Returns:
- FhirContext
-
getRequestConsumer
Returns the first consumer that is able to handle the provided payload- Parameters:
requestDetails
- FHIR request- Returns:
- consumer or
Optional.empty()
-
setConsumer
Ensures that the provided consumer is considered by this provider- Parameters:
consumer
- request consumer
-
unsetConsumer
Ensures that the provided consumer is not considered by this provider- Parameters:
consumer
- request consumer
-
requiresRegistration
public boolean requiresRegistration()- Returns:
- true if this provider must be registered at the
FhirRegistry
- See Also:
-
requiresDeregistration
public boolean requiresDeregistration()- Returns:
- true if this provider must be unregistered at the
FhirRegistry
- See Also:
-
enrichParameters
protected Map<String,Object> enrichParameters(FhirSearchParameters parameters, javax.servlet.http.HttpServletRequest httpServletRequest, RequestDetails requestDetails) Utility method the adds HTTP servlet request parameters and query parameters to a map of Camel headers- Parameters:
parameters
- query parametershttpServletRequest
- servlet requestrequestDetails
- request details- Returns:
- enriched map of parameters
-