public class

DefaultAuditingService

extends Object
implements AuditingService
java.lang.Object
   ↳ com.atlassian.jira.auditing.DefaultAuditingService

Class Overview

Default implementation of service for managing auditing records

Summary

Fields
public static final Integer MAX_LEN
Public Constructors
DefaultAuditingService(PermissionManager permissionManager, I18nHelper.BeanFactory i18nFactory, AuditingManager auditingManager, FeatureManager featureManager, JiraAuthenticationContext jiraAuthenticationContext, PluginAccessor pluginAccessor)
Public Methods
@Nonnull ServiceOutcome<Records> getRecords(Integer offset, Integer maxResults, AuditingFilter filter)
@Nonnull Long getTotalNumberOfRecords()
Returns total number of audit records
@Nonnull ErrorCollection storeRecord(String category, String summary, AssociatedItem objectItem, Iterable<ChangedValue> changedValues, Iterable<AssociatedItem> associatedItems, String description)
Store record in Auditing Log
@Nonnull ErrorCollection storeRecord(String category, String summary, String eventSourceKey, AssociatedItem objectItem, Iterable<ChangedValue> changedValues, Iterable<AssociatedItem> associatedItems)
Store record in Auditing Log along with plugin name created the event
@Nonnull ErrorCollection storeRecord(String category, String summary, AssociatedItem objectItem, Iterable<ChangedValue> changedValues, Iterable<AssociatedItem> associatedItems)
Store record in Auditing Log
@Nonnull ErrorCollection storeRecord(String category, String summary, String eventSourceKey, AssociatedItem objectItem, Iterable<ChangedValue> changedValues, Iterable<AssociatedItem> associatedItems, String description)
Store record in Auditing Log along with plugin name created the event
Protected Methods
void validateAssociatedItem(String fieldId, AssociatedItem objectItem, ErrorCollection errorCollection, I18nHelper i18nBean)
void validateAssociatedItems(String fieldId, Iterable<AssociatedItem> associatedItems, ErrorCollection errorCollection, I18nHelper i18nBean)
void validateCategoryAndSummary(String category, String summary, ErrorCollection errorCollection, I18nHelper i18nBean)
void validateChangedValue(String fieldId, ChangedValue value, ErrorCollection errorCollection, I18nHelper i18nBean)
void validateChangedValues(String fieldId, Iterable<ChangedValue> values, ErrorCollection errorCollection, I18nHelper i18nBean)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.auditing.AuditingService

Fields

public static final Integer MAX_LEN

Public Constructors

public DefaultAuditingService (PermissionManager permissionManager, I18nHelper.BeanFactory i18nFactory, AuditingManager auditingManager, FeatureManager featureManager, JiraAuthenticationContext jiraAuthenticationContext, PluginAccessor pluginAccessor)

Public Methods

@Nonnull public ServiceOutcome<Records> getRecords (Integer offset, Integer maxResults, AuditingFilter filter)

@Nonnull public Long getTotalNumberOfRecords ()

Returns total number of audit records

Returns
  • total number of records

@Nonnull public ErrorCollection storeRecord (String category, String summary, AssociatedItem objectItem, Iterable<ChangedValue> changedValues, Iterable<AssociatedItem> associatedItems, String description)

Store record in Auditing Log

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

@Nonnull public ErrorCollection storeRecord (String category, String summary, String eventSourceKey, AssociatedItem objectItem, Iterable<ChangedValue> changedValues, Iterable<AssociatedItem> associatedItems)

Store record in Auditing Log along with plugin name created the event

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 @return

@Nonnull public ErrorCollection storeRecord (String category, String summary, AssociatedItem objectItem, Iterable<ChangedValue> changedValues, Iterable<AssociatedItem> associatedItems)

Store record in Auditing Log

Parameters
category - category of the log record
summary - description of the change
objectItem - changed object
changedValues - changed values of the object item
associatedItems @return

@Nonnull public ErrorCollection storeRecord (String category, String summary, String eventSourceKey, AssociatedItem objectItem, Iterable<ChangedValue> changedValues, Iterable<AssociatedItem> associatedItems, String description)

Store record in Auditing Log along with plugin name created the event

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

Protected Methods

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

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

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

protected void validateChangedValue (String fieldId, ChangedValue value, ErrorCollection errorCollection, I18nHelper i18nBean)

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