Interface AuditService
-
- All Known Implementing Classes:
AuditServiceAdapter
@Deprecated @ExperimentalApi public interface AuditService
Deprecated.since 7.5.0. Use corresponding services from atlassian-audit-apiProvides methods for creating and retrieving audit records, as well as configuring the audit record retention period- Since:
- 5.10
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceAuditService.AuditCSVWriterDeprecated.since 7.5.0.static interfaceAuditService.AuditRecordFinderDeprecated.since 7.5.0.static interfaceAuditService.ValidatorDeprecated.since 7.5.0.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voiddeleteRecords(Instant before)Deprecated.since 7.5.0.AuditService.AuditCSVWriterexportCSV()Deprecated.AuditService.AuditRecordFindergetRecords(@Nullable Instant startDate, @Nullable Instant endDate)Deprecated.Retrieve audit records from the system via anAuditService.AuditRecordFinderinstance.RetentionPeriodgetRetentionPeriod()Deprecated.RetentionPeriodsetRetentionPeriod(RetentionPeriod retentionPeriod)Deprecated.Set the configured retention period for audit records.AuditRecordstoreRecord(AuditRecord record)Deprecated.Persist the givenAuditRecord.AuditService.Validatorvalidator()Deprecated.
-
-
-
Method Detail
-
storeRecord
AuditRecord storeRecord(AuditRecord record) throws ServiceException
Deprecated.Persist the givenAuditRecord. The sysadmin field will be set based on the current user's privileges before storing the record. Records will be validated usingAuditService.Validator.validateCreate(AuditRecord)- Parameters:
record- The record to store- Returns:
- The final record that was stored.
- Throws:
ServiceException- if the record is invalid
-
getRecords
AuditService.AuditRecordFinder getRecords(@Nullable Instant startDate, @Nullable Instant endDate)
Deprecated.Retrieve audit records from the system via anAuditService.AuditRecordFinderinstance.- Parameters:
startDate- The earliest date to fetch records from. Null indicates no limit.endDate- The latest date to fetch records from. Null indicates no limit.- Returns:
- An AuditRecordFinder instance that will search between the specified dates, if supplied.
-
getRetentionPeriod
RetentionPeriod getRetentionPeriod()
Deprecated.- Returns:
- the configured retention period for audit records.
-
setRetentionPeriod
RetentionPeriod setRetentionPeriod(RetentionPeriod retentionPeriod) throws ServiceException
Deprecated.Set the configured retention period for audit records.A hard system limit is imposed by the sysprop: confluence.audit.retention.limit.months
- Parameters:
retentionPeriod- the period to set- Returns:
- The final retention period if successful.
- Throws:
ServiceException- if the retention period is longer than the system limit.
-
deleteRecords
@Deprecated void deleteRecords(Instant before)
Deprecated.since 7.5.0. Cleanup of audit logs should be performed only by retention scheduled job, which lives insideatlassian-audit-plugin.Clean up all old audit records from before a certain time. Warning: this method does nothing and shouldn't be used.- Parameters:
before-- Since:
- 6.13.0
-
validator
AuditService.Validator validator()
Deprecated.
-
exportCSV
AuditService.AuditCSVWriter exportCSV()
Deprecated.
-
-