Interface IClientExecutable<T extends IClientExecutable<?,Y>,Y>

All Known Subinterfaces:
ICreateTyped, ICreateWithQueryTyped, IDeleteTyped, IDeleteWithQueryTyped, IFetchConformanceTyped<T>, IGetPageTyped<T>, IHistoryTyped<T>, IOperationProcessMsgMode<T>, IOperationUntypedWithInput<T>, IOperationUntypedWithInputAndPartialOutput<T>, IPatchExecutable, IPatchWithBody, IPatchWithQueryTyped, IQuery<Y>, IReadExecutable<T>, ITransactionTyped<T>, IUpdateExecutable, IUpdateTyped, IUpdateWithQueryTyped, IValidateUntyped

public interface IClientExecutable<T extends IClientExecutable<?,Y>,Y>
  • Method Summary

    Modifier and Type
    Method
    Description
    accept(String theHeaderValue)
    Specifies a custom Accept header that should be supplied with the request.
    andLogRequestAndResponse(boolean theLogRequestAndResponse)
    Deprecated.
    Use the client logging interceptor to log requests and responses instead.
    cacheControl(CacheControlDirective theCacheControlDirective)
    Sets the Cache-Control header value, which advises the server (or any cache in front of it) how to behave in terms of cached requests
    elementsSubset(String... theElements)
    Request that the server return subsetted resources, containing only the elements specified in the given parameters.
    encoded(EncodingEnum theEncoding)
    Request that the server respond with JSON via the Accept header and possibly also the _format parameter if configured to do so.
    Request that the server respond with JSON via the Accept header and possibly also the _format parameter if configured to do so.
    Request that the server respond with JSON via the Accept header and possibly also the _format parameter if configured to do so.
    Actually execute the client operation
    Explicitly specify a custom structure type to attempt to use when parsing the response.
    Explicitly specify a list of custom structure types to attempt to use (in order from most to least preferred) when parsing the response.
    Request pretty-printed response via the _pretty parameter
    Request that the server modify the response using the _summary param
    withAdditionalHeader(String theHeaderName, String theHeaderValue)
    Set a HTTP header not explicitly defined in FHIR but commonly used in real-world scenarios.
  • Method Details

    • andLogRequestAndResponse

      @Deprecated T andLogRequestAndResponse(boolean theLogRequestAndResponse)
      Deprecated.
      Use the client logging interceptor to log requests and responses instead. See here for more information.
      If set to true, the client will log the request and response to the SLF4J logger. This can be useful for debugging, but is generally not desirable in a production situation.
    • cacheControl

      T cacheControl(CacheControlDirective theCacheControlDirective)
      Sets the Cache-Control header value, which advises the server (or any cache in front of it) how to behave in terms of cached requests
    • elementsSubset

      T elementsSubset(String... theElements)
      Request that the server return subsetted resources, containing only the elements specified in the given parameters. For example: subsetElements("name", "identifier") requests that the server only return the "name" and "identifier" fields in the returned resource, and omit any others.
    • encoded

      T encoded(EncodingEnum theEncoding)
      Request that the server respond with JSON via the Accept header and possibly also the _format parameter if configured to do so.

      This method will have no effect if a custom Accept header is specified.

      See Also:
    • encodedJson

      Request that the server respond with JSON via the Accept header and possibly also the _format parameter if configured to do so.

      This method will have no effect if a custom Accept header is specified.

      See Also:
    • encodedXml

      Request that the server respond with JSON via the Accept header and possibly also the _format parameter if configured to do so.

      This method will have no effect if a custom Accept header is specified.

      See Also:
    • withAdditionalHeader

      T withAdditionalHeader(String theHeaderName, String theHeaderValue)
      Set a HTTP header not explicitly defined in FHIR but commonly used in real-world scenarios. One important example is to set the Authorization header (e.g. Basic Auth or OAuth2-based Bearer auth), which tends to be cumbersome using IClientInterceptors, particularly when REST clients shall be reused and are thus supposed to remain stateless.

      It is the responsibility of the caller to care for proper encoding of the header value, e.g. using Base64.

      This is a short-cut alternative to using a corresponding client interceptor

      Parameters:
      theHeaderName - header name
      theHeaderValue - header value
      Returns:
    • execute

      Actually execute the client operation
    • preferResponseType

      T preferResponseType(Class<? extends IBaseResource> theType)
      Explicitly specify a custom structure type to attempt to use when parsing the response. This is useful for invocations where the response is a Bundle/Parameters containing nested resources, and you want to use specific custom structures for those nested resources.

      See Profiles and Extensions for more information on using custom structures

    • preferResponseTypes

      T preferResponseTypes(List<Class<? extends IBaseResource>> theTypes)
      Explicitly specify a list of custom structure types to attempt to use (in order from most to least preferred) when parsing the response. This is useful for invocations where the response is a Bundle/Parameters containing nested resources, and you want to use specific custom structures for those nested resources.

      See Profiles and Extensions for more information on using custom structures

    • prettyPrint

      Request pretty-printed response via the _pretty parameter
    • summaryMode

      T summaryMode(SummaryEnum theSummary)
      Request that the server modify the response using the _summary param
    • accept

      T accept(String theHeaderValue)
      Specifies a custom Accept header that should be supplied with the request.

      Note that this method overrides any encoding preferences specified with encodedJson() or encodedXml(). It is generally easier to just use those methods if you simply want to request a specific FHIR encoding.

      Parameters:
      theHeaderValue - The header value, e.g. "application/fhir+json". Constants such as Constants.CT_FHIR_XML_NEW and Constants.CT_FHIR_JSON_NEW may be useful. If set to null or an empty string, the default Accept header will be used.
      See Also: