com.atlassian.jira.util
Interface EmailFormatter

All Known Implementing Classes:
EmailFormatterImpl

public interface EmailFormatter

Returned email address appropriately masked/hidden for the current user.


Method Summary
 boolean emailVisible(User user)
           
 String formatEmail(String email, User currentUser)
          Potentially hide/mask an email address.
 String formatEmail(User user, User currentUser)
          Formats how the user's Email address is to be displayed to the currentUser determined by the user email visibility value
 String formatEmailAsLink(String email, User currentUser)
          Returns email address as HTML.
 

Method Detail

emailVisible

boolean emailVisible(User user)

formatEmail

String formatEmail(User user,
                   User currentUser)
Formats how the user's Email address is to be displayed to the currentUser determined by the user email visibility value

Parameters:
user - owner of the email address to format and display
currentUser - the current logged in user viewing the email address of the above user
Returns:
String - formatted email address, or null if currentUser is not allowed to view it

formatEmail

String formatEmail(String email,
                   User currentUser)
Potentially hide/mask an email address.

Parameters:
email - The email address to show/mask/hide.
currentUser - The user viewing the email address.
Returns:
The email address, possibly masked, or null if the user is not allowed to view it.

formatEmailAsLink

String formatEmailAsLink(String email,
                         User currentUser)
Returns email address as HTML.

Returns:
<a href="foo@bar.com">foo@bar.com</a> (public), <a href="foo at bar.com">foo at bar.com</a> (masked), or "" (hidden).


Copyright © 2002-2009 Atlassian. All Rights Reserved.