Package ca.uhn.fhir.rest.client.api
Interface IGenericClient
- All Superinterfaces:
IRestfulClient
-
Method Summary
Modifier and TypeMethodDescriptionFetch the capability statement for the servercreate()
Fluent method for the "create" operation, which creates a new resource instance on the serverdelete()
Fluent method for the "delete" operation, which performs a logical delete on a server resourceDeprecated.As of HAPI 3.0.0 this method has been deprecated, as the operation is now called "capabilities".void
Force the client to fetch the server's conformance statement and validate that it is appropriate for this client.history()
Implementation of the "history" methodloadPage()
Loads the previous/next bundle of resources from a paged set, using the link specified in the "link type=next" tag within the atom bundle.meta()
Fluent method for the "meta" operations, which can be used to get, add and remove tags and other Meta elements from a resource or across the server.Implementation of the FHIR "extended operations" actionpatch()
Fluent method for the "patch" operation, which performs a logical patch on a server resourceread()
Fluent method for "read" and "vread" methods.Deprecated.Useread() fluent method
instead (deprecated in HAPI FHIR 3.0.0)<T extends IBaseResource>
TDeprecated.Useread() fluent method
instead (deprecated in HAPI FHIR 3.0.0)<T extends IBaseResource>
TDeprecated.Useread() fluent method
instead (deprecated in HAPI FHIR 3.0.0)void
registerInterceptor
(Object theInterceptor) Register a new interceptor for this client.<T extends IBaseBundle>
IUntypedQuery<T> search()
Search for resources matching a given set of criteria.void
setLogRequestAndResponse
(boolean theLogRequestAndResponse) Deprecated.Use LoggingInterceptor as a client interceptor registered to your client instead, as this provides much more fine-grained control over what is logged.Send a transaction (collection of resources) to the server to be executed as a single unitvoid
unregisterInterceptor
(Object theInterceptor) Remove an intercaptor that was previously registered usingIRestfulClient.registerInterceptor(Object)
update()
Fluent method for the "update" operation, which updates a resource instance on the serverupdate
(IdDt theId, IBaseResource theResource) Deprecated.Useupdate() fluent method
instead (deprecated in HAPI FHIR 3.0.0)update
(String theId, IBaseResource theResource) Deprecated.Useupdate() fluent method
instead (deprecated in HAPI FHIR 3.0.0)validate()
Validate a resourcevalidate
(IBaseResource theResource) Deprecated.Usevalidate() fluent method
instead (deprecated in HAPI FHIR 3.0.0)<T extends IBaseResource>
TDeprecated.Useread() fluent method
instead (deprecated in HAPI FHIR 3.0.0)<T extends IBaseResource>
TDeprecated.Useread() fluent method
instead (deprecated in HAPI FHIR 3.0.0)Methods inherited from interface ca.uhn.fhir.rest.client.api.IRestfulClient
fetchResourceFromUrl, getEncoding, getFhirContext, getHttpClient, getInterceptorService, getServerBase, setEncoding, setFormatParamStyle, setInterceptorService, setPrettyPrint, setSummary
-
Method Details
-
capabilities
Fetch the capability statement for the server -
create
Fluent method for the "create" operation, which creates a new resource instance on the server -
delete
Fluent method for the "delete" operation, which performs a logical delete on a server resource -
fetchConformance
Deprecated.As of HAPI 3.0.0 this method has been deprecated, as the operation is now called "capabilities". Usecapabilities()
insteadRetrieves the server's conformance statement -
forceConformanceCheck
Force the client to fetch the server's conformance statement and validate that it is appropriate for this client.- Throws:
FhirClientConnectionException
- if the conformance statement cannot be read, or if the clientFhirClientInappropriateForServerException
- If the conformance statement indicates that the server is inappropriate for this client (e.g. it implements the wrong version of FHIR)
-
history
Implementation of the "history" method -
loadPage
Loads the previous/next bundle of resources from a paged set, using the link specified in the "link type=next" tag within the atom bundle. -
meta
Fluent method for the "meta" operations, which can be used to get, add and remove tags and other Meta elements from a resource or across the server.- Since:
- 1.1
-
operation
Implementation of the FHIR "extended operations" action -
patch
Fluent method for the "patch" operation, which performs a logical patch on a server resource -
read
Fluent method for "read" and "vread" methods. -
read
Deprecated.Useread() fluent method
instead (deprecated in HAPI FHIR 3.0.0)Implementation of the "instance read" method.- Parameters:
theType
- The type of resource to loadtheId
- The ID to load- Returns:
- The resource
-
read
Deprecated.Useread() fluent method
instead (deprecated in HAPI FHIR 3.0.0)Perform the "read" operation (retrieve the latest version of a resource instance by ID) using an absolute URL.- Parameters:
theType
- The resource type that is being retrievedtheUrl
- The absolute URL, e.g. "http://example.com/fhir/Patient/123"- Returns:
- The returned resource from the server
-
read
Deprecated.Useread() fluent method
instead (deprecated in HAPI FHIR 3.0.0)Perform the "read" operation (retrieve the latest version of a resource instance by ID) using an absolute URL.- Parameters:
theUrl
- The absolute URL, e.g. "http://example.com/fhir/Patient/123"- Returns:
- The returned resource from the server
-
registerInterceptor
Register a new interceptor for this client. An interceptor can be used to add additional logging, or add security headers, or pre-process responses, etc.- Specified by:
registerInterceptor
in interfaceIRestfulClient
-
search
Search for resources matching a given set of criteria. Searching is a very powerful feature in FHIR with many features for specifying exactly what should be seaerched for and how it should be returned. See the specification on search for more information. -
setLogRequestAndResponse
Deprecated.Use LoggingInterceptor as a client interceptor registered to your client instead, as this provides much more fine-grained control over what is logged. This method will be removed at some point (deprecated in HAPI 1.6 - 2016-06-16)If set totrue
, the client will log all requests and all responses. This is probably not a good production setting since it will result in a lot of extra logging, but it can be useful for troubleshooting.- Parameters:
theLogRequestAndResponse
- Should requests and responses be logged
-
transaction
Send a transaction (collection of resources) to the server to be executed as a single unit -
unregisterInterceptor
Remove an intercaptor that was previously registered usingIRestfulClient.registerInterceptor(Object)
- Specified by:
unregisterInterceptor
in interfaceIRestfulClient
-
update
Fluent method for the "update" operation, which updates a resource instance on the server -
update
Deprecated.Useupdate() fluent method
instead (deprecated in HAPI FHIR 3.0.0)Implementation of the "instance update" method.- Parameters:
theId
- The ID to updatetheResource
- The new resource body- Returns:
- An outcome containing the results and possibly the new version ID
-
update
Deprecated.Useupdate() fluent method
instead (deprecated in HAPI FHIR 3.0.0)Implementation of the "instance update" method.- Parameters:
theId
- The ID to updatetheResource
- The new resource body- Returns:
- An outcome containing the results and possibly the new version ID
-
validate
Validate a resource -
validate
Deprecated.Usevalidate() fluent method
instead (deprecated in HAPI FHIR 3.0.0)Implementation of the "type validate" method.- Parameters:
theResource
- The resource to validate- Returns:
- An outcome containing any validation issues
-
vread
Deprecated.Useread() fluent method
instead (deprecated in HAPI FHIR 3.0.0)Implementation of the "instance vread" method. Note that this method expectstheId
to contain a resource ID as well as a version ID, and will fail if it does not.Note that if an absolute resource ID is passed in (i.e. a URL containing a protocol and host as well as the resource type and ID) the server base for the client will be ignored, and the URL passed in will be queried.
- Parameters:
theType
- The type of resource to loadtheId
- The ID to load, including the resource ID and the resource version ID. Valid values include "Patient/123/_history/222", or "http://example.com/fhir/Patient/123/_history/222"- Returns:
- The resource
-
vread
Deprecated.Useread() fluent method
instead (deprecated in HAPI FHIR 3.0.0)Implementation of the "instance vread" method.- Parameters:
theType
- The type of resource to loadtheId
- The ID to loadtheVersionId
- The version ID- Returns:
- The resource
-