Class FdBaseRequest<T extends org.hl7.fhir.r4.model.Resource,R extends org.hl7.fhir.r4.model.Resource>

java.lang.Object
de.gematik.bbriccs.rest.fd.FdBaseRequest<T,R>
Type Parameters:
R - the type of the expected Response Body
All Implemented Interfaces:
FdRequest<T,R>

public abstract class FdBaseRequest<T extends org.hl7.fhir.r4.model.Resource,R extends org.hl7.fhir.r4.model.Resource> extends Object implements FdRequest<T,R>
  • Field Details

  • Constructor Details

  • Method Details

    • getFhirResource

      public final String getFhirResource()
      This is required (mostly for VAU) to define on which resource the request shall be executed.
      Specified by:
      getFhirResource in interface FdRequest<T extends org.hl7.fhir.r4.model.Resource,R extends org.hl7.fhir.r4.model.Resource>
      Returns:
      the FHIR Resource
    • getResourcePath

      protected final String getResourcePath()
      This method provides the full Path to a Resource for a Request. Example: /Task if Task was provided without an ID and /Task/[id] if an ID was provided
      Returns:
      the Path
    • getRequestLocator

      public String getRequestLocator()
      This method returns the last (tailing) part of the URL of the inner-HTTP Request e.g. /Task/[id] or /Communication?[queryParameter]
      Specified by:
      getRequestLocator in interface FdRequest<T extends org.hl7.fhir.r4.model.Resource,R extends org.hl7.fhir.r4.model.Resource>
      Returns:
      the tailing part of the URL which combines to full URL like [baseUrl][tailing Part]
    • getMethod

      public final HttpRequestMethod getMethod()
      Defines which HTTP-Method (for the inner-HTTP Request) shall be used.
      Specified by:
      getMethod in interface FdRequest<T extends org.hl7.fhir.r4.model.Resource,R extends org.hl7.fhir.r4.model.Resource>
      Returns:
      the HTTP-Method of the Command
    • getHeaderParameters

      public final Map<String,String> getHeaderParameters()
      Get a Map of required Header-Parameters for this specific command. By Default, an empty map is returned, which indicates no Header-Parameters
      Specified by:
      getHeaderParameters in interface FdRequest<T extends org.hl7.fhir.r4.model.Resource,R extends org.hl7.fhir.r4.model.Resource>
      Returns:
      map of Header-Parameters
    • expectedResponseType

      public final Class<R> expectedResponseType()
      What type of Response-Body does this command expect? This methode is required for the FHIR-Codec to decode the Response-Body to a concrete FHIR-Resource
      Specified by:
      expectedResponseType in interface FdRequest<T extends org.hl7.fhir.r4.model.Resource,R extends org.hl7.fhir.r4.model.Resource>
      Returns:
      the Type of the expected Response-Body
    • getQueryPart

      protected String getQueryPart()