java.lang.Object | |
↳ | com.atlassian.jira.util.EmailFormatterImpl |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Emails are visible by user if email visibility is set to
show (public) or mask (masked) or user (show to logged in users only)
| |||||||||||
Formats
user 's email address for the purpose of displaying it to currentUser ,
as determined by the
JIRA_OPTION_EMAIL_VISIBLE setting. | |||||||||||
Formats an email address for the purpose of displaying it to a user
as determined by the
JIRA_OPTION_EMAIL_VISIBLE setting. | |||||||||||
Formats an email address for the purpose of displaying it to a user
as determined by the
JIRA_OPTION_EMAIL_VISIBLE setting. | |||||||||||
Returns a HTML link for the e-mail if appropriate.
|
[Expand]
Inherited Methods | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object | |||||||||||||||||||||
From interface
com.atlassian.jira.util.EmailFormatter
|
Emails are visible by user if email visibility is set to show (public) or mask (masked) or user (show to logged in users only)
user | the user to which email addresses will be shown, or null if
no user is logged in (browsing anonymously) |
---|
true
if email addresses should be visible (even if they will be masked);
false
otherwiseFormats user
's email address for the purpose of displaying it to currentUser
,
as determined by the
JIRA_OPTION_EMAIL_VISIBLE
setting.
formatEmail(user.getEmailAddress(), currentUser != null)
,
except that it is null
-safe.user | owner of the email address to format and display (null is permitted) |
---|---|
currentUser | the user to which email addresses will be shown, or null if
no user is logged in (browsing anonymously) |
null
if either user
is null
or currentUser
is not permitted to see email addressesFormats an email address for the purpose of displaying it to a user
as determined by the
JIRA_OPTION_EMAIL_VISIBLE
setting.
formatEmail(email, currentUser != null)
.The email address to show/mask/hide. | |
currentUser | The user viewing the email address. |
null
if either email
is null
or the user is not permitted to see email addressesFormats an email address for the purpose of displaying it to a user
as determined by the
JIRA_OPTION_EMAIL_VISIBLE
setting.
Setting | Behaviour |
---|---|
"show" | The email is shown as-is to everyone. |
"user" | The email is shown as-is to users that are logged in, but not shown to anonymous users. |
"mask" | The email is shown to all users with the
e-mail address slightly obscured, such that "user@example.com" appears
as "user at example dot com" , instead |
The email address to show/mask/hide. | |
isCurrentUserLoggedIn | true if a user is currently logged in; false
if the user is browsing anonymously |
null
if either email
is null
or the user is not permitted to see email addresses
Returns a HTML link for the e-mail if appropriate. REMEMBER not to escape the string returned by this method as this method does this already!
<a href="foo@bar.com">foo@bar.com</a>
(public),
foo at bar.com
(masked), or
an empty string (""
) if either email
is null
or the user is not permitted to see email addresses