Class AbstractAuditListener
- java.lang.Object
-
- com.atlassian.confluence.impl.audit.listener.AbstractAuditListener
-
- Direct Known Subclasses:
AbstractContentAuditListener
,AdminAuditListener
,AuthAuditListener
,CommentAuditListener
,GlobalSettingsAuditListener
,ImportExportAuditListener
,LookAndFeelAuditListener
,PageTemplateAuditListener
,PermissionsAuditListener
,PluginAuditListener
,SendUserInviteAuditListener
,SpaceAuditListener
,UserManagementAuditListener
public abstract class AbstractAuditListener extends Object
Abstract superclass for all audit listeners that provides some useful common functionality like i18n string handling- Since:
- 5.10
-
-
Field Summary
Fields Modifier and Type Field Description protected AuditHelper
auditHelper
protected StandardAuditResourceTypes
resourceTypes
-
Constructor Summary
Constructors Constructor Description AbstractAuditListener(AuditHandlerService auditHandlerService, com.atlassian.audit.api.AuditService service, AuditHelper auditHelper, StandardAuditResourceTypes resourceTypes, AuditingContext auditingContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected com.atlassian.audit.entity.AuditEvent.Builder
auditEventBuilder(String actionKey, String categoryKey, com.atlassian.audit.entity.CoverageArea area, com.atlassian.audit.entity.CoverageLevel level)
Deprecated.since 7.5.0 useAuditEvent.fromI18nKeys(String, String, CoverageLevel, CoverageArea)
instead.protected com.atlassian.audit.entity.AuditResource
buildResource(String name, String type, long id)
protected com.atlassian.audit.entity.AuditResource
buildResource(String name, String type, @Nullable String id)
protected com.atlassian.audit.entity.AuditResource
buildResourceWithoutId(String name, String type)
protected <T> List<com.atlassian.audit.entity.ChangedValue>
calculateChangedValues(T oldEntity, T newEntity)
protected AuditHandlerService
getAuditHandlerService()
protected String
getOnOff(boolean isOn)
protected String
getTranslatedYesNoString(boolean isYes)
protected com.atlassian.audit.entity.ChangedValue
newChangedValue(String nameKey, Object oldValue, Object newValue)
protected void
save(Supplier<com.atlassian.audit.entity.AuditEvent> eventSupplier)
protected void
saveIfPresent(Supplier<Optional<com.atlassian.audit.entity.AuditEvent>> eventSupplier)
-
-
-
Field Detail
-
auditHelper
protected final AuditHelper auditHelper
-
resourceTypes
protected final StandardAuditResourceTypes resourceTypes
-
-
Constructor Detail
-
AbstractAuditListener
public AbstractAuditListener(AuditHandlerService auditHandlerService, com.atlassian.audit.api.AuditService service, AuditHelper auditHelper, StandardAuditResourceTypes resourceTypes, AuditingContext auditingContext)
-
-
Method Detail
-
newChangedValue
protected com.atlassian.audit.entity.ChangedValue newChangedValue(String nameKey, Object oldValue, Object newValue)
-
getAuditHandlerService
protected AuditHandlerService getAuditHandlerService()
-
save
protected void save(Supplier<com.atlassian.audit.entity.AuditEvent> eventSupplier)
-
saveIfPresent
protected void saveIfPresent(Supplier<Optional<com.atlassian.audit.entity.AuditEvent>> eventSupplier)
-
getOnOff
protected String getOnOff(boolean isOn)
-
getTranslatedYesNoString
protected String getTranslatedYesNoString(boolean isYes)
-
auditEventBuilder
@Deprecated protected com.atlassian.audit.entity.AuditEvent.Builder auditEventBuilder(String actionKey, String categoryKey, com.atlassian.audit.entity.CoverageArea area, com.atlassian.audit.entity.CoverageLevel level)
Deprecated.since 7.5.0 useAuditEvent.fromI18nKeys(String, String, CoverageLevel, CoverageArea)
instead.
-
calculateChangedValues
protected <T> List<com.atlassian.audit.entity.ChangedValue> calculateChangedValues(T oldEntity, T newEntity)
-
buildResourceWithoutId
protected com.atlassian.audit.entity.AuditResource buildResourceWithoutId(String name, String type)
-
buildResource
protected com.atlassian.audit.entity.AuditResource buildResource(String name, String type, long id)
-
-