@Deprecated public class AuditServiceAdapter extends Object implements AuditService
Please note:
deleteRecords
method has been deprecated and replaced with empty body.getRetentionPeriod
might provide an approximation of real retention.AuditService.AuditCSVWriter, AuditService.AuditRecordFinder, AuditService.Validator
Constructor and Description |
---|
AuditServiceAdapter(com.atlassian.audit.api.AuditService service,
com.atlassian.audit.api.AuditSearchService searchService,
AuditFormatConverter formatConverter,
PaginationService paginationService,
AuditRecordValidator validator,
com.atlassian.audit.api.AuditRetentionConfigService configService,
com.atlassian.sal.api.timezone.TimeZoneManager timeZoneManager,
SettingsManager settingsManager,
I18NBeanFactory i18NBeanFactory)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
deleteRecords(Instant before)
Deprecated.
This method has empty body, because it is considered dangerous.
|
AuditService.AuditCSVWriter |
exportCSV()
Deprecated.
|
AuditService.AuditRecordFinder |
getRecords(@Nullable Instant startDate,
@Nullable Instant endDate)
Deprecated.
Retrieve audit records from the system via an
AuditService.AuditRecordFinder instance. |
RetentionPeriod |
getRetentionPeriod()
Deprecated.
Auditing plugin allows for more granular periods, e.g.
|
RetentionPeriod |
setRetentionPeriod(RetentionPeriod retentionPeriod)
Deprecated.
Set the configured retention period for audit records.
|
AuditRecord |
storeRecord(AuditRecord record)
Deprecated.
Persist the given
AuditRecord . |
AuditService.Validator |
validator()
Deprecated.
|
public AuditServiceAdapter(com.atlassian.audit.api.AuditService service, com.atlassian.audit.api.AuditSearchService searchService, AuditFormatConverter formatConverter, PaginationService paginationService, AuditRecordValidator validator, com.atlassian.audit.api.AuditRetentionConfigService configService, com.atlassian.sal.api.timezone.TimeZoneManager timeZoneManager, SettingsManager settingsManager, I18NBeanFactory i18NBeanFactory)
public AuditRecord storeRecord(AuditRecord record)
AuditService
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)
storeRecord
in interface AuditService
record
- The record to storepublic AuditService.AuditRecordFinder getRecords(@Nullable Instant startDate, @Nullable Instant endDate)
AuditService
AuditService.AuditRecordFinder
instance.getRecords
in interface AuditService
startDate
- The earliest date to fetch records from. Null indicates no limit.endDate
- The latest date to fetch records from. Null indicates no limit.public RetentionPeriod getRetentionPeriod()
AuditService
signature doesn't support it, hence approximate result might be returned.getRetentionPeriod
in interface AuditService
public RetentionPeriod setRetentionPeriod(RetentionPeriod retentionPeriod)
AuditService
A hard system limit is imposed by the sysprop: confluence.audit.retention.limit.months
setRetentionPeriod
in interface AuditService
retentionPeriod
- the period to setpublic void deleteRecords(Instant before)
Removal of audit entries should be performed by scheduled retention job, which lives inside atlassian-audit-plugin.
deleteRecords
in interface AuditService
public AuditService.Validator validator()
validator
in interface AuditService
public AuditService.AuditCSVWriter exportCSV()
exportCSV
in interface AuditService
Copyright © 2003–2020 Atlassian. All rights reserved.