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) |
Modifier and Type | Method and Description |
---|---|
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)
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
Copyright © 2002-2015 Atlassian. All Rights Reserved.