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
Constructors Modifier Constructor Description protected
AbstractFhirAuditStrategy(boolean serverSide)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description T
enrichAuditDatasetFromRequest(T auditDataset, Object request, Map<String,Object> parameters)
Enriches 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(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(IBaseResource resource)
A resource is returned from the business logic.String
getEventOutcomeDescription(Object response)
Determines which event outcome description corresponds with the provided response POJOabstract String
getEventOutcomeDescriptionFromOperationOutcome(O response)
EventOutcomeIndicator
getEventOutcomeIndicator(Object response)
Determines which event outcome corresponds with the provided response POJO-
Methods inherited from class org.openehealth.ipf.commons.ihe.core.atna.AuditStrategySupport
doAudit, 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
-
-
-
-
Method Detail
-
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
public EventOutcomeIndicator getEventOutcomeIndicator(Object response)
Description copied from interface:AuditStrategy
Determines which event outcome corresponds with the provided response POJO- Specified by:
getEventOutcomeIndicator
in interfaceAuditStrategy<T extends FhirAuditDataset>
- Overrides:
getEventOutcomeIndicator
in classAuditStrategySupport<T extends FhirAuditDataset>
- Parameters:
response
- POJO- Returns:
- event outcome code
-
getEventOutcomeCodeFromResource
protected EventOutcomeIndicator getEventOutcomeCodeFromResource(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
public String getEventOutcomeDescription(Object response)
Description copied from interface:AuditStrategy
Determines which event outcome description corresponds with the provided response POJO- Specified by:
getEventOutcomeDescription
in interfaceAuditStrategy<T extends FhirAuditDataset>
- Overrides:
getEventOutcomeDescription
in classAuditStrategySupport<T extends FhirAuditDataset>
- Parameters:
response
- POJO- Returns:
- event outcome description
-
getEventOutcomeCodeFromOperationOutcome
public abstract EventOutcomeIndicator getEventOutcomeCodeFromOperationOutcome(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
-
-