Class AuditStrategySupport<T extends AuditDataset>
java.lang.Object
org.openehealth.ipf.commons.ihe.core.atna.AuditStrategySupport<T>
- All Implemented Interfaces:
AuditStrategy<T>
- Direct Known Subclasses:
AbstractFhirAuditStrategy
,ChAdrAuditStrategy
,ChPpq1AuditStrategy
,ChPpq2AuditStrategy
,Hl7v3AuditStrategy
,Iti10AuditStrategy
,Iti30AuditStrategy
,Iti31AuditStrategy
,Iti48AuditStrategy
,Iti59ClientAuditStrategy
,Iti59ServerAuditStrategy
,Iti64AuditStrategy
,Iti68BinaryServerAuditStrategy
,Iti68ServerAuditStrategy
,Iti79AuditStrategy
,Iti8AuditStrategy
,Iti9AuditStrategy
,NoAuditStrategy
,PdqAuditStrategy
,XdsAuditStrategy
public abstract class AuditStrategySupport<T extends AuditDataset>
extends Object
implements AuditStrategy<T>
- Since:
- 3.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
doAudit
(AuditContext auditContext, T auditDataset) Performs the actual ATNA audit.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.boolean
isAuditableResponse
(Object response) Determines whether the given response finalizes the interaction and thus the ATNA auditing should be finalized as well.protected boolean
abstract AuditMessage[]
makeAuditMessage
(AuditContext auditContext, T auditDataset) Constructs anAuditMessage
from a providedAuditDataset
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, getEventOutcomeDescription, getEventOutcomeIndicator
-
Constructor Details
-
AuditStrategySupport
protected AuditStrategySupport(boolean serverSide) - Parameters:
serverSide
-true
when this strategy is a server-side one;false
otherwise.
-
-
Method Details
-
doAudit
Description copied from interface:AuditStrategy
Performs the actual ATNA audit.- Specified by:
doAudit
in interfaceAuditStrategy<T extends AuditDataset>
- Parameters:
auditContext
- audit context used for auditingauditDataset
- Collected audit dataset.
-
makeAuditMessage
Constructs anAuditMessage
from a providedAuditDataset
- Parameters:
auditContext
- audit contextauditDataset
- audit dataset- Returns:
- audit message
-
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 AuditDataset>
- 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 AuditDataset>
- 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
-
isAuditableResponse
Description copied from interface:AuditStrategy
Determines whether the given response finalizes the interaction and thus the ATNA auditing should be finalized as well.Per default always returns
true
.- Specified by:
isAuditableResponse
in interfaceAuditStrategy<T extends AuditDataset>
- Parameters:
response
- response in transaction-specific format (POJO, XML string, etc.).- Returns:
true
when this response finalizes the interaction.
-
isServerSide
protected boolean isServerSide()
-