Class AbstractFhirAuditStrategy<T extends FhirAuditDataset,O extends IBaseOperationOutcome>
java.lang.Object
org.openehealth.ipf.commons.ihe.core.atna.AuditStrategySupport<T>
org.openehealth.ipf.commons.ihe.fhir.audit.AbstractFhirAuditStrategy<T,O>
- All Implemented Interfaces:
AuditStrategy<T>
- Direct Known Subclasses:
FhirAuditStrategy
public abstract class AbstractFhirAuditStrategy<T extends FhirAuditDataset,O extends IBaseOperationOutcome>
extends AuditStrategySupport<T>
Generic Audit Strategy for FHIR transactions
- Since:
- 3.2
- Author:
- Christian Ohr
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionEnriches the given audit dataset with transaction-specific contents of the request message and Camel exchange.boolean
enrichAuditDatasetFromResponse
(T auditDataset, Object response, AuditContext auditContext) Enriches the given audit dataset with transaction-specific contents of the response message.abstract EventOutcomeIndicator
getEventOutcomeCodeFromOperationOutcome
(FhirContext fhirContext, O response) Operation Outcomes are sets of error, warning and information messages that provide detailed information about the outcome of some attempted system operation.protected EventOutcomeIndicator
getEventOutcomeCodeFromResource
(T auditDataset, IBaseResource resource) A resource is returned from the business logic.getEventOutcomeDescription
(T auditDataset, Object response) Determines which event outcome description corresponds with the provided response POJOabstract String
getEventOutcomeDescriptionFromOperationOutcome
(FhirContext fhirContext, O response) getEventOutcomeIndicator
(T auditDataset, Object response) Determines which event outcome corresponds with the provided response POJOMethods inherited from class org.openehealth.ipf.commons.ihe.core.atna.AuditStrategySupport
doAudit, getEventOutcomeDescription, getEventOutcomeIndicator, isAuditableResponse, isServerSide, makeAuditMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.openehealth.ipf.commons.ihe.core.atna.AuditStrategy
createAuditDataset, enrichAuditDatasetFromResponse
-
Constructor Details
-
AbstractFhirAuditStrategy
protected AbstractFhirAuditStrategy(boolean serverSide)
-
-
Method Details
-
enrichAuditDatasetFromRequest
public T enrichAuditDatasetFromRequest(T auditDataset, Object request, Map<String, Object> parameters) Description copied from interface:AuditStrategy
Enriches the given audit dataset with transaction-specific contents of the request message and Camel exchange.- Specified by:
enrichAuditDatasetFromRequest
in interfaceAuditStrategy<T extends FhirAuditDataset>
- Overrides:
enrichAuditDatasetFromRequest
in classAuditStrategySupport<T extends FhirAuditDataset>
- Parameters:
auditDataset
- audit dataset to be enriched.request
-Object
representing the request.parameters
- additional parameters
-
enrichAuditDatasetFromResponse
public boolean enrichAuditDatasetFromResponse(T auditDataset, Object response, AuditContext auditContext) Description copied from interface:AuditStrategy
Enriches the given audit dataset with transaction-specific contents of the response message.- Specified by:
enrichAuditDatasetFromResponse
in interfaceAuditStrategy<T extends FhirAuditDataset>
- Overrides:
enrichAuditDatasetFromResponse
in classAuditStrategySupport<T extends FhirAuditDataset>
- Parameters:
auditDataset
- audit dataset to be enriched.response
-Object
representing the responded resource.auditContext
- audit context, if relevant- Returns:
- true if response indicates success, false otherwise
-
getEventOutcomeIndicator
Description copied from interface:AuditStrategy
Determines which event outcome corresponds with the provided response POJO- Parameters:
auditDataset
- Audit datasetresponse
- POJO- Returns:
- event outcome code
-
getEventOutcomeCodeFromResource
protected EventOutcomeIndicator getEventOutcomeCodeFromResource(T auditDataset, IBaseResource resource) A resource is returned from the business logic. This may usually success unless it's OperationOutcome- Parameters:
resource
- FHIR resource- Returns:
- event outcome code
-
getEventOutcomeDescription
Description copied from interface:AuditStrategy
Determines which event outcome description corresponds with the provided response POJO- Parameters:
auditDataset
- Audit datasetresponse
- POJO- Returns:
- event outcome description
-
getEventOutcomeCodeFromOperationOutcome
public abstract EventOutcomeIndicator getEventOutcomeCodeFromOperationOutcome(FhirContext fhirContext, O response) Operation Outcomes are sets of error, warning and information messages that provide detailed information about the outcome of some attempted system operation. They are provided as a direct system response, or component of one, where they provide information about the outcome of the operation.- Parameters:
response
-IBaseOperationOutcome
to be analyzed- Returns:
- ATNA outcome code
-
getEventOutcomeDescriptionFromOperationOutcome
public abstract String getEventOutcomeDescriptionFromOperationOutcome(FhirContext fhirContext, O response)
-