public class AuditServiceImpl extends Object implements InternalAuditService
| Modifier and Type | Field and Description |
|---|---|
protected AuditDao |
auditDao |
protected Clock |
clock |
protected boolean |
IS_ENABLED |
protected PropertyManager |
propertyManager |
| Constructor and Description |
|---|
AuditServiceImpl(AuditDao auditDao,
PropertyManager propertyManager,
Clock clock,
com.atlassian.event.api.EventPublisher eventPublisher) |
| Modifier and Type | Method and Description |
|---|---|
long |
getAuditLogSize() |
AuditLogConfiguration |
getConfiguration()
Returns current auditing configuration
|
boolean |
isEnabled() |
int |
removeStaleEntries()
Removes stale entries basing on current configuration
|
void |
saveAudit(AuditLogChangeset changeset)
Persists an audit log changeset and all of its entries.
|
void |
saveConfiguration(AuditLogConfiguration auditLogConfiguration)
Sets the new configuration for auditing
|
List<AuditLogChangeset> |
searchAuditLog(EntityQuery<AuditLogChangeset> query)
Queries the audit log.
|
protected final AuditDao auditDao
protected final PropertyManager propertyManager
protected final Clock clock
protected final boolean IS_ENABLED
public AuditServiceImpl(AuditDao auditDao, PropertyManager propertyManager, Clock clock, com.atlassian.event.api.EventPublisher eventPublisher)
@Transactional public void saveAudit(AuditLogChangeset changeset)
AuditServicesaveAudit in interface AuditServicechangeset - the changeset that will be persisted@Transactional public List<AuditLogChangeset> searchAuditLog(EntityQuery<AuditLogChangeset> query)
AuditServiceList of AuditLogChangesets, which match the criteria specified in
the query. The results will be sorted according to the column and order specified in the query.searchAuditLog in interface AuditServicequery - the search querypublic boolean isEnabled()
isEnabled in interface AuditService@Transactional public int removeStaleEntries()
InternalAuditServiceremoveStaleEntries in interface InternalAuditService@Transactional public long getAuditLogSize()
getAuditLogSize in interface InternalAuditServicepublic void saveConfiguration(AuditLogConfiguration auditLogConfiguration)
AuditServicesaveConfiguration in interface AuditServiceauditLogConfiguration - new configurationpublic AuditLogConfiguration getConfiguration()
AuditServicegetConfiguration in interface AuditServiceCopyright © 2018 Atlassian. All rights reserved.