@PublicApi public class

NotificationRecipient

extends Object
java.lang.Object
   ↳ com.atlassian.jira.notification.NotificationRecipient

@PublicApi

This class 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).

Class Overview

A simple data holder class that represents a user and or email address who will be send a noitification from JIRA, usually via email.

Summary

Constants
String MIMETYPE_HTML
String MIMETYPE_HTML_DISPLAY
String MIMETYPE_TEXT
String MIMETYPE_TEXT_DISPLAY
Public Constructors
NotificationRecipient(ApplicationUser user)
The format is set to html or text as specified in jira-application.properties file.
NotificationRecipient(String pEmail)
Public Methods
boolean equals(Object o)
String getEmail()
String getFormat()
ApplicationUser getUser()
Returns a user if this NotificationRecipient was constructed with a user.
ApplicationUser getUserRecipient()
This method is deprecated. Use getUser() instead. Since v6.0.
int hashCode()
boolean isHtml()
boolean isInGroup(String groupName)
Checks if the recipient is in the specified group.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String MIMETYPE_HTML

Constant Value: "html"

public static final String MIMETYPE_HTML_DISPLAY

Constant Value: "HTML"

public static final String MIMETYPE_TEXT

Constant Value: "text"

public static final String MIMETYPE_TEXT_DISPLAY

Constant Value: "Text"

Public Constructors

public NotificationRecipient (ApplicationUser user)

The format is set to html or text as specified in jira-application.properties file. If this setting is not configured correctly, default to text format.

Parameters
user recipient user

public NotificationRecipient (String pEmail)

Public Methods

public boolean equals (Object o)

public String getEmail ()

public String getFormat ()

public ApplicationUser getUser ()

Returns a user if this NotificationRecipient was constructed with a user. Returns null if this NotificationRecipient was constructed with an e-mail address only

Returns
  • user recipient of this notification, or null, if recipient is an email address.

public ApplicationUser getUserRecipient ()

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

Returns a user if this NotificationRecipient was constructed with a user. Returns null if this NotificationRecipient was constructed with an e-mail address only

Returns
  • user recipient of this notification, or null, if recipient is an email address.

public int hashCode ()

public boolean isHtml ()

public boolean isInGroup (String groupName)

Checks if the recipient is in the specified group. If this is only an email address they are not in any group.

Parameters
groupName group name
Returns
  • true if the user is set and is in the group, false otherwise

public String toString ()