Class DefaultAuditContext
java.lang.Object
org.openehealth.ipf.commons.audit.DefaultAuditContext
- All Implemented Interfaces:
AuditContext
- Direct Known Subclasses:
DefaultBalpAuditContext
- Since:
- 3.5
- Author:
- Christian Ohr
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns a value that is used when an otherwise mandatory attribute for an audit record in missing (e.g.boolean
boolean
Determines whether participant object records shall be added to the audit message that are derived from the response of a request.void
setAuditEnabled
(boolean auditEnabled) void
setAuditEnterpriseSiteId
(String auditEnterpriseSiteId) void
setAuditExceptionHandler
(AuditExceptionHandler auditExceptionHandler) void
setAuditMessagePostProcessor
(AuditMessagePostProcessor auditMessagePostProcessor) void
setAuditMessageQueue
(AuditMessageQueue auditMessageQueue) void
setAuditMetadataProvider
(AuditMetadataProvider auditMetadataProvider) void
setAuditRepositoryHost
(String host) void
setAuditRepositoryHostName
(String auditRepositoryHostName) void
setAuditRepositoryPort
(int auditRepositoryPort) void
setAuditRepositoryTransport
(String transport) void
setAuditSource
(AuditSource auditSource) void
setAuditSourceId
(String auditSourceId) void
setAuditTransmissionProtocol
(AuditTransmissionProtocol auditTransmissionProtocol) void
setAuditValueIfMissing
(String auditValueIfMissing) void
setIncludeParticipantsFromResponse
(boolean includeParticipantsFromResponse) void
setSendingApplication
(String sendingApplication) Deprecated.void
setSerializationStrategy
(SerializationStrategy serializationStrategy) void
setTlsParameters
(TlsParameters tlsParameters) 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.audit.AuditContext
audit
-
Constructor Details
-
DefaultAuditContext
public DefaultAuditContext()
-
-
Method Details
-
getAuditRepositoryTransport
-
setAuditRepositoryHost
-
setAuditRepositoryTransport
-
getSendingApplication
- Specified by:
getSendingApplication
in interfaceAuditContext
- Returns:
- sending application
-
setSendingApplication
Deprecated. -
getAuditRepositoryAddress
- Specified by:
getAuditRepositoryAddress
in interfaceAuditContext
- Returns:
- address of the audit repository
-
getAuditRepositoryHostName
- Specified by:
getAuditRepositoryHostName
in interfaceAuditContext
- Returns:
- hostname of the audit repository
-
setAuditRepositoryHostName
-
getAuditRepositoryPort
public int getAuditRepositoryPort()- Specified by:
getAuditRepositoryPort
in interfaceAuditContext
- Returns:
- port of the audit repository
-
setAuditRepositoryPort
public void setAuditRepositoryPort(int auditRepositoryPort) -
isAuditEnabled
public boolean isAuditEnabled()- Specified by:
isAuditEnabled
in interfaceAuditContext
- Returns:
- true if auditing is enabled, false otherwise
-
setAuditEnabled
public void setAuditEnabled(boolean auditEnabled) - Specified by:
setAuditEnabled
in interfaceAuditContext
- Parameters:
auditEnabled
- enable or disable auditing
-
getAuditTransmissionProtocol
- Specified by:
getAuditTransmissionProtocol
in interfaceAuditContext
- Returns:
- the wire protocol to be used
-
setAuditTransmissionProtocol
-
getAuditMessageQueue
- Specified by:
getAuditMessageQueue
in interfaceAuditContext
- Returns:
- the queue implementation to be used
-
setAuditMessageQueue
-
getAuditSourceId
- Specified by:
getAuditSourceId
in interfaceAuditContext
- Returns:
- Source ID attribute of the audit event
-
setAuditSourceId
-
getAuditEnterpriseSiteId
- Specified by:
getAuditEnterpriseSiteId
in interfaceAuditContext
- Returns:
- Enterprise site ID attribute of the audit event
-
setAuditEnterpriseSiteId
-
getAuditSource
- Specified by:
getAuditSource
in interfaceAuditContext
- Returns:
- type of audit source
-
setAuditSource
-
getSerializationStrategy
- Specified by:
getSerializationStrategy
in interfaceAuditContext
- Returns:
- the serialization strategy (defaults to the latest relevant DICOM version)
-
setSerializationStrategy
-
getAuditMessagePostProcessor
- Specified by:
getAuditMessagePostProcessor
in interfaceAuditContext
- Returns:
- a post-processor for audit messages (defaults to a NO-OP implementation
-
setAuditMessagePostProcessor
-
getAuditExceptionHandler
- Specified by:
getAuditExceptionHandler
in interfaceAuditContext
- Returns:
- exception handler
-
setAuditExceptionHandler
-
getAuditMetadataProvider
- Specified by:
getAuditMetadataProvider
in interfaceAuditContext
-
setAuditMetadataProvider
-
getTlsParameters
- Specified by:
getTlsParameters
in interfaceAuditContext
- Returns:
- the SSL socket factory to be used for TLS-based connections
-
setTlsParameters
-
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 interfaceAuditContext
- Returns:
- true if participant object records shall be added, otherwise false
-
setIncludeParticipantsFromResponse
public void setIncludeParticipantsFromResponse(boolean includeParticipantsFromResponse) -
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 interfaceAuditContext
- Returns:
- a value that is used when an otherwise mandatory attribute for an audit record in missing
-
setAuditValueIfMissing
-
AuditMetadataProvider.setSendingApplication(String)