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)
           
 
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, String filter, Long count, Long page, Long fromTimestamp, Long toTimestamp)
          Get records from the database.
protected  Records getRecords(Long maxId, Long sinceId, String filter, Long maxResults, Long page, Long fromTimestamp, Long toTimestamp, boolean includeSysAdminActions)
           
 Records getRecordsWithoutSysAdmin(Long maxId, Long sinceId, String filter, Long count, Long page, Long fromTimestamp, Long toTimestamp)
          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()
           
 boolean isAuditingEnabled()
           
 void setAuditingEnabled(boolean enable)
          Set the state of Auditing (enabled/disabled).
protected  void setAuditingEnabledNoPermissionCheck(boolean enable)
           
 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)
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
                                  String filter,
                                  @Nullable
                                  Long count,
                                  @Nullable
                                  Long page,
                                  @Nullable
                                  Long fromTimestamp,
                                  @Nullable
                                  Long toTimestamp)
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
filter - free text search query
count - number of records to get, you cannot get more than 1000 records at once (if you provide larger number it will be automatically capped)
page - which page should be returned (if null first page will be returned; numeration of pages starts from 1)
Returns:

getRecordsWithoutSysAdmin

@Nonnull
public Records getRecordsWithoutSysAdmin(@Nullable
                                                 Long maxId,
                                                 @Nullable
                                                 Long sinceId,
                                                 @Nullable
                                                 String filter,
                                                 @Nullable
                                                 Long count,
                                                 @Nullable
                                                 Long page,
                                                 @Nullable
                                                 Long fromTimestamp,
                                                 @Nullable
                                                 Long toTimestamp)
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

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

countRecordsWithoutSysAdmin

@Nonnull
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
                             String filter,
                             @Nullable
                             Long maxResults,
                             Long page,
                             Long fromTimestamp,
                             Long toTimestamp,
                             boolean includeSysAdminActions)

countRecords

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

isAuditingEnabled

public boolean isAuditingEnabled()
Specified by:
isAuditingEnabled in interface AuditingManager

setAuditingEnabled

public void setAuditingEnabled(boolean enable)
                        throws PermissionException
Description copied from interface: AuditingManager
Set the state of Auditing (enabled/disabled).

Specified by:
setAuditingEnabled in interface AuditingManager
Parameters:
enable - if true then enable auditing
Throws:
PermissionException - If the currently logged in user is not a system administrator

setAuditingEnabledNoPermissionCheck

protected void setAuditingEnabledNoPermissionCheck(boolean enable)

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.