com.atlassian.jira.auditing
Class AuditingManagerImpl

java.lang.Object
  extended by com.atlassian.jira.auditing.AuditingManagerImpl
All Implemented Interfaces:
AuditingManager, Startable

public class AuditingManagerImpl
extends Object
implements AuditingManager, Startable

Since:
v6.2

Constructor Summary
AuditingManagerImpl(AuditingStore auditingStore, ApplicationProperties applicationProperties, com.atlassian.event.api.EventPublisher eventPublisher, FeatureManager featureManager, JiraAuthenticationContext authenticationContext, PermissionManager permissionManager, PermissionChangeHandler permissionChangeHandler, GroupEventHandler groupEventHandler, SchemeEventHandler schemeEventHandler, UserEventHandler userEventHandler, WorkflowEventHandler workflowEventHandler, NotificationChangeHandler notificationChangeHandler, FieldLayoutSchemeChangeHandler fieldLayoutSchemeChangeHandler, ProjectEventHandler projectEventHandler, BarrierFactory barrierFactory, ProjectComponentEventHandler projectComponentEventHandler, VersionEventHandler versionEventHandler, SystemAuditEventHandler systemAuditEventHandler)
           
 
Method Summary
 long countRecords(Long maxId, Long sinceId)
           
protected  long countRecords(Long maxId, Long sinceId, boolean includeSysAdminActions)
           
 long countRecordsWithoutSysAdmin(Long maxId, Long sinceId)
           
protected static I18nHelper getI18n()
           
protected  ApplicationUser getLoggedInUser()
           
 Records getRecords(Long maxId, Long sinceId, Integer maxResults, Integer offset, AuditingFilter filter)
          Get records from the database.
protected  Records getRecords(Long maxId, Long sinceId, Integer maxResults, Integer offset, AuditingFilter filter, boolean includeSysAdminActions)
           
 Records getRecordsWithoutSysAdmin(Long maxId, Long sinceId, Integer maxResults, Integer offset, AuditingFilter filter)
          Does the same as #getRecords(Long, Long, Long) but filters out all records authored by sysadmins (users who were sysadmins at the time of performing the action)
protected  String getRemoteAddress()
           
 void start()
          This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework.
 void store(RecordRequest record)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuditingManagerImpl

public AuditingManagerImpl(AuditingStore auditingStore,
                           ApplicationProperties applicationProperties,
                           com.atlassian.event.api.EventPublisher eventPublisher,
                           FeatureManager featureManager,
                           JiraAuthenticationContext authenticationContext,
                           PermissionManager permissionManager,
                           PermissionChangeHandler permissionChangeHandler,
                           GroupEventHandler groupEventHandler,
                           SchemeEventHandler schemeEventHandler,
                           UserEventHandler userEventHandler,
                           WorkflowEventHandler workflowEventHandler,
                           NotificationChangeHandler notificationChangeHandler,
                           FieldLayoutSchemeChangeHandler fieldLayoutSchemeChangeHandler,
                           ProjectEventHandler projectEventHandler,
                           BarrierFactory barrierFactory,
                           ProjectComponentEventHandler projectComponentEventHandler,
                           VersionEventHandler versionEventHandler,
                           SystemAuditEventHandler systemAuditEventHandler)
Method Detail

store

public void store(RecordRequest record)
Specified by:
store in interface AuditingManager

getRecords

@Nonnull
public Records getRecords(@Nullable
                                  Long maxId,
                                  @Nullable
                                  Long sinceId,
                                  @Nullable
                                  Integer maxResults,
                                  @Nullable
                                  Integer offset,
                                  @Nullable
                                  AuditingFilter filter)
Description copied from interface: AuditingManager
Get records from the database.

Specified by:
getRecords in interface AuditingManager
Parameters:
maxId - max record id to return (including), doesn't have to represent a real record in the database
sinceId - smallest record id to return (including), doesn't have to represent a real record in the database
maxResults - number of records to get, you cannot get more than 10000 records at once (if you provide larger number it will be automatically capped)
offset - offset from which records are being counted
filter - defines how records should be filtered out before being returned, if null records will not be filtered

getRecordsWithoutSysAdmin

@Nonnull
public Records getRecordsWithoutSysAdmin(@Nullable
                                                 Long maxId,
                                                 @Nullable
                                                 Long sinceId,
                                                 @Nullable
                                                 Integer maxResults,
                                                 @Nullable
                                                 Integer offset,
                                                 @Nullable
                                                 AuditingFilter filter)
Description copied from interface: AuditingManager
Does the same as #getRecords(Long, Long, Long) but filters out all records authored by sysadmins (users who were sysadmins at the time of performing the action)

Specified by:
getRecordsWithoutSysAdmin in interface AuditingManager

countRecords

public long countRecords(@Nullable
                         Long maxId,
                         @Nullable
                         Long sinceId)
Specified by:
countRecords in interface AuditingManager

countRecordsWithoutSysAdmin

public long countRecordsWithoutSysAdmin(@Nullable
                                        Long maxId,
                                        @Nullable
                                        Long sinceId)
Specified by:
countRecordsWithoutSysAdmin in interface AuditingManager

getRecords

protected Records getRecords(@Nullable
                             Long maxId,
                             @Nullable
                             Long sinceId,
                             @Nullable
                             Integer maxResults,
                             Integer offset,
                             @Nullable
                             AuditingFilter filter,
                             boolean includeSysAdminActions)

countRecords

protected long countRecords(@Nullable
                            Long maxId,
                            @Nullable
                            Long sinceId,
                            boolean includeSysAdminActions)

getRemoteAddress

@Nullable
protected String getRemoteAddress()

getLoggedInUser

protected ApplicationUser getLoggedInUser()

getI18n

protected static I18nHelper getI18n()

start

public void start()
           throws Exception
Description copied from interface: Startable
This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework.

Specified by:
start in interface Startable
Throws:
Exception - Allows implementations to throw an Exception.


Copyright © 2002-2014 Atlassian. All Rights Reserved.