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 String
PROPERTY_AUDIT_KAFKA_APIKEY
static String
PROPERTY_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 CadfEvent
createCadfEvent(AuditLogEntry logEntry)
void
initialize(PropertyGroup auditLogProperties)
Performs any required audit log service initialization using the passed Properties file.boolean
isEnabled()
void
logEntry(AuditLogEntry logEntry)
Persists the passed audit log entry in a location determined by the log service.void
stop()
-
-
-
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:AuditLogService
Performs any required audit log service initialization using the passed Properties file.- Specified by:
initialize
in 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:AuditLogService
Persists the passed audit log entry in a location determined by the log service.- Specified by:
logEntry
in interfaceAuditLogService
- Parameters:
logEntry
- - The audit log entry to be saved.- Throws:
Exception
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in 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:
IllegalStateException
IOException
-
stop
public void stop()
-
-