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 Details

    • auditService

      protected AuditService<? extends AuditModel> auditService
      Audit Service implementation.
    • maxAuditAllowedDays

      protected int maxAuditAllowedDays
      Maximum days to keep in the log.
  • Constructor Details

    • AuditReaper

      public AuditReaper()
  • Method Details

    • 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)