public class DefaultEventTypeManager extends Object implements EventTypeManager
Modifier and Type | Field and Description |
---|---|
static String |
EVENT_TYPE_ID |
Constructor and Description |
---|
DefaultEventTypeManager(OfBizDelegator delegator,
WorkflowManager workflowManager,
NotificationSchemeManager notificationSchemeManager,
com.atlassian.cache.CacheManager cacheManager) |
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, WorkflowManager workflowManager, NotificationSchemeManager notificationSchemeManager, com.atlassian.cache.CacheManager cacheManager)
@EventListener public void onClearCache(ClearCacheEvent event)
public Collection<EventType> getEventTypes()
EventTypeManager
This convenience method is exactly equivalent to
EventTypeManager.getEventTypesMap()
.values()
.
getEventTypes
in interface EventTypeManager
public Map<Long,EventType> getEventTypesMap()
EventTypeManager
getEventTypesMap
in interface EventTypeManager
public EventType getEventType(Long id)
EventTypeManager
id
getEventType
in interface EventTypeManager
id
- The ID of the desired event typeid
public boolean isActive(EventType eventType)
EventTypeManager
eventType
is associated with any workflow or notification scheme.isActive
in interface EventTypeManager
eventType
- 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)
EventTypeManager
The event type can be associated with a workflow through a post function on any of the workflow transitions.
getAssociatedWorkflows
in interface EventTypeManager
eventType
- event typestatusCheck
- option to break on first association discovered - used when checking if event type is activeWorkflowTransitionKey
s to transitionspublic Map<Long,String> getAssociatedNotificationSchemes(EventType eventType)
EventTypeManager
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.
getAssociatedNotificationSchemes
in interface EventTypeManager
eventType
- event typepublic void addEventType(EventType eventType)
addEventType
in interface EventTypeManager
public void editEventType(Long eventTypeId, String name, String description, Long templateId)
editEventType
in interface EventTypeManager
public void deleteEventType(Long eventTypeId)
deleteEventType
in interface EventTypeManager
public boolean isEventTypeExists(String issueEventTypeName)
isEventTypeExists
in interface EventTypeManager
public boolean isEventTypeExists(Long eventTypeId)
isEventTypeExists
in interface EventTypeManager
public void clearCache()
clearCache
in interface EventTypeManager
Copyright © 2002-2015 Atlassian. All Rights Reserved.