@PublicApi public interface

EventTypeManager

com.atlassian.jira.event.type.EventTypeManager
Known Indirect Subclasses

@PublicApi

This interface is designed for plugins to consume (call its methods).

Clients of @PublicApi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicApi as per each product's API policy as long as the client does not implement/extend @PublicApi interfaces or classes (refer to each product's API policy for the exact guarantee---usually binary compatibility is guaranteed at least across minor versions).

Note: since @PublicApi interfaces and classes are not designed to be implemented or extended by clients, we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces annotated with @PublicSpi are safe to extend/implement).

Class Overview

Manages event types within the system.

Used to add, edit, delete and retrieve event types.

Summary

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 eventTypeName)
boolean isEventTypeExists(Long eventTypeId)

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
Throws
IllegalArgumentException if the specified event type does not exist

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 eventTypeName)

public boolean isEventTypeExists (Long eventTypeId)