@PublicApi public interface

SubscriptionManager

com.atlassian.jira.issue.subscription.SubscriptionManager
Known Indirect Subclasses

@PublicApi

This interface is designed for plugins to consume (call its methods).

Clients of @PublicApi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicApi as per each product's API policy as long as the client does not implement/extend @PublicApi interfaces or classes (refer to each product's API policy for the exact guarantee---usually binary compatibility is guaranteed at least across minor versions).

Note: since @PublicApi interfaces and classes are not designed to be implemented or extended by clients, we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces annotated with @PublicSpi are safe to extend/implement).

Summary

Constants
String SUBSCRIPTION_IDENTIFIER
Public Methods
FilterSubscription createSubscription(ApplicationUser user, Long filterId, String groupName, String cronExpression, Boolean emailOnEmpty)
Creates a new subscription based on the passed in filter id and fired in accordance with the passed in trigger
GenericValue createSubscription(ApplicationUser user, Long filterId, String groupName, Long period, Boolean emailOnEmpty)
GenericValue createSubscription(User user, Long filterId, String groupName, Trigger trigger, Boolean emailOnEmpty)
This method is deprecated. Use createSubscription(ApplicationUser, Long, String, String, Boolean) instead. Since v6.0. Creates a new subscription based on the passed in filter id and fired in accordance with the passed in trigger
GenericValue createSubscription(User user, Long filterId, String groupName, Long period, Boolean emailOnEmpty)
GenericValue createSubscription(ApplicationUser user, Long filterId, String groupName, Trigger trigger, Boolean emailOnEmpty)
This method is deprecated. Since v6.2. Quartz internals are no longer supported through the JIRA api use createSubscription(ApplicationUser, Long, String, String, Boolean)
void deleteSubscription(Long subId)
void deleteSubscriptionsForGroup(Group group)
void deleteSubscriptionsForUser(ApplicationUser user)
void deleteSubscriptionsForUser(User user)
This method is deprecated. Use deleteSubscriptionsForUser(ApplicationUser) instead. Since v6.0.
List<FilterSubscription> getAllFilterSubscriptions()
List<FilterSubscription> getAllFilterSubscriptions(Long filterId)
List<GenericValue> getAllSubscriptions(Long filterId)
This method is deprecated. Use use getAllFilterSubscriptions(Long) instead. Since v6.2.
List<GenericValue> getAllSubscriptions()
This method is deprecated. Use use getAllFilterSubscriptions() instead. Since v6.2.
String getCronExpressionForSubscription(FilterSubscription subscription)
Retrieve the cron expression associated with this subscription
FilterSubscription getFilterSubscription(Long subId)
Get a subscription by Id
FilterSubscription getFilterSubscription(ApplicationUser user, Long subId)
List<FilterSubscription> getFilterSubscriptions(ApplicationUser user, Long filterId)
@Nullable Date getNextSendTime(FilterSubscription sub)
Returns the next send time for this subscription.
GenericValue getSubscription(User user, Long subId)
This method is deprecated. Use getFilterSubscription(ApplicationUser, Long) instead. Since v6.0.
GenericValue getSubscription(ApplicationUser user, Long subId)
This method is deprecated. Use getFilterSubscription(ApplicationUser, Long) instead. Since v6.0.
GenericValue getSubscriptionFromTriggerName(String triggerName)
This method is deprecated. Since v6.2. Quartz internals are no longer supported through the JIRA api. Use getFilterSubscription(Long) instead
List<GenericValue> getSubscriptions(User user, Long filterId)
This method is deprecated. Use getFilterSubscriptions(ApplicationUser, Long) instead. Since v6.0.
List<GenericValue> getSubscriptions(ApplicationUser user, Long filterId)
This method is deprecated. Use getFilterSubscriptions(ApplicationUser, Long) instead. Since v6.0.
Trigger getTriggerFromSubscription(GenericValue subscription)
This method is deprecated. Since v6.2. Quartz internals are no longer supported through the JIRA api
boolean hasSubscription(User user, Long filterId)
This method is deprecated. Use hasSubscription(ApplicationUser, Long) instead. Since v6.0.
boolean hasSubscription(ApplicationUser user, Long filterId)
void runSubscription(ApplicationUser user, Long subId)
void runSubscription(Long subId)
void runSubscription(GenericValue subId)
This method is deprecated. Use runSubscription(Long). Since v6.2
void runSubscription(User user, Long subId)
This method is deprecated. Use runSubscription(com.atlassian.jira.user.ApplicationUser, Long) instead. Since v6.0.
void updateSubscription(User user, Long subscriptionId, String groupName, Trigger trigger, Boolean emailOnEmpty)
This method is deprecated. Use use updateSubscription(ApplicationUser, Long, String, String, Boolean) instead. Since v6.0.
void updateSubscription(ApplicationUser user, Long subscriptionId, String groupName, String cronExpression, Boolean emailOnEmpty)
void updateSubscription(ApplicationUser user, Long subscriptionId, String groupName, Trigger trigger, Boolean emailOnEmpty)
This method is deprecated. Since v6.2. Quartz internals are no longer supported through the JIRA api use updateSubscription(ApplicationUser, Long, String, String, Boolean)

Constants

public static final String SUBSCRIPTION_IDENTIFIER

Constant Value: "SUBSCRIPTION_ID"

Public Methods

public FilterSubscription createSubscription (ApplicationUser user, Long filterId, String groupName, String cronExpression, Boolean emailOnEmpty)

Creates a new subscription based on the passed in filter id and fired in accordance with the passed in trigger

Parameters
user the current user performing this operation
filterId Id of the filter subscribing to
groupName Sent ot group
cronExpression The Cron expression for the subscription
emailOnEmpty send email if filter returns no results
Returns
  • GenericValue representing new subscription

public GenericValue createSubscription (ApplicationUser user, Long filterId, String groupName, Long period, Boolean emailOnEmpty)

public GenericValue createSubscription (User user, Long filterId, String groupName, Trigger trigger, Boolean emailOnEmpty)

This method is deprecated.
Use createSubscription(ApplicationUser, Long, String, String, Boolean) instead. Since v6.0. Creates a new subscription based on the passed in filter id and fired in accordance with the passed in trigger

Parameters
user the current user performing this operation
filterId Id of the filter subscribing to
groupName Sent ot group
trigger The trigger to store
emailOnEmpty send email if filter returns no results
Returns
  • GenericValue representing new subscription

public GenericValue createSubscription (User user, Long filterId, String groupName, Long period, Boolean emailOnEmpty)

public GenericValue createSubscription (ApplicationUser user, Long filterId, String groupName, Trigger trigger, Boolean emailOnEmpty)

This method is deprecated.
Since v6.2. Quartz internals are no longer supported through the JIRA api use createSubscription(ApplicationUser, Long, String, String, Boolean)

Creates a new subscription based on the passed in filter id and fired in accordance with the passed in trigger

Parameters
user the current user performing this operation
filterId Id of the filter subscribing to
groupName Sent ot group
trigger The trigger to store
emailOnEmpty send email if filter returns no results
Returns
  • GenericValue representing new subscription

public void deleteSubscription (Long subId)

Throws
GenericEntityException

public void deleteSubscriptionsForGroup (Group group)

Throws
GenericEntityException

public void deleteSubscriptionsForUser (ApplicationUser user)

Throws
GenericEntityException

public void deleteSubscriptionsForUser (User user)

This method is deprecated.
Use deleteSubscriptionsForUser(ApplicationUser) instead. Since v6.0.

Throws
GenericEntityException

public List<FilterSubscription> getAllFilterSubscriptions ()

public List<FilterSubscription> getAllFilterSubscriptions (Long filterId)

public List<GenericValue> getAllSubscriptions (Long filterId)

This method is deprecated.
Use use getAllFilterSubscriptions(Long) instead. Since v6.2.

public List<GenericValue> getAllSubscriptions ()

This method is deprecated.
Use use getAllFilterSubscriptions() instead. Since v6.2.

public String getCronExpressionForSubscription (FilterSubscription subscription)

Retrieve the cron expression associated with this subscription

Returns
  • the cron expression associated with this subscription

public FilterSubscription getFilterSubscription (Long subId)

Get a subscription by Id

Parameters
subId Subscription Id
Returns
  • Subscription
Throws
GenericEntityException
GenericEntityException

public FilterSubscription getFilterSubscription (ApplicationUser user, Long subId)

Throws
GenericEntityException

public List<FilterSubscription> getFilterSubscriptions (ApplicationUser user, Long filterId)

Throws
GenericEntityException

@Nullable public Date getNextSendTime (FilterSubscription sub)

Returns the next send time for this subscription. This may return null if the scheduler does not support the reporting of next send times.

Parameters
sub The subscription
Returns
  • Next send time

public GenericValue getSubscription (User user, Long subId)

This method is deprecated.
Use getFilterSubscription(ApplicationUser, Long) instead. Since v6.0.

Throws
GenericEntityException

public GenericValue getSubscription (ApplicationUser user, Long subId)

This method is deprecated.
Use getFilterSubscription(ApplicationUser, Long) instead. Since v6.0.

Throws
GenericEntityException

public GenericValue getSubscriptionFromTriggerName (String triggerName)

This method is deprecated.
Since v6.2. Quartz internals are no longer supported through the JIRA api. Use getFilterSubscription(Long) instead

Throws
GenericEntityException

public List<GenericValue> getSubscriptions (User user, Long filterId)

This method is deprecated.
Use getFilterSubscriptions(ApplicationUser, Long) instead. Since v6.0.

Throws
GenericEntityException

public List<GenericValue> getSubscriptions (ApplicationUser user, Long filterId)

This method is deprecated.
Use getFilterSubscriptions(ApplicationUser, Long) instead. Since v6.0.

Throws
GenericEntityException

public Trigger getTriggerFromSubscription (GenericValue subscription)

This method is deprecated.
Since v6.2. Quartz internals are no longer supported through the JIRA api

public boolean hasSubscription (User user, Long filterId)

This method is deprecated.
Use hasSubscription(ApplicationUser, Long) instead. Since v6.0.

Throws
GenericEntityException

public boolean hasSubscription (ApplicationUser user, Long filterId)

Throws
GenericEntityException

public void runSubscription (ApplicationUser user, Long subId)

Throws
GenericEntityException

public void runSubscription (Long subId)

Throws
GenericEntityException

public void runSubscription (GenericValue subId)

This method is deprecated.
Use runSubscription(Long). Since v6.2

Throws
GenericEntityException

public void runSubscription (User user, Long subId)

This method is deprecated.
Use runSubscription(com.atlassian.jira.user.ApplicationUser, Long) instead. Since v6.0.

Throws
GenericEntityException

public void updateSubscription (User user, Long subscriptionId, String groupName, Trigger trigger, Boolean emailOnEmpty)

This method is deprecated.
Use use updateSubscription(ApplicationUser, Long, String, String, Boolean) instead. Since v6.0.

Parameters
user the current user performing this operation
subscriptionId identifies the subscription to update
groupName (optional) the name of the group to receive the email
trigger The trigger to update the subscription with
Throws
DataAccessException if there is a problem persisting the data.

public void updateSubscription (ApplicationUser user, Long subscriptionId, String groupName, String cronExpression, Boolean emailOnEmpty)

Parameters
user the current user performing this operation
subscriptionId identifies the subscription to update
groupName (optional) the name of the group to receive the email
cronExpression The Cron expression to update the subscription with
Throws
DataAccessException if there is a problem persisting the data.

public void updateSubscription (ApplicationUser user, Long subscriptionId, String groupName, Trigger trigger, Boolean emailOnEmpty)

This method is deprecated.
Since v6.2. Quartz internals are no longer supported through the JIRA api use updateSubscription(ApplicationUser, Long, String, String, Boolean)

Parameters
user the current user performing this operation
subscriptionId identifies the subscription to update
groupName (optional) the name of the group to receive the email
trigger The trigger to update the subscription with
Throws
DataAccessException if there is a problem persisting the data.