com.atlassian.jira.notification
Class NotificationRecipient

java.lang.Object
  extended by com.atlassian.jira.notification.NotificationRecipient

public class NotificationRecipient
extends java.lang.Object


Field Summary
static java.lang.String MIMETYPE_HTML
           
static java.lang.String MIMETYPE_HTML_DISPLAY
           
static java.lang.String MIMETYPE_TEXT
           
static java.lang.String MIMETYPE_TEXT_DISPLAY
           
 
Constructor Summary
NotificationRecipient(java.lang.String pEmail)
           
NotificationRecipient(com.opensymphony.user.User user)
          The format is set to html or text as specified in jira-application.properties file.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String getEmail()
           
 java.lang.String getFormat()
           
 com.opensymphony.user.User getUser()
          Returns a user if this NotificationRecipient was constructed with a user.
 int hashCode()
           
 boolean isHtml()
           
 boolean isInGroup(java.lang.String groupName)
          Checks if the recipient is in the specified group.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MIMETYPE_HTML

public static final java.lang.String MIMETYPE_HTML
See Also:
Constant Field Values

MIMETYPE_HTML_DISPLAY

public static final java.lang.String MIMETYPE_HTML_DISPLAY
See Also:
Constant Field Values

MIMETYPE_TEXT

public static final java.lang.String MIMETYPE_TEXT
See Also:
Constant Field Values

MIMETYPE_TEXT_DISPLAY

public static final java.lang.String MIMETYPE_TEXT_DISPLAY
See Also:
Constant Field Values
Constructor Detail

NotificationRecipient

public NotificationRecipient(com.opensymphony.user.User 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

NotificationRecipient

public NotificationRecipient(java.lang.String pEmail)
Method Detail

getEmail

public java.lang.String getEmail()

getUser

public com.opensymphony.user.User 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:
recipient user, can return null

isHtml

public boolean isHtml()

getFormat

public java.lang.String getFormat()

isInGroup

public boolean isInGroup(java.lang.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

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2002-2010 Atlassian. All Rights Reserved.