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(User user,
Long filterId,
String groupName,
Long period,
Boolean emailOnEmpty)
|
org.ofbiz.core.entity.GenericValue |
createSubscription(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 |
deleteSubscriptionsForUser(User user)
|
List |
getAllSubscriptions()
|
List |
getAllSubscriptions(Long filterId)
|
org.ofbiz.core.entity.GenericValue |
getSubscription(User user,
Long subId)
|
org.ofbiz.core.entity.GenericValue |
getSubscriptionFromTriggerName(String triggerName)
|
List |
getSubscriptions(User user,
Long filterId)
|
org.quartz.Trigger |
getTriggerFromSubscription(org.ofbiz.core.entity.GenericValue subscription)
|
boolean |
hasSubscription(User user,
Long filterId)
|
void |
runSubscription(org.ofbiz.core.entity.GenericValue sub)
|
void |
runSubscription(User u,
Long subId)
|
void |
updateSubscription(User u,
Long subId,
Map fields,
org.quartz.Trigger trigger)
This will update the subscription identified by the subscription id to
contain the details specifed in the fields map and it will update the
trigger with the provided the Trigger. |
void |
updateSubscription(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,
org.quartz.Scheduler scheduler,
com.atlassian.mail.queue.MailQueue mailQueue,
TemplateManager templateManager,
SubscriptionMailQueueItemFactory subscriptionMailQueueItemFactory,
ProjectRoleManager projectRoleManager)
hasSubscription
public boolean hasSubscription(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(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 getSubscriptions(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(User u,
Long subId,
Map fields,
org.quartz.Trigger trigger)
throws DataAccessException
- Description copied from interface:
SubscriptionManager
- This will update the subscription identified by the subscription id to
contain the details specifed in the fields map and it will update the
trigger with the provided the Trigger.
- Specified by:
updateSubscription
in interface SubscriptionManager
- Parameters:
u
- the current user performing this operationsubId
- identifies the subscription to updatefields
- the fields to update the subscription with.trigger
- The trigger to update the subscription with
- Throws:
DataAccessException
- if there is a problem persisting the data.
updateSubscription
public void updateSubscription(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 getAllSubscriptions(Long filterId)
- Specified by:
getAllSubscriptions
in interface SubscriptionManager
getAllSubscriptions
public List getAllSubscriptions()
- Specified by:
getAllSubscriptions
in interface SubscriptionManager
createSubscription
public org.ofbiz.core.entity.GenericValue createSubscription(User user,
Long filterId,
String groupName,
Long period,
Boolean emailOnEmpty)
- Specified by:
createSubscription
in interface SubscriptionManager
createSubscription
public org.ofbiz.core.entity.GenericValue createSubscription(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(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(User u,
Long subId)
throws Exception
- Specified by:
runSubscription
in interface SubscriptionManager
- Throws:
Exception
Copyright © 2002-2009 Atlassian. All Rights Reserved.