Package com.atlassian.jira.event.type
Interface EventTypeManager
- All Known Implementing Classes:
DefaultEventTypeManager
@PublicApi
public interface EventTypeManager
Manages event types within the system.
Used to add, edit, delete and retrieve event types.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddEventType(EventType eventType) voidvoiddeleteEventType(Long eventTypeId) voideditEventType(Long eventTypeId, String name, String description, Long templateId) getAssociatedNotificationSchemes(EventType eventType) Return a mapping of notification scheme ID to its name for each notification scheme that is associated with the specifiedeventTypeorg.apache.commons.collections.MultiMapgetAssociatedWorkflows(EventType eventType, boolean statusCheck) Determines which workflows and transitions are associated with the specified eventType.getEventType(Long id) Returns the event type with the specifiedidReturns an immutable collection of all known event types.Returns an immutable map of all known event type IDs to the corresponding event types.booleanDetermine if the specifiedeventTypeis associated with any workflow or notification scheme.booleanisEventTypeExists(Long eventTypeId) booleanisEventTypeExists(String eventTypeName)
-
Method Details
-
getEventTypes
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.
-
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.
-
getEventType
Returns the event type with the specifiedid- Parameters:
id- The ID of the desired event type- Returns:
- the event type with the specified
id - Throws:
IllegalArgumentException- if the specified event type does not exist
-
isActive
Determine if the specifiedeventTypeis associated with any workflow or notification scheme.- Parameters:
eventType- event type- Returns:
trueifeventTypeis associated with any workflow or notification scheme;falseotherwise.
-
getAssociatedWorkflows
org.apache.commons.collections.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 typestatusCheck- option to break on first association discovered - used when checking if event type is active- Returns:
- MultiMap of
WorkflowTransitionKeys to transitions
-
getAssociatedNotificationSchemes
Return a mapping of notification scheme ID to its name for each notification scheme that is associated with the specifiedeventTypeThe 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
-
addEventType
-
editEventType
-
deleteEventType
-
isEventTypeExists
-
isEventTypeExists
-
clearCache
void clearCache()
-