public class MauEventServiceImpl extends Object implements MauEventService
Constructor and Description |
---|
MauEventServiceImpl(ProjectTypeManager projectTypeManager,
JiraAuthenticationContext jiraAuthenticationContext,
com.atlassian.cache.CacheManager cacheManager,
com.atlassian.event.api.EventPublisher eventPublisher,
com.atlassian.core.util.Clock clock,
JiraProperties jiraProperties,
com.atlassian.plugin.PluginAccessor pluginAccessor) |
Modifier and Type | Method and Description |
---|---|
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
MauEventService.triggerEvent() |
void |
setApplicationForThreadBasedOnProject(Project project)
Convencience method that does the same as
MauEventService.setApplicationForThread(MauApplicationKey) by looking up
the appropriate ApplicationKey based on the project type of the passed in
project |
void |
triggerEvent()
Triggers an
MauEvent using the application previously set for this
request using MauEventService.setApplicationForThread(MauApplicationKey) or MauEventService.setApplicationForThreadBasedOnProject(Project) . |
public MauEventServiceImpl(ProjectTypeManager projectTypeManager, JiraAuthenticationContext jiraAuthenticationContext, com.atlassian.cache.CacheManager cacheManager, com.atlassian.event.api.EventPublisher eventPublisher, com.atlassian.core.util.Clock clock, JiraProperties jiraProperties, com.atlassian.plugin.PluginAccessor pluginAccessor)
public void setApplicationForThread(@Nonnull MauApplicationKey applicationKey)
MauEventService
MauEventService.triggerEvent()
setApplicationForThread
in interface MauEventService
applicationKey
- the application servicing the current requestpublic void setApplicationForThreadBasedOnProject(@Nullable Project project)
MauEventService
MauEventService.setApplicationForThread(MauApplicationKey)
by looking up
the appropriate ApplicationKey
based on the project type of the passed in
projectsetApplicationForThreadBasedOnProject
in interface MauEventService
project
- the project to use to look up the application keypublic void triggerEvent()
MauEventService
MauEvent
using the application previously set for this
request using MauEventService.setApplicationForThread(MauApplicationKey)
or MauEventService.setApplicationForThreadBasedOnProject(Project)
.triggerEvent
in interface MauEventService
@Nullable public LastSentKey getKeyWithCurrentApplication()
MauEventService
getKeyWithCurrentApplication
in interface MauEventService
Copyright © 2002-2017 Atlassian. All Rights Reserved.
View cookie preferences