Package com.ibm.fhir.client.impl
Class FHIRClientImpl
- java.lang.Object
-
- com.ibm.fhir.client.impl.FHIRClientImpl
-
- All Implemented Interfaces:
FHIRClient
public class FHIRClientImpl extends Object implements FHIRClient
Provides an implementation of the FHIRClient interface, which can be used as a high-level API for invoking FHIR REST APIs.
-
-
Field Summary
-
Fields inherited from interface com.ibm.fhir.client.FHIRClient
PROPNAME_BASE_URL, PROPNAME_BASIC_AUTH_ENABLED, PROPNAME_CLIENT_AUTH_ENABLED, PROPNAME_CLIENT_PASSWORD, PROPNAME_CLIENT_USERNAME, PROPNAME_DEFAULT_MIMETYPE, PROPNAME_HOSTNAME_VERIFICATION_ENABLED, PROPNAME_HTTP_RETURN_PREF, PROPNAME_HTTP_TIMEOUT, PROPNAME_KEYSTORE_KEY_PASSWORD, PROPNAME_KEYSTORE_LOCATION, PROPNAME_KEYSTORE_PASSWORD, PROPNAME_LOGGING_ENABLED, PROPNAME_OAUTH2_ENABLED, PROPNAME_OAUTH2_TOKEN, PROPNAME_TENANT_ID, PROPNAME_TRUSTSTORE_LOCATION, PROPNAME_TRUSTSTORE_PASSWORD
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedFHIRClientImpl()FHIRClientImpl(Properties props)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FHIRResponse_search(String resourceType, FHIRParameters parameters, FHIRRequestHeader... headers)Invokes the '_search' FHIR REST API operation.FHIRResponsebatch(Bundle bundle, FHIRRequestHeader... headers)Invokes the 'batch/transaction' FHIR REST API operation for a request bundle of type 'batch'.FHIRResponseconditionalCreate(Resource resource, FHIRParameters parameters, FHIRRequestHeader... headers)Invokes the 'conditional create' FHIR REST API operation.FHIRResponseconditionalCreate(javax.json.JsonObject resource, FHIRParameters parameters, FHIRRequestHeader... headers)Invokes the 'conditional create' FHIR REST API operation.FHIRResponseconditionalDelete(String resourceType, FHIRParameters parameters, FHIRRequestHeader... headers)Invokes the 'conditional delete' FHIR REST API operation.FHIRResponseconditionalUpdate(Resource resource, FHIRParameters parameters, FHIRRequestHeader... headers)Invokes the 'conditional update' FHIR REST API operation.FHIRResponseconditionalUpdate(javax.json.JsonObject resource, FHIRParameters parameters, FHIRRequestHeader... headers)Invokes the 'conditional update' FHIR REST API operation.FHIRResponsecreate(Resource resource, FHIRRequestHeader... headers)Invokes the 'create' FHIR REST API operation.FHIRResponsecreate(javax.json.JsonObject resource, FHIRRequestHeader... headers)Invokes the 'create' FHIR REST API operation.FHIRResponsedelete(String resourceType, String resourceId, FHIRRequestHeader... headers)Invokes the 'delete' FHIR REST API operation.protected javax.ws.rs.client.ClientgetClient()Retrieves a jax-rs Client from the ClientBuilder object.StringgetDefaultMimeType()Returns a string that represents the default mime-type associated with the FHIRClient interface.HTTPReturnPreferencegetHttpReturnPref()intgetHttpTimeout()StringgetKeyStoreKeyPassword()StringgetKeyStoreLocation()StringgetKeyStorePassword()StringgetOAuth2AccessToken()Returns a string that represents the OAuth 2.0 access token to be used by the FHIRClient interface for authorization requests.KeyStoregetTrustStore()Allow the client consumer to be able to get and reuse the same TrustStore if necessary.javax.ws.rs.client.WebTargetgetWebTarget()Returns a JAX-RS 2.0 WebTarget object associated with the REST API endpoint.javax.ws.rs.client.WebTargetgetWebTarget(String baseURL)Returns a JAX-RS 2.0 WebTarget object associated with a given REST API endpoint.javax.ws.rs.client.WebTargetgetWebTargetUsingBasicAuth(String baseURL, String username, String pwd)Returns a JAX-RS 2.0 WebTarget object associated with a given REST API endpoint.FHIRResponsehistory(FHIRParameters parameters, FHIRRequestHeader... headers)Invokes system level history FHIR REST API operationFHIRResponsehistory(String resourceType, String resourceId, FHIRParameters parameters, FHIRRequestHeader... headers)Invokes the 'history' FHIR REST API operation.FHIRResponseinvoke(String operationName, FHIRParameters parameters, FHIRRequestHeader... headers)Invokes the 'invoke' FHIR REST API operation.FHIRResponseinvoke(String operationName, Resource resource, FHIRRequestHeader... headers)Invokes the 'invoke' FHIR REST API operation.FHIRResponseinvoke(String resourceType, String operationName, FHIRParameters parameters, FHIRRequestHeader... headers)Invokes the 'invoke' FHIR REST API operation.FHIRResponseinvoke(String resourceType, String operationName, Resource resource, FHIRRequestHeader... headers)Invokes the 'invoke' FHIR REST API operation.FHIRResponseinvoke(String resourceType, String operationName, String resourceId, FHIRParameters parameters, FHIRRequestHeader... headers)Invokes the 'invoke' FHIR REST API operation.FHIRResponseinvoke(String resourceType, String operationName, String resourceId, Resource resource, FHIRRequestHeader... headers)Invokes the 'invoke' FHIR REST API operation.FHIRResponseinvoke(String resourceType, String operationName, String resourceId, String versionId, FHIRParameters parameters, FHIRRequestHeader... headers)Invokes the 'invoke' FHIR REST API operation.FHIRResponseinvoke(String resourceType, String operationName, String resourceId, String versionId, Resource resource, FHIRRequestHeader... headers)Invokes the 'invoke' FHIR REST API operation.booleanisHostnameVerificationEnabled()booleanisLoggingEnabled()FHIRResponsemetadata(FHIRRequestHeader... headers)Invokes the 'metadata' FHIR REST API operation.FHIRResponseread(String resourceType, String resourceId, FHIRRequestHeader... headers)Invokes the 'read' FHIR REST API operation.FHIRResponsesearch(String resourceType, FHIRParameters parameters, FHIRRequestHeader... headers)Invokes the 'search' FHIR REST API operation.FHIRResponsesearchAll(FHIRParameters parameters, boolean isPost, FHIRRequestHeader... headers)Invokes the 'search-all' FHIR REST API operation with HTTP POST.voidsetDefaultMimeType(String mimeType)Sets the default mime-type to be used by the FHIRClient interface when invoking REST API operations.voidsetHostnameVerificationEnabled(boolean hostnameVerficationEnabled)voidsetHttpReturnPref(HTTPReturnPreference returnPref)voidsetHttpTimeout(int httpTimeout)voidsetKeyStoreKeyPassword(String keyStoreKeyPassword)voidsetKeyStoreLocation(String keyStoreLocation)voidsetKeyStorePassword(String keyStorePassword)voidsetLoggingEnabled(boolean loggingEnabled)voidsetOAuth2AccessToken(String accessToken)Sets the OAuth 2.0 access token to be used by the FHIRClient interface for authorization when invoking REST API operations.FHIRResponsetransaction(Bundle bundle, FHIRRequestHeader... headers)Invokes the 'batch/transaction' FHIR REST API operation for a request bundle of type 'transaction'.FHIRResponseupdate(Resource resource, FHIRRequestHeader... headers)Invokes the 'update' FHIR REST API operation.FHIRResponseupdate(javax.json.JsonObject resource, FHIRRequestHeader... headers)Invokes the 'update' FHIR REST API operation.FHIRResponsevalidate(Resource resource, FHIRRequestHeader... headers)Invokes the 'validate' FHIR REST API operation.FHIRResponsevalidate(javax.json.JsonObject resource, FHIRRequestHeader... headers)Invokes the 'validate' FHIR REST API operation.FHIRResponsevread(String resourceType, String resourceId, String versionId, FHIRRequestHeader... headers)Invokes the 'vread' FHIR REST API operation.
-
-
-
Constructor Detail
-
FHIRClientImpl
protected FHIRClientImpl()
-
FHIRClientImpl
public FHIRClientImpl(Properties props) throws Exception
- Throws:
Exception
-
-
Method Detail
-
metadata
public FHIRResponse metadata(FHIRRequestHeader... headers) throws Exception
Description copied from interface:FHIRClientInvokes the 'metadata' FHIR REST API operation.- Specified by:
metadatain interfaceFHIRClient- Parameters:
headers- an optional list of request headers to be added to the request- Returns:
- a FHIRResponse that contains a Conformance object which describes the FHIR Server's capabilities
- Throws:
Exception
-
create
public FHIRResponse create(Resource resource, FHIRRequestHeader... headers) throws Exception
Description copied from interface:FHIRClientInvokes the 'create' FHIR REST API operation.- Specified by:
createin interfaceFHIRClient- Parameters:
resource- the FHIR resource to be createdheaders- an optional list of request headers to be added to the request- Returns:
- a FHIRResponse that contains the results of the 'create' operation
- Throws:
Exception
-
create
public FHIRResponse create(javax.json.JsonObject resource, FHIRRequestHeader... headers) throws Exception
Description copied from interface:FHIRClientInvokes the 'create' FHIR REST API operation.- Specified by:
createin interfaceFHIRClient- Parameters:
resource- the resource (in the form of a JsonObject) to be createdheaders- an optional list of request headers to be added to the request- Returns:
- a FHIRResponse that contains the results of the 'create' operation
- Throws:
Exception
-
conditionalCreate
public FHIRResponse conditionalCreate(Resource resource, FHIRParameters parameters, FHIRRequestHeader... headers) throws Exception
Description copied from interface:FHIRClientInvokes the 'conditional create' FHIR REST API operation.- Specified by:
conditionalCreatein interfaceFHIRClient- Parameters:
resource- the FHIR resource to be createdparameters- search-related query parameters to be included in the requestheaders- an optional list of request headers to be added to the request- Returns:
- a FHIRResponse that contains the results of the 'conditional create' operation
- Throws:
Exception
-
conditionalCreate
public FHIRResponse conditionalCreate(javax.json.JsonObject resource, FHIRParameters parameters, FHIRRequestHeader... headers) throws Exception
Description copied from interface:FHIRClientInvokes the 'conditional create' FHIR REST API operation.- Specified by:
conditionalCreatein interfaceFHIRClient- Parameters:
resource- the resource (in the form of a JsonObject) to be createdparameters- search-related query parameters to be included in the requestheaders- an optional list of request headers to be added to the request- Returns:
- a FHIRResponse that contains the results of the 'conditional create' operation
- Throws:
Exception
-
update
public FHIRResponse update(Resource resource, FHIRRequestHeader... headers) throws Exception
Description copied from interface:FHIRClientInvokes the 'update' FHIR REST API operation.- Specified by:
updatein interfaceFHIRClient- Parameters:
resource- the FHIR resource to be updatedheaders- an optional list of request headers to be added to the request- Returns:
- a FHIRResponse that contains the results of the 'update' operation
- Throws:
Exception
-
update
public FHIRResponse update(javax.json.JsonObject resource, FHIRRequestHeader... headers) throws Exception
Description copied from interface:FHIRClientInvokes the 'update' FHIR REST API operation.- Specified by:
updatein interfaceFHIRClient- Parameters:
resource- the resource (in the form of a JsonObject) to be updatedheaders- an optional list of request headers to be added to the request- Returns:
- a FHIRResponse that contains the results of the 'update' operation
- Throws:
Exception
-
conditionalUpdate
public FHIRResponse conditionalUpdate(Resource resource, FHIRParameters parameters, FHIRRequestHeader... headers) throws Exception
Description copied from interface:FHIRClientInvokes the 'conditional update' FHIR REST API operation.- Specified by:
conditionalUpdatein interfaceFHIRClient- Parameters:
resource- the FHIR resource to be createdparameters- search-related query parameters to be included in the requestheaders- an optional list of request headers to be added to the request- Returns:
- a FHIRResponse that contains the results of the 'conditional update' operation
- Throws:
Exception
-
conditionalUpdate
public FHIRResponse conditionalUpdate(javax.json.JsonObject resource, FHIRParameters parameters, FHIRRequestHeader... headers) throws Exception
Description copied from interface:FHIRClientInvokes the 'conditional update' FHIR REST API operation.- Specified by:
conditionalUpdatein interfaceFHIRClient- Parameters:
resource- the resource (in the form of a JsonObject) to be updatedparameters- search-related query parameters to be included in the requestheaders- an optional list of request headers to be added to the request- Returns:
- a FHIRResponse that contains the results of the 'conditional update' operation
- Throws:
Exception
-
delete
public FHIRResponse delete(String resourceType, String resourceId, FHIRRequestHeader... headers) throws Exception
Description copied from interface:FHIRClientInvokes the 'delete' FHIR REST API operation.- Specified by:
deletein interfaceFHIRClient- Parameters:
resourceType- a string representing the name of the resource type to be deleted (e.g. "Patient")resourceId- the id of the resource to be deletedheaders- an optional list of request headers to be added to the request- Returns:
- a FHIRResponse that contains the results of the 'delete' operation
- Throws:
Exception
-
conditionalDelete
public FHIRResponse conditionalDelete(String resourceType, FHIRParameters parameters, FHIRRequestHeader... headers) throws Exception
Description copied from interface:FHIRClientInvokes the 'conditional delete' FHIR REST API operation.- Specified by:
conditionalDeletein interfaceFHIRClient- Parameters:
resourceType- a string representing the name of the resource type to be deleted (e.g. "Patient")parameters- search-related query parameters to be included in the requestheaders- an optional list of request headers to be added to the request- Returns:
- a FHIRResponse that contains the results of the 'delete' operation
- Throws:
Exception
-
read
public FHIRResponse read(String resourceType, String resourceId, FHIRRequestHeader... headers) throws Exception
Description copied from interface:FHIRClientInvokes the 'read' FHIR REST API operation.- Specified by:
readin interfaceFHIRClient- Parameters:
resourceType- a string representing the name of the resource type to be retrieved (e.g. "Patient")resourceId- the id of the resource to be retrievedheaders- an optional list of request headers to be added to the request- Returns:
- a FHIRResponse that contains the results of the 'read' operation
- Throws:
Exception
-
vread
public FHIRResponse vread(String resourceType, String resourceId, String versionId, FHIRRequestHeader... headers) throws Exception
Description copied from interface:FHIRClientInvokes the 'vread' FHIR REST API operation.- Specified by:
vreadin interfaceFHIRClient- Parameters:
resourceType- a string representing the name of the resource type to be retrieved (e.g. "Patient")resourceId- the id of the resource to be retrievedversionId- the version id of the resource to be retrievedheaders- an optional list of request headers to be added to the request- Returns:
- a FHIRResponse that contains the results of the 'read' operation
- Throws:
Exception
-
history
public FHIRResponse history(String resourceType, String resourceId, FHIRParameters parameters, FHIRRequestHeader... headers) throws Exception
Description copied from interface:FHIRClientInvokes the 'history' FHIR REST API operation.- Specified by:
historyin interfaceFHIRClient- Parameters:
resourceType- a string representing the name of the resource type to be retrieved (e.g. "Patient")resourceId- the id of the resource to be retrievedparameters- an optional collection of request parameters for the 'history' operation; may be specified as null if no parameters need to be passed to the 'history' operationheaders- an optional list of request headers to be added to the request- Returns:
- a FHIRResponse that contains the results of the 'history' operation
- Throws:
Exception
-
history
public FHIRResponse history(FHIRParameters parameters, FHIRRequestHeader... headers) throws Exception
Description copied from interface:FHIRClientInvokes system level history FHIR REST API operation- Specified by:
historyin interfaceFHIRClient- Parameters:
parameters- an optional collection of request parameters for the 'history' operation; may be specified as null if no parameters need to be passed to the 'history' operationheaders- an optional list of request headers to be added to the request- Returns:
- a FHIRResponse that contains the results of the 'history' operation
- Throws:
Exception
-
search
public FHIRResponse search(String resourceType, FHIRParameters parameters, FHIRRequestHeader... headers) throws Exception
Description copied from interface:FHIRClientInvokes the 'search' FHIR REST API operation.- Specified by:
searchin interfaceFHIRClient- Parameters:
resourceType- a string representing the name of the resource type to search for (e.g. "Patient")parameters- an optional collection of request parameters for the 'search' operation; may be specified as null if no parameters need to be passed to the 'search' operationheaders- an optional list of request headers to be added to the request- Returns:
- a FHIRResponse that contains the results of the 'search' operation
- Throws:
Exception
-
_search
public FHIRResponse _search(String resourceType, FHIRParameters parameters, FHIRRequestHeader... headers) throws Exception
Description copied from interface:FHIRClientInvokes the '_search' FHIR REST API operation.- Specified by:
_searchin interfaceFHIRClient- Parameters:
resourceType- a string representing the name of the resource type to search for (e.g. "Patient")parameters- an optional collection of request parameters for the '_search' operation; may be specified as null if no parameters need to be passed to the '_search' operation; search parameters for this operation will go in the request body- Returns:
- a FHIRResponse that contains the results of the '_search' operation
- Throws:
Exception
-
searchAll
public FHIRResponse searchAll(FHIRParameters parameters, boolean isPost, FHIRRequestHeader... headers) throws Exception
Description copied from interface:FHIRClientInvokes the 'search-all' FHIR REST API operation with HTTP POST.- Specified by:
searchAllin interfaceFHIRClient- Parameters:
parameters- an optional collection of request parameters for the 'search-all' operation; may be specified as null if no parameters need to be passed to the 'search' operation; for Post, search parameters for this operation will go in the request body as FORM parameters for Get, search parameters for this operation will go in the request url as parameters- Returns:
- a FHIRResponse that contains the results of the 'search-all' operation
- Throws:
Exception
-
validate
public FHIRResponse validate(Resource resource, FHIRRequestHeader... headers) throws Exception
Description copied from interface:FHIRClientInvokes the 'validate' FHIR REST API operation.- Specified by:
validatein interfaceFHIRClient- Parameters:
resource- the resource to be validatedheaders- an optional list of request headers to be added to the request- Returns:
- a FHIRResponse that contains the results of the 'validate' operation
- Throws:
Exception
-
validate
public FHIRResponse validate(javax.json.JsonObject resource, FHIRRequestHeader... headers) throws Exception
Description copied from interface:FHIRClientInvokes the 'validate' FHIR REST API operation.- Specified by:
validatein interfaceFHIRClient- Parameters:
resource- the resource (in the form of a JsonObject) to be validatedheaders- an optional list of request headers to be added to the request- Returns:
- a FHIRResponse that contains the results of the 'validate' operation
- Throws:
Exception
-
batch
public FHIRResponse batch(Bundle bundle, FHIRRequestHeader... headers) throws Exception
Description copied from interface:FHIRClientInvokes the 'batch/transaction' FHIR REST API operation for a request bundle of type 'batch'.- Specified by:
batchin interfaceFHIRClient- Parameters:
bundle- the Bundle containing the individual requestsheaders- an optional list of request headers to be added to the request- Returns:
- a FHIRResponse that contains the results of the 'batch/transaction' operation
- Throws:
Exception
-
transaction
public FHIRResponse transaction(Bundle bundle, FHIRRequestHeader... headers) throws Exception
Description copied from interface:FHIRClientInvokes the 'batch/transaction' FHIR REST API operation for a request bundle of type 'transaction'.- Specified by:
transactionin interfaceFHIRClient- Parameters:
bundle- the Bundle containing the individual requestsheaders- an optional list of request headers to be added to the request- Returns:
- a FHIRResponse that contains the results of the 'batch/transaction' operation
- Throws:
Exception
-
invoke
public FHIRResponse invoke(String operationName, FHIRParameters parameters, FHIRRequestHeader... headers) throws Exception
Description copied from interface:FHIRClientInvokes the 'invoke' FHIR REST API operation.- Specified by:
invokein interfaceFHIRClient- Parameters:
operationName- name of the operation to be performedheaders- an optional list of request headers to be added to the request- Returns:
- a FHIRResponse that contains the results of the 'invoke' operation
- Throws:
Exception
-
invoke
public FHIRResponse invoke(String operationName, Resource resource, FHIRRequestHeader... headers) throws Exception
Description copied from interface:FHIRClientInvokes the 'invoke' FHIR REST API operation.- Specified by:
invokein interfaceFHIRClient- Parameters:
operationName- name of the operation to be performedresource- the FHIR resource used in context for the operationheaders- an optional list of request headers to be added to the request- Returns:
- a FHIRResponse that contains the results of the 'invoke' operation
- Throws:
Exception
-
invoke
public FHIRResponse invoke(String resourceType, String operationName, FHIRParameters parameters, FHIRRequestHeader... headers) throws Exception
Description copied from interface:FHIRClientInvokes the 'invoke' FHIR REST API operation.- Specified by:
invokein interfaceFHIRClient- Parameters:
resourceType- the FHIR resource type used in context for the operationoperationName- name of the operation to be performedheaders- an optional list of request headers to be added to the request- Returns:
- a FHIRResponse that contains the results of the 'invoke' operation
- Throws:
Exception
-
invoke
public FHIRResponse invoke(String resourceType, String operationName, Resource resource, FHIRRequestHeader... headers) throws Exception
Description copied from interface:FHIRClientInvokes the 'invoke' FHIR REST API operation.- Specified by:
invokein interfaceFHIRClient- Parameters:
resourceType- the FHIR resource type used in context for the operationoperationName- name of the operation to be performedresource- the FHIR resource used in context for the operationheaders- an optional list of request headers to be added to the request- Returns:
- a FHIRResponse that contains the results of the 'invoke' operation
- Throws:
Exception
-
invoke
public FHIRResponse invoke(String resourceType, String operationName, String resourceId, FHIRParameters parameters, FHIRRequestHeader... headers) throws Exception
Description copied from interface:FHIRClientInvokes the 'invoke' FHIR REST API operation.- Specified by:
invokein interfaceFHIRClient- Parameters:
resourceType- the FHIR resource type used in context for the operationoperationName- name of the operation to be performedresourceId- the FHIR resource instance used in context for the operationheaders- an optional list of request headers to be added to the request- Returns:
- a FHIRResponse that contains the results of the 'invoke' operation
- Throws:
Exception
-
invoke
public FHIRResponse invoke(String resourceType, String operationName, String resourceId, Resource resource, FHIRRequestHeader... headers) throws Exception
Description copied from interface:FHIRClientInvokes the 'invoke' FHIR REST API operation.- Specified by:
invokein interfaceFHIRClient- Parameters:
resourceType- the FHIR resource type used in context for the operationoperationName- name of the operation to be performedresourceId- the FHIR resource instance used in context for the operationresource- the FHIR resource used in context for the operationheaders- an optional list of request headers to be added to the request- Returns:
- a FHIRResponse that contains the results of the 'invoke' operation
- Throws:
Exception
-
invoke
public FHIRResponse invoke(String resourceType, String operationName, String resourceId, String versionId, FHIRParameters parameters, FHIRRequestHeader... headers) throws Exception
Description copied from interface:FHIRClientInvokes the 'invoke' FHIR REST API operation.- Specified by:
invokein interfaceFHIRClient- Parameters:
resourceType- the FHIR resource type used in context for the operationoperationName- name of the operation to be performedresourceId- the FHIR resource instance used in context for the operationversionId- version of the FHIR resource instance used in context for the operationheaders- an optional list of request headers to be added to the request- Returns:
- a FHIRResponse that contains the results of the 'invoke' operation
- Throws:
Exception
-
invoke
public FHIRResponse invoke(String resourceType, String operationName, String resourceId, String versionId, Resource resource, FHIRRequestHeader... headers) throws Exception
Description copied from interface:FHIRClientInvokes the 'invoke' FHIR REST API operation.- Specified by:
invokein interfaceFHIRClient- Parameters:
resourceType- the FHIR resource type used in context for the operationoperationName- name of the operation to be performedresourceId- the FHIR resource instance used in context for the operationversionId- version of the FHIR resource instance used in context for the operationresource- the FHIR resource used in context for the operationheaders- an optional list of request headers to be added to the request- Returns:
- a FHIRResponse that contains the results of the 'invoke' operation
- Throws:
Exception
-
getClient
protected javax.ws.rs.client.Client getClient() throws ExceptionRetrieves a jax-rs Client from the ClientBuilder object. The Client instance is created if necessary.- Throws:
Exception
-
getWebTarget
public javax.ws.rs.client.WebTarget getWebTarget() throws ExceptionDescription copied from interface:FHIRClientReturns a JAX-RS 2.0 WebTarget object associated with the REST API endpoint.- Specified by:
getWebTargetin interfaceFHIRClient- Returns:
- a WebTarget instance that can be used to invoke REST APIs.
- Throws:
Exception
-
getWebTarget
public javax.ws.rs.client.WebTarget getWebTarget(String baseURL) throws Exception
Description copied from interface:FHIRClientReturns a JAX-RS 2.0 WebTarget object associated with a given REST API endpoint.- Specified by:
getWebTargetin interfaceFHIRClient- Returns:
- a WebTarget instance that can be used to invoke REST APIs.
- Throws:
Exception
-
getWebTargetUsingBasicAuth
public javax.ws.rs.client.WebTarget getWebTargetUsingBasicAuth(String baseURL, String username, String pwd) throws Exception
Description copied from interface:FHIRClientReturns a JAX-RS 2.0 WebTarget object associated with a given REST API endpoint.- Specified by:
getWebTargetUsingBasicAuthin interfaceFHIRClient- Returns:
- a WebTarget instance that can be used to invoke REST APIs.
- Throws:
Exception
-
setDefaultMimeType
public void setDefaultMimeType(String mimeType) throws Exception
Description copied from interface:FHIRClientSets the default mime-type to be used by the FHIRClient interface when invoking REST API operations.- Specified by:
setDefaultMimeTypein interfaceFHIRClient- Parameters:
mimeType- a string containing the mime-type (e.g. "application/fhir+json")- Throws:
Exception
-
getDefaultMimeType
public String getDefaultMimeType() throws Exception
Description copied from interface:FHIRClientReturns a string that represents the default mime-type associated with the FHIRClient interface.- Specified by:
getDefaultMimeTypein interfaceFHIRClient- Throws:
Exception
-
setOAuth2AccessToken
public void setOAuth2AccessToken(String accessToken) throws Exception
Description copied from interface:FHIRClientSets the OAuth 2.0 access token to be used by the FHIRClient interface for authorization when invoking REST API operations.- Specified by:
setOAuth2AccessTokenin interfaceFHIRClient- Parameters:
accessToken- a string containing the OAuth 2.0 access token- Throws:
Exception
-
getOAuth2AccessToken
public String getOAuth2AccessToken() throws Exception
Description copied from interface:FHIRClientReturns a string that represents the OAuth 2.0 access token to be used by the FHIRClient interface for authorization requests.- Specified by:
getOAuth2AccessTokenin interfaceFHIRClient- Throws:
Exception
-
getTrustStore
public KeyStore getTrustStore()
Description copied from interface:FHIRClientAllow the client consumer to be able to get and reuse the same TrustStore if necessary.- Specified by:
getTrustStorein interfaceFHIRClient
-
getKeyStoreLocation
public String getKeyStoreLocation()
-
setKeyStoreLocation
public void setKeyStoreLocation(String keyStoreLocation)
-
getKeyStorePassword
public String getKeyStorePassword()
-
setKeyStorePassword
public void setKeyStorePassword(String keyStorePassword)
-
getKeyStoreKeyPassword
public String getKeyStoreKeyPassword()
-
setKeyStoreKeyPassword
public void setKeyStoreKeyPassword(String keyStoreKeyPassword)
-
isLoggingEnabled
public boolean isLoggingEnabled()
-
setLoggingEnabled
public void setLoggingEnabled(boolean loggingEnabled)
-
isHostnameVerificationEnabled
public boolean isHostnameVerificationEnabled()
-
setHostnameVerificationEnabled
public void setHostnameVerificationEnabled(boolean hostnameVerficationEnabled)
-
getHttpTimeout
public int getHttpTimeout()
-
setHttpTimeout
public void setHttpTimeout(int httpTimeout)
-
getHttpReturnPref
public HTTPReturnPreference getHttpReturnPref()
-
setHttpReturnPref
public void setHttpReturnPref(HTTPReturnPreference returnPref)
-
-