Class DefaultAuditingService

java.lang.Object
com.atlassian.jira.auditing.DefaultAuditingService
All Implemented Interfaces:
AuditingService

public class DefaultAuditingService extends Object implements AuditingService
Default implementation of service for managing auditing records
Since:
v6.3
  • Field Details

    • MAX_LEN

      public static final Integer MAX_LEN
  • Constructor Details

  • Method Details

    • getRecords

      @Nonnull public ServiceOutcome<Records> getRecords(@Nullable Integer offset, @Nullable Integer maxResults, @Nullable AuditingFilter filter)
      Specified by:
      getRecords in interface AuditingService
      Parameters:
      offset - the offset from which search starts
      maxResults - maximum number of returned results
      filter - defines how records should be filtered out before being returned, if null records will not be filtered
      Returns:
      Records instance wrapped in ServiceOutcome
    • storeRecord

      @Nonnull public ErrorCollection storeRecord(@Nullable String category, @Nullable String summary, @Nonnull String eventSourceKey, @Nullable AssociatedItem objectItem, @Nullable Iterable<ChangedValue> changedValues, @Nullable Iterable<AssociatedItem> associatedItems, @Nullable String description)
      Description copied from interface: AuditingService
      Store record in Auditing Log along with plugin name created the event
      Specified by:
      storeRecord in interface AuditingService
      Parameters:
      category - - category of the log record
      summary - - description of the change
      eventSourceKey - - key of plugin which creates the record
      objectItem - - changed object
      changedValues - - changed values of the object item
      associatedItems - - other objects that were affected by this change
      description - - an optional description for this event
      Returns:
      a collection of any encountered errors
    • storeRecord

      @Nonnull public ErrorCollection storeRecord(@Nonnull String category, @Nonnull String summary, @Nullable AssociatedItem objectItem, @Nullable Iterable<ChangedValue> changedValues, @Nullable Iterable<AssociatedItem> associatedItems, String description)
      Description copied from interface: AuditingService
      Store record in Auditing Log
      Specified by:
      storeRecord in interface AuditingService
      Parameters:
      category - - category of the log record
      summary - - description of the change
      objectItem - - changed object
      changedValues - - changed values of the object item
      associatedItems - - other objects that were affected by this change
      description - - an optional description for this event
      Returns:
      a collection of any encountered errors
    • storeRecord

      @Nonnull public ErrorCollection storeRecord(@Nonnull String category, @Nonnull String summary, @Nullable AssociatedItem objectItem, @Nullable Iterable<ChangedValue> changedValues, @Nullable Iterable<AssociatedItem> associatedItems)
      Description copied from interface: AuditingService
      Store record in Auditing Log
      Specified by:
      storeRecord in interface AuditingService
      Parameters:
      category - - category of the log record
      summary - - description of the change
      objectItem - - changed object
      changedValues - - changed values of the object item
      associatedItems - - other objects that were affected by this change
      Returns:
    • storeRecord

      @Nonnull public ErrorCollection storeRecord(@Nullable String category, @Nullable String summary, @Nonnull String eventSourceKey, @Nullable AssociatedItem objectItem, @Nullable Iterable<ChangedValue> changedValues, @Nullable Iterable<AssociatedItem> associatedItems)
      Description copied from interface: AuditingService
      Store record in Auditing Log along with plugin name created the event
      Specified by:
      storeRecord in interface AuditingService
      Parameters:
      category - - category of the log record
      summary - - description of the change
      eventSourceKey - - key of plugin which creates the record
      objectItem - - changed object
      changedValues - - changed values of the object item
      associatedItems - - other objects that were affected by this change
      Returns:
    • getTotalNumberOfRecords

      @Nonnull public Long getTotalNumberOfRecords()
      Description copied from interface: AuditingService
      Returns total number of audit records
      Specified by:
      getTotalNumberOfRecords in interface AuditingService
      Returns:
      total number of records
    • validateCategoryAndSummary

      protected void validateCategoryAndSummary(String category, String summary, ErrorCollection errorCollection, I18nHelper i18nBean)
    • validateChangedValues

      protected void validateChangedValues(@Nonnull String fieldId, @Nonnull Iterable<ChangedValue> values, @Nonnull ErrorCollection errorCollection, @Nonnull I18nHelper i18nBean)
    • validateChangedValue

      protected void validateChangedValue(@Nonnull String fieldId, @Nonnull ChangedValue value, @Nonnull ErrorCollection errorCollection, @Nonnull I18nHelper i18nBean)
    • validateAssociatedItems

      protected void validateAssociatedItems(@Nonnull String fieldId, @Nonnull Iterable<AssociatedItem> associatedItems, @Nonnull ErrorCollection errorCollection, @Nonnull I18nHelper i18nBean)
    • validateAssociatedItem

      protected void validateAssociatedItem(@Nonnull String fieldId, @Nonnull AssociatedItem objectItem, @Nonnull ErrorCollection errorCollection, @Nonnull I18nHelper i18nBean)