Package org.craftercms.commons.audit
Class AuditReaper
- java.lang.Object
-
- org.craftercms.commons.audit.AuditReaper
-
public class AuditReaper extends Object
Audit Reaper Service. this class is meant to be run periodically.- Author:
- Carlos Ortiz.
-
-
Field Summary
Fields Modifier and Type Field Description protected AuditService<? extends AuditModel>
auditService
Audit Service implementation.protected int
maxAuditAllowedDays
Maximum days to keep in the log.
-
Constructor Summary
Constructors Constructor Description AuditReaper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
scythe()
Search all logs to be deleted and send there id's to the audit service to be deleted.void
setAuditService(AuditService<?> auditService)
void
setMaxAuditAllowedDays(int maxAuditAllowedDays)
-
-
-
Field Detail
-
auditService
protected AuditService<? extends AuditModel> auditService
Audit Service implementation.
-
maxAuditAllowedDays
protected int maxAuditAllowedDays
Maximum days to keep in the log.
-
-
Method Detail
-
scythe
public void scythe()
Search all logs to be deleted and send there id's to the audit service to be deleted.
If maximum days is set to -1 nothing will deleted, 0 it delete all audits daily.
-
setAuditService
public void setAuditService(AuditService<?> auditService)
-
setMaxAuditAllowedDays
public void setMaxAuditAllowedDays(int maxAuditAllowedDays)
-
-