public class

MauEventServiceImpl

extends Object
implements MauEventService
java.lang.Object
   ↳ com.atlassian.jira.event.mau.MauEventServiceImpl

Summary

Public Constructors
MauEventServiceImpl(ProjectTypeManager projectTypeManager, JiraAuthenticationContext jiraAuthenticationContext, CacheManager cacheManager, EventPublisher eventPublisher, Clock clock, JiraProperties jiraProperties, PluginAccessor pluginAccessor)
Public Methods
@Nullable LastSentKey getKeyWithCurrentApplication()
Collects together and then returns the Application key, email address and userId for the current MAU request
void setApplicationForThread(MauApplicationKey applicationKey)
Stores the provided application key in a thread local store to be retrieved later in the same thread when calling triggerEvent()
void setApplicationForThreadBasedOnProject(Project project)
Convencience method that does the same as setApplicationForThread(MauApplicationKey) by looking up the appropriate com.atlassian.application.api.ApplicationKey based on the project type of the passed in project
void triggerEvent()
Triggers an com.atlassian.analytics.api.events.MauEvent using the application previously set for this request using setApplicationForThread(MauApplicationKey) or setApplicationForThreadBasedOnProject(Project).
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.event.mau.MauEventService

Public Constructors

public MauEventServiceImpl (ProjectTypeManager projectTypeManager, JiraAuthenticationContext jiraAuthenticationContext, CacheManager cacheManager, EventPublisher eventPublisher, Clock clock, JiraProperties jiraProperties, PluginAccessor pluginAccessor)

Public Methods

@Nullable public LastSentKey getKeyWithCurrentApplication ()

Collects together and then returns the Application key, email address and userId for the current MAU request

Returns
  • LastSentKey containing the key, email address and userID for the current mau requets

public void setApplicationForThread (MauApplicationKey applicationKey)

Stores the provided application key in a thread local store to be retrieved later in the same thread when calling triggerEvent()

Parameters
applicationKey the application servicing the current request

public void setApplicationForThreadBasedOnProject (Project project)

Convencience method that does the same as setApplicationForThread(MauApplicationKey) by looking up the appropriate com.atlassian.application.api.ApplicationKey based on the project type of the passed in project

Parameters
project the project to use to look up the application key

public void triggerEvent ()

Triggers an com.atlassian.analytics.api.events.MauEvent using the application previously set for this request using setApplicationForThread(MauApplicationKey) or setApplicationForThreadBasedOnProject(Project).