Package com.ibm.fhir.audit.logging.impl
Class WhcAuditCadfLogService
- java.lang.Object
-
- com.ibm.fhir.audit.logging.impl.WhcAuditCadfLogService
-
- All Implemented Interfaces:
AuditLogService
public class WhcAuditCadfLogService extends Object implements AuditLogService
This class is a Cadf/EventStream/COS based implementation of the FHIR server AuditLogService interface
-
-
Field Summary
Fields Modifier and Type Field Description static StringPROPERTY_AUDIT_KAFKA_APIKEYstatic StringPROPERTY_AUDIT_KAFKA_BOOTSTRAPSERVERS
-
Constructor Summary
Constructors Constructor Description WhcAuditCadfLogService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CadfEventcreateCadfEvent(AuditLogEntry logEntry)voidinitialize(PropertyGroup auditLogProperties)Performs any required audit log service initialization using the passed Properties file.booleanisEnabled()voidlogEntry(AuditLogEntry logEntry)Persists the passed audit log entry in a location determined by the log service.voidstop()
-
-
-
Field Detail
-
PROPERTY_AUDIT_KAFKA_BOOTSTRAPSERVERS
public static final String PROPERTY_AUDIT_KAFKA_BOOTSTRAPSERVERS
- See Also:
- Constant Field Values
-
PROPERTY_AUDIT_KAFKA_APIKEY
public static final String PROPERTY_AUDIT_KAFKA_APIKEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
initialize
public void initialize(PropertyGroup auditLogProperties) throws Exception
Description copied from interface:AuditLogServicePerforms any required audit log service initialization using the passed Properties file.- Specified by:
initializein interfaceAuditLogService- Parameters:
auditLogProperties- - Contains audit log related properties which are configured in fhir-server-config.json.- Throws:
Exception- - Any non-recoverable exception thrown during audit log service initialization.
-
logEntry
public void logEntry(AuditLogEntry logEntry) throws Exception
Description copied from interface:AuditLogServicePersists the passed audit log entry in a location determined by the log service.- Specified by:
logEntryin interfaceAuditLogService- Parameters:
logEntry- - The audit log entry to be saved.- Throws:
Exception
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabledin interfaceAuditLogService- Returns:
- true if the audit log service is enabled; false if not enabled.
-
createCadfEvent
public static CadfEvent createCadfEvent(AuditLogEntry logEntry) throws IllegalStateException, IOException
- Parameters:
logEntry-- Returns:
- Throws:
IllegalStateExceptionIOException
-
stop
public void stop()
-
-