Class AuditServiceAdapter
- java.lang.Object
-
- com.atlassian.confluence.api.impl.service.audit.adapter.AuditServiceAdapter
-
- All Implemented Interfaces:
AuditService
@Deprecated @Transactional public class AuditServiceAdapter extends Object implements AuditService
Deprecated.since 7.5.0. Use corresponding services from atlassian-audit-apiThis implementation of legacy auditing interface exists for compatibility reasons. All calls will be delegated to corresponding services from atlassian-audit-plugin.Please note:
deleteRecords
method has been deprecated and replaced with empty body.- granularity of new retention is more flexible than old retention. The method
getRetentionPeriod
might provide an approximation of real retention.
- Since:
- 7.5.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.atlassian.confluence.api.service.audit.AuditService
AuditService.AuditCSVWriter, AuditService.AuditRecordFinder, AuditService.Validator
-
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method 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 anAuditService.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 givenAuditRecord
.AuditService.Validator
validator()
Deprecated.
-
-
-
Constructor Detail
-
AuditServiceAdapter
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)
Deprecated.
-
-
Method Detail
-
storeRecord
public AuditRecord storeRecord(AuditRecord record)
Deprecated.Description copied from interface:AuditService
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)
- Specified by:
storeRecord
in interfaceAuditService
- Parameters:
record
- The record to store- Returns:
- The final record that was stored.
-
getRecords
@Transactional(readOnly=true) public AuditService.AuditRecordFinder getRecords(@Nullable Instant startDate, @Nullable Instant endDate)
Deprecated.Description copied from interface:AuditService
Retrieve audit records from the system via anAuditService.AuditRecordFinder
instance.- Specified by:
getRecords
in interfaceAuditService
- 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
@Transactional(readOnly=true) public RetentionPeriod getRetentionPeriod()
Deprecated.Auditing plugin allows for more granular periods, e.g. 2 years 14 days.AuditService
signature doesn't support it, hence approximate result might be returned.- Specified by:
getRetentionPeriod
in interfaceAuditService
- Returns:
- the configured retention period for audit records.
-
setRetentionPeriod
public RetentionPeriod setRetentionPeriod(RetentionPeriod retentionPeriod)
Deprecated.Description copied from interface:AuditService
Set the configured retention period for audit records.A hard system limit is imposed by the sysprop: confluence.audit.retention.limit.months
- Specified by:
setRetentionPeriod
in interfaceAuditService
- Parameters:
retentionPeriod
- the period to set- Returns:
- The final retention period if successful.
-
deleteRecords
public void deleteRecords(Instant before)
Deprecated.This method has empty body, because it is considered dangerous. It is deprecated and will be removed in the next major release.Removal of audit entries should be performed by scheduled retention job, which lives inside atlassian-audit-plugin.
- Specified by:
deleteRecords
in interfaceAuditService
-
validator
public AuditService.Validator validator()
Deprecated.- Specified by:
validator
in interfaceAuditService
-
exportCSV
public AuditService.AuditCSVWriter exportCSV()
Deprecated.- Specified by:
exportCSV
in interfaceAuditService
-
-