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
 void addEventType(EventType eventType)
           
 void clearCache()
           
 void deleteEventType(Long eventTypeId)
           
 void editEventType(Long eventTypeId, String name, String description, Long templateId)
           
 Map<Long,String> 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.

 org.apache.commons.collections.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<Long,EventType> 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(Long eventTypeId)
           
 boolean isEventTypeExists(String eventTypeName)
           
 

Method Detail

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

Map<Long,EventType> 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

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

isActive

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.

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 type
statusCheck - option to break on first association discovered - used when checking if event type is active
Returns:
MultiMap of WorkflowTransitionKeys to transitions

getAssociatedNotificationSchemes

Map<Long,String> 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

addEventType

void addEventType(EventType eventType)

editEventType

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

deleteEventType

void deleteEventType(Long eventTypeId)

isEventTypeExists

boolean isEventTypeExists(String eventTypeName)

isEventTypeExists

boolean isEventTypeExists(Long eventTypeId)

clearCache

void clearCache()


Copyright © 2002-2014 Atlassian. All Rights Reserved.