@ExperimentalApi
public interface AuditService
Modifier and Type | Interface and Description |
---|---|
static interface |
AuditService.AuditCSVWriter
Streaming CSV writer for exporting audit records
|
static interface |
AuditService.AuditRecordFinder
Finder for audit records.
|
static interface |
AuditService.Validator
Validator for audit records
|
Modifier and Type | Method and Description |
---|---|
AuditService.AuditCSVWriter |
exportCSV() |
AuditService.AuditRecordFinder |
getRecords(Instant startDate,
Instant endDate)
Retrieve audit records from the system via an
AuditService.AuditRecordFinder instance. |
RetentionPeriod |
getRetentionPeriod() |
RetentionPeriod |
setRetentionPeriod(RetentionPeriod retentionPeriod)
Set the configured retention period for audit records.
|
AuditRecord |
storeRecord(AuditRecord record)
Persist the given
AuditRecord . |
AuditService.Validator |
validator() |
AuditRecord storeRecord(AuditRecord record) throws ServiceException
AuditRecord
. The sysadmin field will be set based on the current user's privileges
before storing the record. Records will be validated using AuditService.Validator.validateCreate(AuditRecord)
record
- The record to storeServiceException
- if the record is invalidAuditService.AuditRecordFinder getRecords(@Nullable Instant startDate, @Nullable Instant endDate)
AuditService.AuditRecordFinder
instance.startDate
- The earliest date to fetch records from. Null indicates no limit.endDate
- The latest date to fetch records from. Null indicates no limit.RetentionPeriod getRetentionPeriod()
RetentionPeriod setRetentionPeriod(RetentionPeriod retentionPeriod) throws ServiceException
retentionPeriod
- the period to setServiceException
- if the retention period is longer than the system limit.AuditService.Validator validator()
AuditService.AuditCSVWriter exportCSV()
Copyright © 2003–2017 Atlassian. All rights reserved.