public interface AuditRecordService
AuditRecord instances and persist those to the underlying data
store, e.g. AuditRecordRepository.
Callers have the choice to persist just a String as the data to be audited or,
alternatively, callers can also provide a Map whose elements will be serialized
to JSON using Jackson.| Modifier and Type | Method and Description |
|---|---|
org.springframework.data.domain.Page<AuditRecord> |
findAuditRecordByAuditOperationTypeAndAuditActionType(org.springframework.data.domain.Pageable pageable,
AuditActionType[] actions,
AuditOperationType[] operations)
Allows for querying of
AuditRecords. |
AuditRecord |
findOne(Long id)
Find a single
AuditRecord by providing a mandatory id. |
AuditRecord |
populateAndSaveAuditRecord(AuditOperationType auditOperationType,
AuditActionType auditActionType,
String correlationId,
String data)
With a mandatory set of parameters, this method will create a
AuditRecord
instance and persist it to the underlying data store, e.g. |
AuditRecord |
populateAndSaveAuditRecordUsingMapData(AuditOperationType auditOperationType,
AuditActionType auditActionType,
String correlationId,
Map<String,Object> data)
Similar to
populateAndSaveAuditRecord(AuditOperationType, AuditActionType, String, String)
but instead of a String users can provide a Map as the Audit Data parameter,
which will be persisted as a JSON a structure. |
AuditRecord populateAndSaveAuditRecord(AuditOperationType auditOperationType, AuditActionType auditActionType, String correlationId, String data)
AuditRecord
instance and persist it to the underlying data store, e.g.
AuditRecordRepository.auditOperationType - Must not be nullauditActionType - Must not be nullcorrelationId - Id to identify the recorddata - The data as String to be auditedAuditRecord populateAndSaveAuditRecordUsingMapData(AuditOperationType auditOperationType, AuditActionType auditActionType, String correlationId, Map<String,Object> data)
populateAndSaveAuditRecord(AuditOperationType, AuditActionType, String, String)
but instead of a String users can provide a Map as the Audit Data parameter,
which will be persisted as a JSON a structure. Callers should therefore make sure that
the provided Map can indeed be serialized to JSON via Jackson.auditOperationType - Must not be nullauditActionType - Must not be nullcorrelationId - Id to identify the recorddata - The data as a Map to be auditedorg.springframework.data.domain.Page<AuditRecord> findAuditRecordByAuditOperationTypeAndAuditActionType(org.springframework.data.domain.Pageable pageable, AuditActionType[] actions, AuditOperationType[] operations)
AuditRecords.pageable - Contains pagination information. If null, all AuditRecords will be returnedactions - Can be null. For which AuditActionTypes shall AuditRecords be returnedoperations - Can be null. For which AuditOperationTypes shall AuditRecords be returnedPage of AuditRecordsAuditRecord findOne(Long id)
AuditRecord by providing a mandatory id.id - Must not be null/Copyright © 2018 Pivotal Software, Inc.. All rights reserved.