public interface RequestConsumer
The request parameters may contain the following parameters entries indicating a "lazy-loading" mode on searches.
Constants.FHIR_REQUEST_SIZE_ONLY
: if this entry is present, the requester expects only
the result size to be returned in an parameter entry with the same name and calls handleSizeRequest(Object, Map)
to do so. If possible, implementations should only request the result size from the backend rather than
a complete result set.Constants.FHIR_FROM_INDEX
and Constants.FHIR_TO_INDEX
: if these entries are present,
the requester expects only the specified subset of the result. If possible, implementations
should only request this result set from the backend rather than a complete result set.Modifier and Type | Method and Description |
---|---|
ca.uhn.fhir.context.FhirContext |
getFhirContext() |
default String |
getName() |
ca.uhn.fhir.rest.api.MethodOutcome |
handleAction(Object payload,
Map<String,Object> headers)
Handles a Create / Update / Validate / Delete action request.
|
ca.uhn.fhir.rest.api.server.IBundleProvider |
handleBundleProviderRequest(Object payload,
Map<String,Object> headers)
Handles the request for a bundle provider, effectively constructing a list of resources.
|
<R extends org.hl7.fhir.instance.model.api.IBaseResource> |
handleBundleRequest(Object payload,
Map<String,Object> headers)
Handles the (search) request for a bundle, effectively being a list of resources.
|
<R extends org.hl7.fhir.instance.model.api.IBaseResource> |
handleResourceRequest(Object payload,
Map<String,Object> headers,
Class<R> resultType)
Handles the request for a resource
|
int |
handleSizeRequest(Object payload,
Map<String,Object> headers)
Optional method that request the result size of a bundle request.
|
<T extends org.hl7.fhir.instance.model.api.IBaseBundle> |
handleTransactionRequest(Object payload,
Map<String,Object> headers,
Class<T> bundleClass)
Handles transaction requests
|
boolean |
supportsLazyLoading() |
ca.uhn.fhir.context.FhirContext getFhirContext()
ca.uhn.fhir.rest.api.MethodOutcome handleAction(Object payload, Map<String,Object> headers)
payload
- request payloadheaders
- request parameters, e.g. search parameters<R extends org.hl7.fhir.instance.model.api.IBaseResource> R handleResourceRequest(Object payload, Map<String,Object> headers, Class<R> resultType)
R
- type of the returned resourcepayload
- request payloadheaders
- request parameters, e.g. search parametersresultType
- type of the returned resource<R extends org.hl7.fhir.instance.model.api.IBaseResource> List<R> handleBundleRequest(Object payload, Map<String,Object> headers)
If supportsLazyLoading()
returns true, the headers may contain Constants.FHIR_FROM_INDEX
and Constants.FHIR_TO_INDEX
entries,
indicating that only a part of the result is requested. Implementations must return only the requested entries.
R
- type of the returned resources contained in the bundlepayload
- request payloadheaders
- request parameters, e.g. search parameters orca.uhn.fhir.rest.api.server.IBundleProvider handleBundleProviderRequest(Object payload, Map<String,Object> headers)
handleBundleRequest(Object, Map)
as required.payload
- request payloadheaders
- request parameters, e.g. search parameters<T extends org.hl7.fhir.instance.model.api.IBaseBundle> T handleTransactionRequest(Object payload, Map<String,Object> headers, Class<T> bundleClass)
payload
- request payloadheaders
- request parametersint handleSizeRequest(Object payload, Map<String,Object> headers)
Constants.FHIR_REQUEST_SIZE_ONLY
entry flag.
This method only needs to be implemented is supportsLazyLoading()
returns true.payload
- request payloadheaders
- request parametersboolean supportsLazyLoading()
default String getName()
Copyright © 2018 Open eHealth Foundation. All rights reserved.