Class FhirProvider

java.lang.Object
org.openehealth.ipf.commons.ihe.fhir.FhirProvider
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AbstractPlainProvider, SharedFhirProvider

public abstract class FhirProvider extends Object implements Serializable
Base class for all Resource Providers defined in IPF
Author:
Christian Ohr
See Also:
  • Constructor Details

    • FhirProvider

      public FhirProvider()
  • Method Details

    • getFhirContext

      protected abstract FhirContext getFhirContext()
      Returns:
      FhirContext
    • getRequestConsumer

      protected abstract Optional<RequestConsumer> getRequestConsumer(RequestDetails requestDetails)
      Returns the first consumer that is able to handle the provided payload
      Parameters:
      requestDetails - FHIR request
      Returns:
      consumer or Optional.empty()
    • setConsumer

      public abstract void setConsumer(RequestConsumer consumer)
      Ensures that the provided consumer is considered by this provider
      Parameters:
      consumer - request consumer
    • unsetConsumer

      public abstract void unsetConsumer(RequestConsumer consumer)
      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 parameters
      httpServletRequest - servlet request
      requestDetails - request details
      Returns:
      enriched map of parameters