Package ca.uhn.fhir.rest.client.impl
Class GenericClient
- java.lang.Object
-
- ca.uhn.fhir.rest.client.impl.BaseClient
-
- ca.uhn.fhir.rest.client.impl.GenericClient
-
- All Implemented Interfaces:
ca.uhn.fhir.rest.client.api.IGenericClient,ca.uhn.fhir.rest.client.api.IRestfulClient
public class GenericClient extends BaseClient implements ca.uhn.fhir.rest.client.api.IGenericClient
- Author:
- James Agnew, Doug Martin (Regenstrief Center for Biomedical Informatics)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ca.uhn.fhir.rest.client.impl.BaseClient
BaseClient.ResourceOrBinaryResponseHandler, BaseClient.ResourceResponseHandler<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
-
Field Summary
-
Fields inherited from class ca.uhn.fhir.rest.client.impl.BaseClient
HAPI_CLIENT_KEEPRESPONSES
-
-
Constructor Summary
Constructors Constructor Description GenericClient(ca.uhn.fhir.context.FhirContext theContext, ca.uhn.fhir.rest.client.api.IHttpClient theHttpClient, String theServerBase, RestfulClientFactory theFactory)For now, this is a part of the internal API of HAPI - Use with caution as this method may change!
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ca.uhn.fhir.rest.gclient.IFetchConformanceUntypedcapabilities()ca.uhn.fhir.rest.gclient.ICreatecreate()ca.uhn.fhir.rest.gclient.IDeletedelete()ca.uhn.fhir.rest.gclient.IFetchConformanceUntypedfetchConformance()voidforceConformanceCheck()ca.uhn.fhir.context.FhirContextgetFhirContext()ca.uhn.fhir.rest.client.api.IHttpRequestgetLastRequest()protected StringgetPreferredId(org.hl7.fhir.instance.model.api.IBaseResource theResource, String theId)ca.uhn.fhir.rest.gclient.IHistoryhistory()booleanisLogRequestAndResponse()Deprecated.UseLoggingInterceptoras a client interceptor registered to your client instead, as this provides much more fine-grained control over what is logged.ca.uhn.fhir.rest.gclient.IGetPageloadPage()ca.uhn.fhir.rest.gclient.IMetameta()ca.uhn.fhir.rest.gclient.IOperationoperation()ca.uhn.fhir.rest.gclient.IPatchpatch()ca.uhn.fhir.rest.gclient.IReadread()org.hl7.fhir.instance.model.api.IBaseResourceread(ca.uhn.fhir.model.primitive.UriDt theUrl)<T extends org.hl7.fhir.instance.model.api.IBaseResource>
Tread(Class<T> theType, ca.uhn.fhir.model.primitive.UriDt theUrl)<T extends org.hl7.fhir.instance.model.api.IBaseResource>
Tread(Class<T> theType, String theId)ca.uhn.fhir.rest.gclient.IUntypedQuerysearch()voidsetLastRequest(ca.uhn.fhir.rest.client.api.IHttpRequest theLastRequest)For now, this is a part of the internal API of HAPI - Use with caution as this method may change!voidsetLogRequestAndResponse(boolean theLogRequestAndResponse)Deprecated.ca.uhn.fhir.rest.gclient.ITransactiontransaction()ca.uhn.fhir.rest.gclient.IUpdateupdate()ca.uhn.fhir.rest.api.MethodOutcomeupdate(ca.uhn.fhir.model.primitive.IdDt theIdDt, org.hl7.fhir.instance.model.api.IBaseResource theResource)ca.uhn.fhir.rest.api.MethodOutcomeupdate(String theId, org.hl7.fhir.instance.model.api.IBaseResource theResource)ca.uhn.fhir.rest.gclient.IValidatevalidate()ca.uhn.fhir.rest.api.MethodOutcomevalidate(org.hl7.fhir.instance.model.api.IBaseResource theResource)<T extends org.hl7.fhir.instance.model.api.IBaseResource>
Tvread(Class<T> theType, ca.uhn.fhir.model.primitive.IdDt theId)<T extends org.hl7.fhir.instance.model.api.IBaseResource>
Tvread(Class<T> theType, String theId, String theVersionId)-
Methods inherited from class ca.uhn.fhir.rest.client.impl.BaseClient
createExtraParams, fetchResourceFromUrl, getEncoding, getHttpClient, getInterceptorService, getLastResponse, getLastResponseBody, getServerBase, getSummary, getUrlBase, isKeepResponses, isPrettyPrint, registerInterceptor, setDontValidateConformance, setEncoding, setFormatParamStyle, setInterceptorService, setKeepResponses, setPrettyPrint, setSummary, unregisterInterceptor
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Constructor Detail
-
GenericClient
public GenericClient(ca.uhn.fhir.context.FhirContext theContext, ca.uhn.fhir.rest.client.api.IHttpClient theHttpClient, String theServerBase, RestfulClientFactory theFactory)
For now, this is a part of the internal API of HAPI - Use with caution as this method may change!
-
-
Method Detail
-
capabilities
public ca.uhn.fhir.rest.gclient.IFetchConformanceUntyped capabilities()
- Specified by:
capabilitiesin interfaceca.uhn.fhir.rest.client.api.IGenericClient
-
create
public ca.uhn.fhir.rest.gclient.ICreate create()
- Specified by:
createin interfaceca.uhn.fhir.rest.client.api.IGenericClient
-
delete
public ca.uhn.fhir.rest.gclient.IDelete delete()
- Specified by:
deletein interfaceca.uhn.fhir.rest.client.api.IGenericClient
-
fetchConformance
public ca.uhn.fhir.rest.gclient.IFetchConformanceUntyped fetchConformance()
- Specified by:
fetchConformancein interfaceca.uhn.fhir.rest.client.api.IGenericClient
-
forceConformanceCheck
public void forceConformanceCheck()
- Specified by:
forceConformanceCheckin interfaceca.uhn.fhir.rest.client.api.IGenericClient
-
getFhirContext
public ca.uhn.fhir.context.FhirContext getFhirContext()
- Specified by:
getFhirContextin interfaceca.uhn.fhir.rest.client.api.IRestfulClient
-
getLastRequest
public ca.uhn.fhir.rest.client.api.IHttpRequest getLastRequest()
-
setLastRequest
public void setLastRequest(ca.uhn.fhir.rest.client.api.IHttpRequest theLastRequest)
For now, this is a part of the internal API of HAPI - Use with caution as this method may change!
-
getPreferredId
protected String getPreferredId(org.hl7.fhir.instance.model.api.IBaseResource theResource, String theId)
-
history
public ca.uhn.fhir.rest.gclient.IHistory history()
- Specified by:
historyin interfaceca.uhn.fhir.rest.client.api.IGenericClient
-
isLogRequestAndResponse
@Deprecated public boolean isLogRequestAndResponse()
Deprecated.UseLoggingInterceptoras 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)
-
setLogRequestAndResponse
@Deprecated public void setLogRequestAndResponse(boolean theLogRequestAndResponse)
Deprecated.- Specified by:
setLogRequestAndResponsein interfaceca.uhn.fhir.rest.client.api.IGenericClient
-
loadPage
public ca.uhn.fhir.rest.gclient.IGetPage loadPage()
- Specified by:
loadPagein interfaceca.uhn.fhir.rest.client.api.IGenericClient
-
meta
public ca.uhn.fhir.rest.gclient.IMeta meta()
- Specified by:
metain interfaceca.uhn.fhir.rest.client.api.IGenericClient
-
operation
public ca.uhn.fhir.rest.gclient.IOperation operation()
- Specified by:
operationin interfaceca.uhn.fhir.rest.client.api.IGenericClient
-
patch
public ca.uhn.fhir.rest.gclient.IPatch patch()
- Specified by:
patchin interfaceca.uhn.fhir.rest.client.api.IGenericClient
-
read
public ca.uhn.fhir.rest.gclient.IRead read()
- Specified by:
readin interfaceca.uhn.fhir.rest.client.api.IGenericClient
-
read
public <T extends org.hl7.fhir.instance.model.api.IBaseResource> T read(Class<T> theType, String theId)
- Specified by:
readin interfaceca.uhn.fhir.rest.client.api.IGenericClient
-
read
public <T extends org.hl7.fhir.instance.model.api.IBaseResource> T read(Class<T> theType, ca.uhn.fhir.model.primitive.UriDt theUrl)
- Specified by:
readin interfaceca.uhn.fhir.rest.client.api.IGenericClient
-
read
public org.hl7.fhir.instance.model.api.IBaseResource read(ca.uhn.fhir.model.primitive.UriDt theUrl)
- Specified by:
readin interfaceca.uhn.fhir.rest.client.api.IGenericClient
-
search
public ca.uhn.fhir.rest.gclient.IUntypedQuery search()
- Specified by:
searchin interfaceca.uhn.fhir.rest.client.api.IGenericClient
-
transaction
public ca.uhn.fhir.rest.gclient.ITransaction transaction()
- Specified by:
transactionin interfaceca.uhn.fhir.rest.client.api.IGenericClient
-
update
public ca.uhn.fhir.rest.gclient.IUpdate update()
- Specified by:
updatein interfaceca.uhn.fhir.rest.client.api.IGenericClient
-
update
public ca.uhn.fhir.rest.api.MethodOutcome update(ca.uhn.fhir.model.primitive.IdDt theIdDt, org.hl7.fhir.instance.model.api.IBaseResource theResource)
- Specified by:
updatein interfaceca.uhn.fhir.rest.client.api.IGenericClient
-
update
public ca.uhn.fhir.rest.api.MethodOutcome update(String theId, org.hl7.fhir.instance.model.api.IBaseResource theResource)
- Specified by:
updatein interfaceca.uhn.fhir.rest.client.api.IGenericClient
-
validate
public ca.uhn.fhir.rest.gclient.IValidate validate()
- Specified by:
validatein interfaceca.uhn.fhir.rest.client.api.IGenericClient
-
validate
public ca.uhn.fhir.rest.api.MethodOutcome validate(org.hl7.fhir.instance.model.api.IBaseResource theResource)
- Specified by:
validatein interfaceca.uhn.fhir.rest.client.api.IGenericClient
-
vread
public <T extends org.hl7.fhir.instance.model.api.IBaseResource> T vread(Class<T> theType, ca.uhn.fhir.model.primitive.IdDt theId)
- Specified by:
vreadin interfaceca.uhn.fhir.rest.client.api.IGenericClient
-
-