Interface AuditService

  • All Known Implementing Classes:
    AuditServiceAdapter

    @Deprecated
    @ExperimentalApi
    public interface AuditService
    Deprecated.
    since 7.5.0. Use corresponding services from atlassian-audit-api
    Provides methods for creating and retrieving audit records, as well as configuring the audit record retention period
    Since:
    5.10
    • Method Detail

      • getRecords

        AuditService.AuditRecordFinder getRecords​(@Nullable Instant startDate,
                                                  @Nullable Instant endDate)
        Deprecated.
        Retrieve audit records from the system via an AuditService.AuditRecordFinder instance.
        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 inside atlassian-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