Package org.hl7.fhir.dstu2.utils.client
Class FHIRToolingClient
java.lang.Object
org.hl7.fhir.utilities.FHIRBaseToolingClient
org.hl7.fhir.dstu2.utils.client.FHIRToolingClient
Very Simple RESTful client. This is purely for use in the standalone tools
jar packages. It doesn't support many features, only what the tools need.
To use, initialize class and set base service URI as follows:
FHIRSimpleClient fhirClient = new FHIRSimpleClient();
fhirClient.initialize("http://my.fhir.domain/myServiceRoot");
Default Accept and Content-Type headers are application/xml+fhir and
application/j+fhir.
These can be changed by invoking the following setter functions:
setPreferredResourceFormat()
setPreferredFeedFormat()
TODO Review all sad paths.- Author:
- Claude Nanjo
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
Fields inherited from class org.hl7.fhir.utilities.FHIRBaseToolingClient
timeoutEntry, timeoutExpand, timeoutLong, timeoutNormal, timeoutOperation, versionInMimeTypes
-
Constructor Summary
ConstructorDescriptionFHIRToolingClient
(String baseServiceUrl, String userAgent) FHIRToolingClient
(String baseServiceUrl, String userAgent, String username, String password) -
Method Summary
Modifier and TypeMethodDescriptionvoid
configureProxy
(String proxyHost, int proxyPort) void
expandValueset
(ValueSet source, Parameters expParams) <T extends Resource>
TgetCanonical
(Class<T> resourceClass, String canonicalURL) getConformanceStatement
(boolean useOptionsVerb) getConformanceStatementQuick
(boolean useOptionsVerb) org.hl7.fhir.utilities.ToolingClientLogger
int
int
int
int
protected void
handleException
(String message, Exception e) Helper method to prevent nesting of previously thrown EFhirClientExceptionsvoid
initialize
(String baseServiceUrl) initializeClosure
(String name) protected boolean
Helper method to determine whether desired resource representation is Json or XML.lookupCode
(Map<String, String> params) <T extends Resource>
ParametersoperateType
(Class<T> resourceClass, String name, Parameters params) <T extends Resource>
Tvoid
setAcceptLanguage
(String lang) void
setContentLanguage
(String lang) void
setLogger
(org.hl7.fhir.utilities.ToolingClientLogger logger) void
setMaximumRecordCount
(int maxResultSetSize) void
setPassword
(String password) void
setPreferredResourceFormat
(ResourceFormat resourceFormat) void
setRetryCount
(int retryCount) void
setTimeout
(int timeout) void
setUserAgent
(String userAgent) void
setUsername
(String username) transaction
(Bundle batch) <T extends Resource>
TupdateClosure
(String name, Coding coding) <T extends Resource>
OperationOutcome<T extends Resource>
TMethods inherited from class org.hl7.fhir.utilities.FHIRBaseToolingClient
getTimeoutEntry, getTimeoutExpand, getTimeoutLong, getTimeoutNormal, getTimeoutOperation, isVersionInMimeTypes, setTimeoutEntry, setTimeoutExpand, setTimeoutFactor, setTimeoutLong, setTimeoutNormal, setTimeoutOperation, setVersionInMimeTypes, withVer
-
Field Details
-
DATETIME_FORMAT
- See Also:
-
DATE_FORMAT
- See Also:
-
hostKey
- See Also:
-
portKey
- See Also:
-
-
Constructor Details
-
FHIRToolingClient
- Throws:
URISyntaxException
-
FHIRToolingClient
public FHIRToolingClient(String baseServiceUrl, String userAgent, String username, String password) throws URISyntaxException - Throws:
URISyntaxException
-
-
Method Details
-
configureProxy
-
detectProxy
-
initialize
- Throws:
URISyntaxException
-
getPreferredResourceFormat
-
setPreferredResourceFormat
-
getMaximumRecordCount
-
setMaximumRecordCount
-
getConformanceStatement
- Throws:
EFhirClientException
-
getConformanceStatement
-
getConformanceStatementQuick
- Throws:
EFhirClientException
-
getConformanceStatementQuick
-
read
-
vread
-
getCanonical
-
update
-
update
-
operateType
public <T extends Resource> Parameters operateType(Class<T> resourceClass, String name, Parameters params) -
transaction
-
validate
public <T extends Resource> OperationOutcome validate(Class<T> resourceClass, T resource, String id) -
handleException
Helper method to prevent nesting of previously thrown EFhirClientExceptions- Parameters:
e
-- Throws:
EFhirClientException
-
isJson
Helper method to determine whether desired resource representation is Json or XML.- Parameters:
format
-- Returns:
-
fetchFeed
-
lookupCode
-
lookupCode
-
translate
-
expandValueset
-
getAddress
-
initializeClosure
-
updateClosure
-
getTimeout
-
setTimeout
-
getUsername
-
setUsername
-
getPassword
-
setPassword
-
getTerminologyCapabilities
-
getLogger
-
setLogger
-
getRetryCount
-
setRetryCount
-
getUserAgent
-
setUserAgent
-
getServerVersion
-
setContentLanguage
-
setAcceptLanguage
-
getUseCount
-
search
-