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 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 interface AuditStrategy<T extends FhirAuditDataset>
      Overrides:
      enrichAuditDatasetFromRequest in class AuditStrategySupport<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 interface AuditStrategy<T extends FhirAuditDataset>
      Overrides:
      enrichAuditDatasetFromResponse in class AuditStrategySupport<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(T auditDataset, Object response)
      Description copied from interface: AuditStrategy
      Determines which event outcome corresponds with the provided response POJO
      Parameters:
      auditDataset - Audit dataset
      response - 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

      public String getEventOutcomeDescription(T auditDataset, Object response)
      Description copied from interface: AuditStrategy
      Determines which event outcome description corresponds with the provided response POJO
      Parameters:
      auditDataset - Audit dataset
      response - 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)