public class

DefaultEventTypeManager

extends Object
implements EventTypeManager
java.lang.Object
   ↳ com.atlassian.jira.event.type.DefaultEventTypeManager

Summary

Constants
String EVENT_TYPE_ID
Public Constructors
DefaultEventTypeManager(OfBizDelegator delegator, WorkflowManager workflowManager, NotificationSchemeManager notificationSchemeManager, CacheManager cacheManager)
Public Methods
void addEventType(EventType eventType)
void clearCache()
void deleteEventType(Long eventTypeId)
void editEventType(Long eventTypeId, String name, String description, Long templateId)
Map<LongString> getAssociatedNotificationSchemes(EventType eventType)
Return a mapping of notification scheme ID to its name for each notification scheme that is associated with the specified eventType

The event type is associated with a notification scheme if the scheme has at least one notification type and template selected for that event type.

MultiMap getAssociatedWorkflows(EventType eventType, boolean statusCheck)
Determines which workflows and transitions are associated with the specified eventType.
EventType getEventType(Long id)
Returns the event type with the specified id
Collection<EventType> getEventTypes()
Returns an immutable collection of all known event types.
Map<LongEventType> getEventTypesMap()
Returns an immutable map of all known event type IDs to the corresponding event types.
boolean isActive(EventType eventType)
Determine if the specified eventType is associated with any workflow or notification scheme.
boolean isEventTypeExists(String issueEventTypeName)
boolean isEventTypeExists(Long eventTypeId)
@EventListener void onClearCache(ClearCacheEvent event)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.event.type.EventTypeManager

Constants

public static final String EVENT_TYPE_ID

Constant Value: "eventTypeId"

Public Constructors

public DefaultEventTypeManager (OfBizDelegator delegator, WorkflowManager workflowManager, NotificationSchemeManager notificationSchemeManager, CacheManager cacheManager)

Public Methods

public void addEventType (EventType eventType)

public void clearCache ()

public void deleteEventType (Long eventTypeId)

public void editEventType (Long eventTypeId, String name, String description, Long templateId)

public Map<LongString> getAssociatedNotificationSchemes (EventType eventType)

Return a mapping of notification scheme ID to its name for each notification scheme that is associated with the specified eventType

The event type is associated with a notification scheme if the scheme has at least one notification type and template selected for that event type.

Parameters
eventType event type
Returns
  • a mapping of notification scheme ID to its name

public MultiMap getAssociatedWorkflows (EventType eventType, boolean statusCheck)

Determines which workflows and transitions are associated with the specified eventType.

The event type can be associated with a workflow through a post function on any of the workflow transitions.

Parameters
eventType event type
statusCheck option to break on first association discovered - used when checking if event type is active
Returns

public EventType getEventType (Long id)

Returns the event type with the specified id

Parameters
id The ID of the desired event type
Returns
  • the event type with the specified id

public Collection<EventType> getEventTypes ()

Returns an immutable collection of all known event types.

This convenience method is exactly equivalent to getEventTypesMap().values().

Returns
  • an immutable collection of all known event types.

public Map<LongEventType> getEventTypesMap ()

Returns an immutable map of all known event type IDs to the corresponding event types.

Returns
  • an immutable map of all known event type IDs to the corresponding event types.

public boolean isActive (EventType eventType)

Determine if the specified eventType is associated with any workflow or notification scheme.

Parameters
eventType event type
Returns
  • true if eventType is associated with any workflow or notification scheme; false otherwise.

public boolean isEventTypeExists (String issueEventTypeName)

public boolean isEventTypeExists (Long eventTypeId)

@EventListener public void onClearCache (ClearCacheEvent event)