Package org.saidone.service.audit
Interface AuditService
- All Known Implementing Classes:
AuditServiceImpl
public interface AuditService
Service abstraction for persisting and querying
AuditEntry
objects.
Implementations are responsible for storing audit entries and retrieving them using optional search criteria such as type or timestamp range.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Name of the MongoDB collection used to store audit entries. -
Method Summary
Modifier and TypeMethodDescriptionfindEntries
(String type, Instant from, Instant to, org.springframework.data.domain.Pageable pageable) Retrieve stored audit entries.void
saveEntry
(AuditEntry auditEntry) Persist the provided audit entry.
-
Field Details
-
AUDIT_COLLECTION_NAME
Name of the MongoDB collection used to store audit entries.- See Also:
-
-
Method Details
-
saveEntry
Persist the provided audit entry.- Parameters:
auditEntry
- the entry to store
-
findEntries
List<AuditEntry> findEntries(String type, Instant from, Instant to, org.springframework.data.domain.Pageable pageable) Retrieve stored audit entries.- Parameters:
type
- optional entry type to filter byfrom
- lower bound of the timestamp range (inclusive)to
- upper bound of the timestamp range (inclusive)pageable
- pagination information such as page number and size- Returns:
- list of matching audit entries ordered by timestamp descending
-