Package com.atlassian.jira.auditing
Class DefaultAuditingService
java.lang.Object
com.atlassian.jira.auditing.DefaultAuditingService
- All Implemented Interfaces:
AuditingService
Default implementation of service for managing auditing records
- Since:
- v6.3
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultAuditingService
(PermissionManager permissionManager, I18nHelper.BeanFactory i18nFactory, AuditingManager auditingManager, JiraAuthenticationContext jiraAuthenticationContext, com.atlassian.plugin.PluginAccessor pluginAccessor) -
Method Summary
Modifier and TypeMethodDescriptiongetRecords
(Integer offset, Integer maxResults, AuditingFilter filter) Returns total number of audit recordsstoreRecord
(String category, String summary, AssociatedItem objectItem, Iterable<ChangedValue> changedValues, Iterable<AssociatedItem> associatedItems) Store record in Auditing LogstoreRecord
(String category, String summary, AssociatedItem objectItem, Iterable<ChangedValue> changedValues, Iterable<AssociatedItem> associatedItems, String description) Store record in Auditing LogstoreRecord
(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 eventstoreRecord
(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 eventprotected 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)
-
Field Details
-
MAX_LEN
-
-
Constructor Details
-
DefaultAuditingService
public DefaultAuditingService(PermissionManager permissionManager, I18nHelper.BeanFactory i18nFactory, AuditingManager auditingManager, JiraAuthenticationContext jiraAuthenticationContext, com.atlassian.plugin.PluginAccessor pluginAccessor)
-
-
Method Details
-
getRecords
@Nonnull public ServiceOutcome<Records> getRecords(@Nullable Integer offset, @Nullable Integer maxResults, @Nullable AuditingFilter filter) - Specified by:
getRecords
in interfaceAuditingService
- Parameters:
offset
- the offset from which search startsmaxResults
- maximum number of returned resultsfilter
- 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 interfaceAuditingService
- Parameters:
category
- - category of the log recordsummary
- - description of the changeeventSourceKey
- - key of plugin which creates the recordobjectItem
- - changed objectchangedValues
- - changed values of the object itemassociatedItems
- - other objects that were affected by this changedescription
- - 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 interfaceAuditingService
- Parameters:
category
- - category of the log recordsummary
- - description of the changeobjectItem
- - changed objectchangedValues
- - changed values of the object itemassociatedItems
- - other objects that were affected by this changedescription
- - 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 interfaceAuditingService
- Parameters:
category
- - category of the log recordsummary
- - description of the changeobjectItem
- - changed objectchangedValues
- - changed values of the object itemassociatedItems
- - 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 interfaceAuditingService
- Parameters:
category
- - category of the log recordsummary
- - description of the changeeventSourceKey
- - key of plugin which creates the recordobjectItem
- - changed objectchangedValues
- - changed values of the object itemassociatedItems
- - other objects that were affected by this change- Returns:
-
getTotalNumberOfRecords
Description copied from interface:AuditingService
Returns total number of audit records- Specified by:
getTotalNumberOfRecords
in interfaceAuditingService
- 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)
-