public class DefaultAuditingService extends Object implements AuditingService
Constructor and Description |
---|
DefaultAuditingService(PermissionManager permissionManager,
I18nHelper.BeanFactory i18nFactory,
AuditingManager auditingManager,
JiraAuthenticationContext jiraAuthenticationContext,
com.atlassian.plugin.PluginAccessor pluginAccessor) |
Modifier and Type | Method and Description |
---|---|
ServiceOutcome<Records> |
getRecords(Integer offset,
Integer maxResults,
AuditingFilter filter) |
Long |
getTotalNumberOfRecords()
Returns total number of audit records
|
ErrorCollection |
storeRecord(String category,
String summary,
AssociatedItem objectItem,
Iterable<ChangedValue> changedValues,
Iterable<AssociatedItem> associatedItems)
Store record in Auditing Log
|
ErrorCollection |
storeRecord(String category,
String summary,
AssociatedItem objectItem,
Iterable<ChangedValue> changedValues,
Iterable<AssociatedItem> associatedItems,
String description)
Store record in Auditing Log
|
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
|
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 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) |
public static final Integer MAX_LEN
public DefaultAuditingService(PermissionManager permissionManager, I18nHelper.BeanFactory i18nFactory, AuditingManager auditingManager, JiraAuthenticationContext jiraAuthenticationContext, com.atlassian.plugin.PluginAccessor pluginAccessor)
@Nonnull public ServiceOutcome<Records> getRecords(@Nullable Integer offset, @Nullable Integer maxResults, @Nullable AuditingFilter filter)
getRecords
in interface AuditingService
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@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)
AuditingService
storeRecord
in interface AuditingService
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@Nonnull public ErrorCollection storeRecord(@Nonnull String category, @Nonnull String summary, @Nullable AssociatedItem objectItem, @Nullable Iterable<ChangedValue> changedValues, @Nullable Iterable<AssociatedItem> associatedItems, String description)
AuditingService
storeRecord
in interface AuditingService
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@Nonnull public ErrorCollection storeRecord(@Nonnull String category, @Nonnull String summary, @Nullable AssociatedItem objectItem, @Nullable Iterable<ChangedValue> changedValues, @Nullable Iterable<AssociatedItem> associatedItems)
AuditingService
storeRecord
in interface AuditingService
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@Nonnull public ErrorCollection storeRecord(@Nullable String category, @Nullable String summary, @Nonnull String eventSourceKey, @Nullable AssociatedItem objectItem, @Nullable Iterable<ChangedValue> changedValues, @Nullable Iterable<AssociatedItem> associatedItems)
AuditingService
storeRecord
in interface AuditingService
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@Nonnull public Long getTotalNumberOfRecords()
AuditingService
getTotalNumberOfRecords
in interface AuditingService
protected void validateCategoryAndSummary(String category, String summary, ErrorCollection errorCollection, I18nHelper i18nBean)
protected void validateChangedValues(@Nonnull String fieldId, @Nonnull Iterable<ChangedValue> values, @Nonnull ErrorCollection errorCollection, @Nonnull I18nHelper i18nBean)
protected void validateChangedValue(@Nonnull String fieldId, @Nonnull ChangedValue value, @Nonnull ErrorCollection errorCollection, @Nonnull I18nHelper i18nBean)
protected void validateAssociatedItems(@Nonnull String fieldId, @Nonnull Iterable<AssociatedItem> associatedItems, @Nonnull ErrorCollection errorCollection, @Nonnull I18nHelper i18nBean)
protected void validateAssociatedItem(@Nonnull String fieldId, @Nonnull AssociatedItem objectItem, @Nonnull ErrorCollection errorCollection, @Nonnull I18nHelper i18nBean)
Copyright © 2002-2019 Atlassian. All Rights Reserved.