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, 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 Details

    • AuditStrategySupport

      protected AuditStrategySupport(boolean serverSide)
      Parameters:
      serverSide - true when this strategy is a server-side one; false otherwise.
  • Method Details

    • doAudit

      public void doAudit(AuditContext auditContext, T auditDataset)
      Description copied from interface: AuditStrategy
      Performs the actual ATNA audit.
      Specified by:
      doAudit in interface AuditStrategy<T extends AuditDataset>
      Parameters:
      auditContext - audit context used for auditing
      auditDataset - Collected audit dataset.
    • makeAuditMessage

      public abstract AuditMessage[] makeAuditMessage(AuditContext auditContext, T auditDataset)
      Constructs an AuditMessage from a provided AuditDataset
      Parameters:
      auditContext - audit context
      auditDataset - 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 interface AuditStrategy<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 interface AuditStrategy<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
    • 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 interface AuditStrategy<T extends AuditDataset>
      Parameters:
      response - POJO
      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 interface AuditStrategy<T extends AuditDataset>
      Parameters:
      response - POJO
      Returns:
      event outcome description
    • isAuditableResponse

      public boolean isAuditableResponse(Object response)
      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 interface AuditStrategy<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()