Class DefaultAuditContext

java.lang.Object
org.openehealth.ipf.commons.audit.DefaultAuditContext
All Implemented Interfaces:
AuditContext
Direct Known Subclasses:
DefaultBalpAuditContext

public class DefaultAuditContext extends Object implements AuditContext
Since:
3.5
Author:
Christian Ohr
  • Constructor Details

    • DefaultAuditContext

      public DefaultAuditContext()
  • Method Details

    • getAuditRepositoryTransport

      public String getAuditRepositoryTransport()
    • setAuditRepositoryHost

      public void setAuditRepositoryHost(String host)
    • setAuditRepositoryTransport

      public void setAuditRepositoryTransport(String transport)
    • getSendingApplication

      public String getSendingApplication()
      Specified by:
      getSendingApplication in interface AuditContext
      Returns:
      sending application
    • setSendingApplication

      @Deprecated public void setSendingApplication(String sendingApplication)
    • getAuditRepositoryAddress

      public InetAddress getAuditRepositoryAddress()
      Specified by:
      getAuditRepositoryAddress in interface AuditContext
      Returns:
      address of the audit repository
    • getAuditRepositoryHostName

      public String getAuditRepositoryHostName()
      Specified by:
      getAuditRepositoryHostName in interface AuditContext
      Returns:
      hostname of the audit repository
    • setAuditRepositoryHostName

      public void setAuditRepositoryHostName(String auditRepositoryHostName)
    • getAuditRepositoryPort

      public int getAuditRepositoryPort()
      Specified by:
      getAuditRepositoryPort in interface AuditContext
      Returns:
      port of the audit repository
    • setAuditRepositoryPort

      public void setAuditRepositoryPort(int auditRepositoryPort)
    • isAuditEnabled

      public boolean isAuditEnabled()
      Specified by:
      isAuditEnabled in interface AuditContext
      Returns:
      true if auditing is enabled, false otherwise
    • setAuditEnabled

      public void setAuditEnabled(boolean auditEnabled)
      Specified by:
      setAuditEnabled in interface AuditContext
      Parameters:
      auditEnabled - enable or disable auditing
    • getAuditTransmissionProtocol

      public AuditTransmissionProtocol getAuditTransmissionProtocol()
      Specified by:
      getAuditTransmissionProtocol in interface AuditContext
      Returns:
      the wire protocol to be used
    • setAuditTransmissionProtocol

      public void setAuditTransmissionProtocol(AuditTransmissionProtocol auditTransmissionProtocol)
    • getAuditMessageQueue

      public AuditMessageQueue getAuditMessageQueue()
      Specified by:
      getAuditMessageQueue in interface AuditContext
      Returns:
      the queue implementation to be used
    • setAuditMessageQueue

      public void setAuditMessageQueue(AuditMessageQueue auditMessageQueue)
    • getAuditSourceId

      public String getAuditSourceId()
      Specified by:
      getAuditSourceId in interface AuditContext
      Returns:
      Source ID attribute of the audit event
    • setAuditSourceId

      public void setAuditSourceId(String auditSourceId)
    • getAuditEnterpriseSiteId

      public String getAuditEnterpriseSiteId()
      Specified by:
      getAuditEnterpriseSiteId in interface AuditContext
      Returns:
      Enterprise site ID attribute of the audit event
    • setAuditEnterpriseSiteId

      public void setAuditEnterpriseSiteId(String auditEnterpriseSiteId)
    • getAuditSource

      public AuditSource getAuditSource()
      Specified by:
      getAuditSource in interface AuditContext
      Returns:
      type of audit source
    • setAuditSource

      public void setAuditSource(AuditSource auditSource)
    • getSerializationStrategy

      public SerializationStrategy getSerializationStrategy()
      Specified by:
      getSerializationStrategy in interface AuditContext
      Returns:
      the serialization strategy (defaults to the latest relevant DICOM version)
    • setSerializationStrategy

      public void setSerializationStrategy(SerializationStrategy serializationStrategy)
    • getAuditMessagePostProcessor

      public AuditMessagePostProcessor getAuditMessagePostProcessor()
      Specified by:
      getAuditMessagePostProcessor in interface AuditContext
      Returns:
      a post-processor for audit messages (defaults to a NO-OP implementation
    • setAuditMessagePostProcessor

      public void setAuditMessagePostProcessor(AuditMessagePostProcessor auditMessagePostProcessor)
    • getAuditExceptionHandler

      public AuditExceptionHandler getAuditExceptionHandler()
      Specified by:
      getAuditExceptionHandler in interface AuditContext
      Returns:
      exception handler
    • setAuditExceptionHandler

      public void setAuditExceptionHandler(AuditExceptionHandler auditExceptionHandler)
    • getAuditMetadataProvider

      public AuditMetadataProvider getAuditMetadataProvider()
      Specified by:
      getAuditMetadataProvider in interface AuditContext
    • setAuditMetadataProvider

      public void setAuditMetadataProvider(AuditMetadataProvider auditMetadataProvider)
    • getTlsParameters

      public TlsParameters getTlsParameters()
      Specified by:
      getTlsParameters in interface AuditContext
      Returns:
      the SSL socket factory to be used for TLS-based connections
    • setTlsParameters

      public void setTlsParameters(TlsParameters tlsParameters)
    • isIncludeParticipantsFromResponse

      public boolean isIncludeParticipantsFromResponse()
      Description copied from interface: AuditContext
      Determines whether participant object records shall be added to the audit message that are derived from the response of a request. This specifically applies to query results. The DICOM audit specification states that this should not be the case, however, project and legal requirements sometimes mandate that e.g. patient identifiers being retrieved shall be audited.
      Specified by:
      isIncludeParticipantsFromResponse in interface AuditContext
      Returns:
      true if participant object records shall be added, otherwise false
    • setIncludeParticipantsFromResponse

      public void setIncludeParticipantsFromResponse(boolean includeParticipantsFromResponse)
    • getAuditValueIfMissing

      public String getAuditValueIfMissing()
      Description copied from interface: AuditContext
      Returns a value that is used when an otherwise mandatory attribute for an audit record in missing (e.g. a participant object ID). In this case, we can still write an audit record (e.g. documenting a failed request due to the missing attribute).

      This can also be set to null at the risk that building the audit record might throw an exception.

      Specified by:
      getAuditValueIfMissing in interface AuditContext
      Returns:
      a value that is used when an otherwise mandatory attribute for an audit record in missing
    • setAuditValueIfMissing

      public void setAuditValueIfMissing(String auditValueIfMissing)