Class AuditAsyncService
java.lang.Object
com.eurodyn.qlack.fuse.audit.service.AuditService
com.eurodyn.qlack.fuse.audit.service.AuditAsyncService
Provides Audit CRUD functionality.
Async
ensures that each method
will be executed at a separate thread- Author:
- European Dynamics SA.
-
Constructor Summary
ConstructorDescriptionAuditAsyncService
(AuditProperties auditProperties, AuditRepository auditRepository, AuditMapper auditMapper, AuditLevelRepository auditLevelRepository) -
Method Summary
Modifier and TypeMethodDescriptionAdds an audit of an EVENT that occurred in the applicationvoid
Adds an audit of an EVENT with minimal information.void
Adds an audit of an EVENT with minimal information.void
audit
(String level, String event, String groupName, String description, String sessionID, Object traceData) Adds an audit of an EVENT that occurred in the applicationaudit
(String level, String event, String groupName, String description, String sessionID, Object traceData, String referenceId) Adds an audit of an EVENT that occurred in the applicationvoid
audit
(String level, String event, String groupName, String description, String sessionID, String traceData) Creates an audit of an EVENT that occurred in the applicationvoid
deleteAudit
(String id) Deletes an auditvoid
Deletes all persisted auditsvoid
truncateAudits
(long retentionPeriod) Deletes all audits created before the given period (eg.void
truncateAudits
(Date createdOn) Deletes all audits created before given dateMethods inherited from class com.eurodyn.qlack.fuse.audit.service.AuditService
audits, countAuditLogs, getAuditById, getAuditLogs, getDistinctEventsForReferenceId
-
Constructor Details
-
AuditAsyncService
public AuditAsyncService(AuditProperties auditProperties, AuditRepository auditRepository, AuditMapper auditMapper, AuditLevelRepository auditLevelRepository)
-
-
Method Details
-
audit
Description copied from class:AuditService
Adds an audit of an EVENT with minimal information.- Overrides:
audit
in classAuditService
- Parameters:
level
- the audit levelevent
- the audit EVENTdescription
- the audit description
-
audit
Description copied from class:AuditService
Adds an audit of an EVENT with minimal information.- Overrides:
audit
in classAuditService
- Parameters:
level
- the audit levelevent
- the audit EVENTdescription
- the audit descriptionargs
- the arguments to be passed on aMessageFormat
for the description argument.
-
audit
@Async public void audit(String level, String event, String groupName, String description, String sessionID, Object traceData) Description copied from class:AuditService
Adds an audit of an EVENT that occurred in the application- Overrides:
audit
in classAuditService
- Parameters:
level
- the audit levelevent
- the audit EVENTgroupName
- the name of the group that the audit is part ofdescription
- a description of the auditsessionID
- the id of the session that the audit occurredtraceData
- an object containing the trace of the audit
-
audit
@Async public String audit(String level, String event, String groupName, String description, String sessionID, Object traceData, String referenceId) Description copied from class:AuditService
Adds an audit of an EVENT that occurred in the application- Overrides:
audit
in classAuditService
- Parameters:
level
- the audit levelevent
- the audit EVENTgroupName
- the name of the group that the audit is part ofdescription
- a description of the auditsessionID
- the id of the session that the audit occurredtraceData
- an object containing the trace of the auditreferenceId
- the reference id of the audit- Returns:
- the id of the created audit
-
audit
@Async public void audit(String level, String event, String groupName, String description, String sessionID, String traceData) Description copied from class:AuditService
Creates an audit of an EVENT that occurred in the application- Overrides:
audit
in classAuditService
- Parameters:
level
- the audit levelevent
- the audit EVENTgroupName
- the name of the group that the audit is part ofdescription
- a description of the auditsessionID
- the id of the session that the audit occurredtraceData
- a String containing the trace of the audit
-
audit
Description copied from class:AuditService
Adds an audit of an EVENT that occurred in the application- Overrides:
audit
in classAuditService
- Parameters:
audit
- a DTO containing all information of the audit to persist- Returns:
- the id of the created audit
-
deleteAudit
Description copied from class:AuditService
Deletes an audit- Overrides:
deleteAudit
in classAuditService
- Parameters:
id
- the id of the audit to delete
-
truncateAudits
@Async public void truncateAudits()Description copied from class:AuditService
Deletes all persisted audits- Overrides:
truncateAudits
in classAuditService
-
truncateAudits
Description copied from class:AuditService
Deletes all audits created before given date- Overrides:
truncateAudits
in classAuditService
- Parameters:
createdOn
- the date before which all audits will be deleted
-
truncateAudits
@Async public void truncateAudits(long retentionPeriod) Description copied from class:AuditService
Deletes all audits created before the given period (eg. last 7 days)- Overrides:
truncateAudits
in classAuditService
- Parameters:
retentionPeriod
- the period that audits should be kept
-