|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.scheme.AbstractSchemeManager com.atlassian.jira.notification.DefaultNotificationSchemeManager
public class DefaultNotificationSchemeManager
Field Summary |
---|
Fields inherited from class com.atlassian.jira.scheme.AbstractSchemeManager |
---|
eventPublisher, groupManager, projectManager, schemeFactory, securityTypeManager |
Fields inherited from interface com.atlassian.jira.scheme.SchemeManager |
---|
PROJECT_ASSOCIATION |
Constructor Summary | |
---|---|
DefaultNotificationSchemeManager(ProjectManager projectManager,
PermissionTypeManager permissionTypeManager,
PermissionContextFactory permissionContextFactory,
OfBizDelegator delegator,
SchemeFactory schemeFactory,
com.atlassian.event.api.EventPublisher eventPublisher,
NotificationTypeManager notificationTypeManager,
NodeAssociationStore nodeAssociationStore,
GroupManager groupManager,
UserPreferencesManager userPreferencesManager,
com.atlassian.cache.CacheManager cacheManager)
|
Method Summary | |
---|---|
org.ofbiz.core.entity.GenericValue |
createDefaultScheme()
Creates a default scheme, with an id of 0 |
protected AbstractSchemeAddedToProjectEvent |
createSchemeAddedToProjectEvent(Scheme scheme,
Project project)
|
protected AbstractSchemeCopiedEvent |
createSchemeCopiedEvent(Scheme oldScheme,
Scheme newScheme)
|
protected AbstractSchemeEvent |
createSchemeCreatedEvent(Scheme scheme)
|
org.ofbiz.core.entity.GenericValue |
createSchemeEntity(org.ofbiz.core.entity.GenericValue scheme,
SchemeEntity schemeEntity)
|
protected Object |
createSchemeEntityDeletedEvent(org.ofbiz.core.entity.GenericValue entity)
|
protected org.ofbiz.core.entity.GenericValue |
createSchemeEntityNoEvent(org.ofbiz.core.entity.GenericValue scheme,
SchemeEntity schemeEntity)
|
protected AbstractSchemeRemovedFromProjectEvent |
createSchemeRemovedFromProjectEvent(Scheme scheme,
Project project)
|
protected AbstractSchemeUpdatedEvent |
createSchemeUpdatedEvent(Scheme scheme,
Scheme originalScheme)
|
void |
deleteScheme(Long id)
Deletes a scheme from the database |
protected I18nHelper |
getApplicationI18n()
|
String |
getDefaultDescriptionKey()
|
String |
getDefaultNameKey()
|
org.ofbiz.core.entity.GenericValue |
getDefaultScheme()
Gets the default scheme. |
List<org.ofbiz.core.entity.GenericValue> |
getEntities(org.ofbiz.core.entity.GenericValue scheme,
Long eventTypeId)
|
List<org.ofbiz.core.entity.GenericValue> |
getEntities(org.ofbiz.core.entity.GenericValue scheme,
Long eventTypeId,
String parameter)
|
List<org.ofbiz.core.entity.GenericValue> |
getEntities(org.ofbiz.core.entity.GenericValue scheme,
String entityTypeId)
|
List<org.ofbiz.core.entity.GenericValue> |
getEntities(org.ofbiz.core.entity.GenericValue scheme,
String type,
Long entityTypeId)
|
String |
getEntityName()
|
List<SchemeEntity> |
getNotificationSchemeEntities(Project project,
long entityTypeId)
Get the notification scheme entities for this project and entity type. |
org.ofbiz.core.entity.GenericValue |
getNotificationSchemeForProject(org.ofbiz.core.entity.GenericValue projectGV)
Get the notification scheme for this project. |
Set<NotificationRecipient> |
getRecipients(IssueEvent event)
Given an issue event this method returns a set of NotificationRecipient s who will receive an e-mail
notification |
Set<NotificationRecipient> |
getRecipients(IssueEvent event,
SchemeEntity notification)
Retrieve the set of recipients for the event using the specified notification entity. |
String |
getSchemeDesc()
|
String |
getSchemeEntityName()
|
Collection<org.ofbiz.core.entity.GenericValue> |
getSchemesContainingEntity(String type,
String parameter)
This is a method that is meant to quickly get you all the schemes that contain an entity of the specified type and parameter. |
Map<Long,String> |
getSchemesMapByConditions(Map<String,?> conditions)
Retrieve a map of scheme ids to scheme names that match the specified conditions. |
boolean |
hasEntities(org.ofbiz.core.entity.GenericValue scheme,
Long eventTypeId,
String type,
String parameter,
Long templateId)
|
boolean |
hasSchemeAuthority(Long entityType,
org.ofbiz.core.entity.GenericValue entity)
Checks anonymous permission of the given permission type for the given entity. |
boolean |
hasSchemeAuthority(Long entityType,
org.ofbiz.core.entity.GenericValue entity,
com.atlassian.crowd.embedded.api.User user,
boolean issueCreation)
Checks the given user's permission of the given permission type for the given entity. |
boolean |
isHasMailServer()
|
protected SchemeEntity |
makeSchemeEntity(org.ofbiz.core.entity.GenericValue schemeEntityGV)
|
void |
onClearCache(ClearCacheEvent event)
|
void |
removeSchemeEntitiesForField(String customFieldId)
|
void |
start()
This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultNotificationSchemeManager(ProjectManager projectManager, PermissionTypeManager permissionTypeManager, PermissionContextFactory permissionContextFactory, OfBizDelegator delegator, SchemeFactory schemeFactory, com.atlassian.event.api.EventPublisher eventPublisher, NotificationTypeManager notificationTypeManager, NodeAssociationStore nodeAssociationStore, GroupManager groupManager, UserPreferencesManager userPreferencesManager, com.atlassian.cache.CacheManager cacheManager)
Method Detail |
---|
public void start() throws Exception
Startable
start
in interface Startable
Exception
- Allows implementations to throw an Exception.@EventListener public void onClearCache(ClearCacheEvent event)
onClearCache
in class AbstractSchemeManager
public String getSchemeEntityName()
getSchemeEntityName
in class AbstractSchemeManager
public String getEntityName()
getEntityName
in class AbstractSchemeManager
public String getSchemeDesc()
getSchemeDesc
in class AbstractSchemeManager
public String getDefaultNameKey()
getDefaultNameKey
in class AbstractSchemeManager
public String getDefaultDescriptionKey()
getDefaultDescriptionKey
in class AbstractSchemeManager
protected AbstractSchemeEvent createSchemeCreatedEvent(Scheme scheme)
createSchemeCreatedEvent
in class AbstractSchemeManager
@Nonnull protected AbstractSchemeCopiedEvent createSchemeCopiedEvent(@Nonnull Scheme oldScheme, @Nonnull Scheme newScheme)
createSchemeCopiedEvent
in class AbstractSchemeManager
protected AbstractSchemeUpdatedEvent createSchemeUpdatedEvent(Scheme scheme, Scheme originalScheme)
createSchemeUpdatedEvent
in class AbstractSchemeManager
public void deleteScheme(Long id) throws org.ofbiz.core.entity.GenericEntityException
SchemeManager
deleteScheme
in interface SchemeManager
deleteScheme
in class AbstractSchemeManager
id
- Id of the scheme to be deleted
org.ofbiz.core.entity.GenericEntityException
- If a DB error occurs@Nonnull protected AbstractSchemeAddedToProjectEvent createSchemeAddedToProjectEvent(Scheme scheme, Project project)
createSchemeAddedToProjectEvent
in class AbstractSchemeManager
public org.ofbiz.core.entity.GenericValue getDefaultScheme() throws org.ofbiz.core.entity.GenericEntityException
SchemeManager
getDefaultScheme
in interface SchemeManager
getDefaultScheme
in class AbstractSchemeManager
org.ofbiz.core.entity.GenericEntityException
- If a DB error occurspublic org.ofbiz.core.entity.GenericValue createDefaultScheme() throws org.ofbiz.core.entity.GenericEntityException
SchemeManager
createDefaultScheme
in interface SchemeManager
createDefaultScheme
in class AbstractSchemeManager
org.ofbiz.core.entity.GenericEntityException
- If a DB error occurspublic void removeSchemeEntitiesForField(String customFieldId) throws RemoveException
removeSchemeEntitiesForField
in interface NotificationSchemeManager
RemoveException
protected SchemeEntity makeSchemeEntity(org.ofbiz.core.entity.GenericValue schemeEntityGV)
makeSchemeEntity
in class AbstractSchemeManager
protected Object createSchemeEntityDeletedEvent(org.ofbiz.core.entity.GenericValue entity)
createSchemeEntityDeletedEvent
in class AbstractSchemeManager
public List<SchemeEntity> getNotificationSchemeEntities(Project project, long entityTypeId) throws org.ofbiz.core.entity.GenericEntityException
NotificationSchemeManager
getNotificationSchemeEntities
in interface NotificationSchemeManager
project
- the projectentityTypeId
- the type of entity
org.ofbiz.core.entity.GenericEntityException
public org.ofbiz.core.entity.GenericValue getNotificationSchemeForProject(org.ofbiz.core.entity.GenericValue projectGV)
NotificationSchemeManager
getNotificationSchemeForProject
in interface NotificationSchemeManager
projectGV
- the project
@Nonnull public Map<Long,String> getSchemesMapByConditions(Map<String,?> conditions)
NotificationSchemeManager
getSchemesMapByConditions
in interface NotificationSchemeManager
conditions
- Map of conditions on which to limit the search
@Nonnull public Collection<org.ofbiz.core.entity.GenericValue> getSchemesContainingEntity(String type, String parameter)
NotificationSchemeManager
getSchemesContainingEntity
in interface NotificationSchemeManager
type
- is the entity typeparameter
- is the scheme entries parameter value
public boolean isHasMailServer() throws com.atlassian.mail.MailException
isHasMailServer
in interface NotificationSchemeManager
com.atlassian.mail.MailException
public org.ofbiz.core.entity.GenericValue createSchemeEntity(org.ofbiz.core.entity.GenericValue scheme, SchemeEntity schemeEntity) throws org.ofbiz.core.entity.GenericEntityException
createSchemeEntity
in interface SchemeManager
org.ofbiz.core.entity.GenericEntityException
protected org.ofbiz.core.entity.GenericValue createSchemeEntityNoEvent(org.ofbiz.core.entity.GenericValue scheme, SchemeEntity schemeEntity) throws org.ofbiz.core.entity.GenericEntityException
createSchemeEntityNoEvent
in class AbstractSchemeManager
org.ofbiz.core.entity.GenericEntityException
public Set<NotificationRecipient> getRecipients(IssueEvent event, SchemeEntity notification) throws org.ofbiz.core.entity.GenericEntityException
NotificationSchemeManager
getRecipients
in interface NotificationSchemeManager
event
- issue eventnotification
- scheme entity
org.ofbiz.core.entity.GenericEntityException
public Set<NotificationRecipient> getRecipients(IssueEvent event)
NotificationSchemeManager
NotificationRecipient
s who will receive an e-mail
notification
getRecipients
in interface NotificationSchemeManager
event
- The issue event that triggered the notification
public boolean hasEntities(org.ofbiz.core.entity.GenericValue scheme, Long eventTypeId, String type, String parameter, Long templateId) throws org.ofbiz.core.entity.GenericEntityException
hasEntities
in interface NotificationSchemeManager
org.ofbiz.core.entity.GenericEntityException
public List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme, String entityTypeId) throws org.ofbiz.core.entity.GenericEntityException
getEntities
in interface SchemeManager
org.ofbiz.core.entity.GenericEntityException
public List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme, Long eventTypeId) throws org.ofbiz.core.entity.GenericEntityException
getEntities
in interface SchemeManager
org.ofbiz.core.entity.GenericEntityException
public List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme, Long eventTypeId, String parameter) throws org.ofbiz.core.entity.GenericEntityException
getEntities
in interface SchemeManager
org.ofbiz.core.entity.GenericEntityException
public List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme, String type, Long entityTypeId) throws org.ofbiz.core.entity.GenericEntityException
getEntities
in interface SchemeManager
org.ofbiz.core.entity.GenericEntityException
public boolean hasSchemeAuthority(Long entityType, org.ofbiz.core.entity.GenericValue entity)
SchemeManager
hasSchemeAuthority
in interface SchemeManager
entityType
- permission type.entity
- the entity to which permission is being checked.
public boolean hasSchemeAuthority(Long entityType, org.ofbiz.core.entity.GenericValue entity, com.atlassian.crowd.embedded.api.User user, boolean issueCreation)
SchemeManager
hasSchemeAuthority
in interface SchemeManager
entityType
- permission type.entity
- the entity to which permission is being checked.user
- the user.issueCreation
- whether the permission is for creating an issue.
protected AbstractSchemeRemovedFromProjectEvent createSchemeRemovedFromProjectEvent(Scheme scheme, Project project)
createSchemeRemovedFromProjectEvent
in class AbstractSchemeManager
protected I18nHelper getApplicationI18n()
getApplicationI18n
in class AbstractSchemeManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |