public class DefaultEventTypeManager extends Object implements EventTypeManager
| Modifier and Type | Field and Description |
|---|---|
static String |
EVENT_TYPE_ID |
| Constructor and Description |
|---|
DefaultEventTypeManager(OfBizDelegator delegator,
QueryDslAccessor accessor,
WorkflowManager workflowManager,
NotificationSchemeManager notificationSchemeManager,
com.atlassian.cache.CacheManager cacheFactory) |
| Modifier and Type | Method and Description |
|---|---|
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 |
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 issueEventTypeName) |
void |
onClearCache(ClearCacheEvent event) |
public static final String EVENT_TYPE_ID
public DefaultEventTypeManager(OfBizDelegator delegator, QueryDslAccessor accessor, WorkflowManager workflowManager, NotificationSchemeManager notificationSchemeManager, com.atlassian.cache.CacheManager cacheFactory)
@EventListener public void onClearCache(ClearCacheEvent event)
public Collection<EventType> getEventTypes()
EventTypeManager
This convenience method is exactly equivalent to
EventTypeManager.getEventTypesMap().values().
getEventTypes in interface EventTypeManagerpublic Map<Long,EventType> getEventTypesMap()
EventTypeManagergetEventTypesMap in interface EventTypeManagerpublic EventType getEventType(Long id)
EventTypeManageridgetEventType in interface EventTypeManagerid - The ID of the desired event typeidpublic boolean isActive(EventType eventType)
EventTypeManagereventType is associated with any workflow or notification scheme.isActive in interface EventTypeManagereventType - event typetrue if eventType is associated with any workflow or notification
scheme; false otherwise.public org.apache.commons.collections.MultiMap getAssociatedWorkflows(EventType eventType, boolean statusCheck)
EventTypeManagerThe event type can be associated with a workflow through a post function on any of the workflow transitions.
getAssociatedWorkflows in interface EventTypeManagereventType - event typestatusCheck - option to break on first association discovered - used when checking if event type is activeWorkflowTransitionKeys to transitionspublic Map<Long,String> getAssociatedNotificationSchemes(EventType eventType)
EventTypeManagereventType
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.
getAssociatedNotificationSchemes in interface EventTypeManagereventType - event typepublic void addEventType(EventType eventType)
addEventType in interface EventTypeManagerpublic void editEventType(Long eventTypeId, String name, String description, Long templateId)
editEventType in interface EventTypeManagerpublic void deleteEventType(Long eventTypeId)
deleteEventType in interface EventTypeManagerpublic boolean isEventTypeExists(String issueEventTypeName)
isEventTypeExists in interface EventTypeManagerpublic boolean isEventTypeExists(Long eventTypeId)
isEventTypeExists in interface EventTypeManagerpublic void clearCache()
clearCache in interface EventTypeManagerCopyright © 2002-2017 Atlassian. All Rights Reserved.