Package com.ibm.fhir.cli.invoker
Class OperationInvoker
- java.lang.Object
-
- com.ibm.fhir.cli.invoker.OperationInvoker
-
- Direct Known Subclasses:
BatchInvoker
,ConditionalCreateInvoker
,ConditionalDeleteInvoker
,ConditionalUpdateInvoker
,CreateInvoker
,DeleteInvoker
,HistoryInvoker
,MetadataInvoker
,ReadInvoker
,SearchAllInvoker
,SearchInvoker
,SearchPostInvoker
,TransactionInvoker
,UpdateInvoker
,ValidateInvoker
,VreadInvoker
public abstract class OperationInvoker extends Object
This is a base class for all of the various operation invoker classes.
-
-
Field Summary
Fields Modifier and Type Field Description protected FHIRClient
client
protected FHIRParameters
queryParameters
protected FHIRRequestHeader[]
requestHeaders
protected FHIRResponse
response
-
Constructor Summary
Constructors Constructor Description OperationInvoker()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
doInvoke(InvocationContext ic)
Each subclass will implement this method to invoke the appropriate FHIR Client API, based on the operation requested by the user.protected FHIRClient
getClient(Properties properties)
Retrieves a new FHIRClient instance using the specified properties.void
invoke(InvocationContext ic)
protected Properties
loadClientProperties(String filename)
Loads the FHIRClient properties from the specified file.void
postInvoke(InvocationContext ic)
Saves off the relevant response information in the InvocationContext after the operation has been invoked.void
preInvoke(InvocationContext ic)
Performs the necessary steps before the operation is invoked.
-
-
-
Field Detail
-
client
protected FHIRClient client
-
response
protected FHIRResponse response
-
queryParameters
protected FHIRParameters queryParameters
-
requestHeaders
protected FHIRRequestHeader[] requestHeaders
-
-
Method Detail
-
invoke
public void invoke(InvocationContext ic) throws Exception
- Throws:
Exception
-
preInvoke
public void preInvoke(InvocationContext ic) throws Exception
Performs the necessary steps before the operation is invoked.- Throws:
Exception
-
doInvoke
public abstract void doInvoke(InvocationContext ic) throws Exception
Each subclass will implement this method to invoke the appropriate FHIR Client API, based on the operation requested by the user.- Throws:
Exception
-
postInvoke
public void postInvoke(InvocationContext ic) throws Exception
Saves off the relevant response information in the InvocationContext after the operation has been invoked.- Throws:
Exception
-
loadClientProperties
protected Properties loadClientProperties(String filename) throws Exception
Loads the FHIRClient properties from the specified file.- Throws:
Exception
-
getClient
protected FHIRClient getClient(Properties properties) throws Exception
Retrieves a new FHIRClient instance using the specified properties.- Throws:
Exception
-
-