Package de.trustable.ca3s.core.service
Class AuditEventService
- java.lang.Object
-
- de.trustable.ca3s.core.service.AuditEventService
-
@Service @Transactional public class AuditEventService extends Object
Service for managing audit events.This is the default implementation to support SpringBoot Actuator
AuditEventRepository.
-
-
Constructor Summary
Constructors Constructor Description AuditEventService(PersistenceAuditEventRepository persistenceAuditEventRepository, AuditEventConverter auditEventConverter, tech.jhipster.config.JHipsterProperties jhipsterProperties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<org.springframework.boot.actuate.audit.AuditEvent>find(Long id)org.springframework.data.domain.Page<org.springframework.boot.actuate.audit.AuditEvent>findAll(org.springframework.data.domain.Pageable pageable)org.springframework.data.domain.Page<org.springframework.boot.actuate.audit.AuditEvent>findByDates(Instant fromDate, Instant toDate, org.springframework.data.domain.Pageable pageable)voidremoveOldAuditEvents()Old audit events should be automatically deleted after 30 days.
-
-
-
Constructor Detail
-
AuditEventService
public AuditEventService(PersistenceAuditEventRepository persistenceAuditEventRepository, AuditEventConverter auditEventConverter, tech.jhipster.config.JHipsterProperties jhipsterProperties)
-
-
Method Detail
-
removeOldAuditEvents
@Scheduled(cron="0 0 12 * * ?") public void removeOldAuditEvents()
Old audit events should be automatically deleted after 30 days. This is scheduled to get fired at 12:00 (am).
-
findAll
public org.springframework.data.domain.Page<org.springframework.boot.actuate.audit.AuditEvent> findAll(org.springframework.data.domain.Pageable pageable)
-
findByDates
public org.springframework.data.domain.Page<org.springframework.boot.actuate.audit.AuditEvent> findByDates(Instant fromDate, Instant toDate, org.springframework.data.domain.Pageable pageable)
-
-