com.atlassian.jira.issue.subscription
Class DefaultSubscriptionManager
java.lang.Object
com.atlassian.jira.mail.MailingListCompiler
com.atlassian.jira.issue.subscription.DefaultSubscriptionManager
- All Implemented Interfaces:
- SubscriptionManager
public class DefaultSubscriptionManager
- extends MailingListCompiler
- implements SubscriptionManager
Method Summary |
org.ofbiz.core.entity.GenericValue |
createSubscription(com.atlassian.crowd.embedded.api.User user,
Long filterId,
String groupName,
Long period,
Boolean emailOnEmpty)
|
org.ofbiz.core.entity.GenericValue |
createSubscription(com.atlassian.crowd.embedded.api.User user,
Long filterId,
String groupName,
org.quartz.Trigger trigger,
Boolean emailOnEmpty)
Creates a new subscription based on the passed in filter id and fired
in accordance with the passed in trigger |
void |
deleteSubscription(Long subId)
|
void |
deleteSubscriptionsForGroup(com.atlassian.crowd.embedded.api.Group group)
|
void |
deleteSubscriptionsForUser(com.atlassian.crowd.embedded.api.User user)
|
List<org.ofbiz.core.entity.GenericValue> |
getAllSubscriptions()
|
List<org.ofbiz.core.entity.GenericValue> |
getAllSubscriptions(Long filterId)
|
org.ofbiz.core.entity.GenericValue |
getSubscription(com.atlassian.crowd.embedded.api.User user,
Long subId)
|
org.ofbiz.core.entity.GenericValue |
getSubscriptionFromTriggerName(String triggerName)
|
List<org.ofbiz.core.entity.GenericValue> |
getSubscriptions(com.atlassian.crowd.embedded.api.User user,
Long filterId)
|
org.quartz.Trigger |
getTriggerFromSubscription(org.ofbiz.core.entity.GenericValue subscription)
|
boolean |
hasSubscription(com.atlassian.crowd.embedded.api.User user,
Long filterId)
|
void |
runSubscription(org.ofbiz.core.entity.GenericValue sub)
|
void |
runSubscription(com.atlassian.crowd.embedded.api.User u,
Long subId)
|
void |
updateSubscription(com.atlassian.crowd.embedded.api.User user,
Long subId,
String groupName,
org.quartz.Trigger trigger,
Boolean emailOnEmpty)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SUBSCRIPTION_PREFIX
public static final String SUBSCRIPTION_PREFIX
- See Also:
- Constant Field Values
SUBSCRIPTION_IDENTIFIER
public static final String SUBSCRIPTION_IDENTIFIER
- See Also:
- Constant Field Values
DefaultSubscriptionManager
public DefaultSubscriptionManager(OfBizDelegator delegator,
com.atlassian.mail.queue.MailQueue mailQueue,
TemplateManager templateManager,
SubscriptionMailQueueItemFactory subscriptionMailQueueItemFactory,
ProjectRoleManager projectRoleManager,
GroupManager groupManager)
hasSubscription
public boolean hasSubscription(com.atlassian.crowd.embedded.api.User user,
Long filterId)
throws org.ofbiz.core.entity.GenericEntityException
- Specified by:
hasSubscription
in interface SubscriptionManager
- Throws:
org.ofbiz.core.entity.GenericEntityException
getSubscription
public org.ofbiz.core.entity.GenericValue getSubscription(com.atlassian.crowd.embedded.api.User user,
Long subId)
throws org.ofbiz.core.entity.GenericEntityException
- Specified by:
getSubscription
in interface SubscriptionManager
- Throws:
org.ofbiz.core.entity.GenericEntityException
getSubscriptionFromTriggerName
public org.ofbiz.core.entity.GenericValue getSubscriptionFromTriggerName(String triggerName)
throws org.ofbiz.core.entity.GenericEntityException
- Specified by:
getSubscriptionFromTriggerName
in interface SubscriptionManager
- Throws:
org.ofbiz.core.entity.GenericEntityException
getSubscriptions
public List<org.ofbiz.core.entity.GenericValue> getSubscriptions(com.atlassian.crowd.embedded.api.User user,
Long filterId)
throws org.ofbiz.core.entity.GenericEntityException
- Specified by:
getSubscriptions
in interface SubscriptionManager
- Throws:
org.ofbiz.core.entity.GenericEntityException
getTriggerFromSubscription
public org.quartz.Trigger getTriggerFromSubscription(org.ofbiz.core.entity.GenericValue subscription)
throws org.quartz.SchedulerException
- Specified by:
getTriggerFromSubscription
in interface SubscriptionManager
- Throws:
org.quartz.SchedulerException
updateSubscription
public void updateSubscription(com.atlassian.crowd.embedded.api.User user,
Long subId,
String groupName,
org.quartz.Trigger trigger,
Boolean emailOnEmpty)
throws DataAccessException
- Specified by:
updateSubscription
in interface SubscriptionManager
- Parameters:
user
- the current user performing this operationsubId
- identifies the subscription to updategroupName
- (optional) the name of the group to receive the emailtrigger
- The trigger to update the subscription with
- Throws:
DataAccessException
- if there is a problem persisting the data.
getAllSubscriptions
public List<org.ofbiz.core.entity.GenericValue> getAllSubscriptions(Long filterId)
- Specified by:
getAllSubscriptions
in interface SubscriptionManager
getAllSubscriptions
public List<org.ofbiz.core.entity.GenericValue> getAllSubscriptions()
- Specified by:
getAllSubscriptions
in interface SubscriptionManager
createSubscription
public org.ofbiz.core.entity.GenericValue createSubscription(com.atlassian.crowd.embedded.api.User user,
Long filterId,
String groupName,
Long period,
Boolean emailOnEmpty)
- Specified by:
createSubscription
in interface SubscriptionManager
createSubscription
public org.ofbiz.core.entity.GenericValue createSubscription(com.atlassian.crowd.embedded.api.User user,
Long filterId,
String groupName,
org.quartz.Trigger trigger,
Boolean emailOnEmpty)
- Description copied from interface:
SubscriptionManager
- Creates a new subscription based on the passed in filter id and fired
in accordance with the passed in trigger
- Specified by:
createSubscription
in interface SubscriptionManager
- Parameters:
user
- the current user performing this operationfilterId
- Id of the filter subscribing togroupName
- Sent ot grouptrigger
- The trigger to storeemailOnEmpty
- send email if filter returns no results
- Returns:
- GenericValue representing new subscription
deleteSubscription
public void deleteSubscription(Long subId)
throws Exception
- Specified by:
deleteSubscription
in interface SubscriptionManager
- Throws:
Exception
deleteSubscriptionsForUser
public void deleteSubscriptionsForUser(com.atlassian.crowd.embedded.api.User user)
throws Exception
- Specified by:
deleteSubscriptionsForUser
in interface SubscriptionManager
- Throws:
Exception
runSubscription
public void runSubscription(org.ofbiz.core.entity.GenericValue sub)
throws Exception
- Specified by:
runSubscription
in interface SubscriptionManager
- Throws:
Exception
runSubscription
public void runSubscription(com.atlassian.crowd.embedded.api.User u,
Long subId)
throws Exception
- Specified by:
runSubscription
in interface SubscriptionManager
- Throws:
Exception
deleteSubscriptionsForGroup
public void deleteSubscriptionsForGroup(com.atlassian.crowd.embedded.api.Group group)
throws Exception
- Specified by:
deleteSubscriptionsForGroup
in interface SubscriptionManager
- Throws:
Exception
Copyright © 2002-2013 Atlassian. All Rights Reserved.