Tabnine Logo
EmailFormatter.formatEmail
Code IndexAdd Tabnine to your IDE (free)

How to use
formatEmail
method
in
com.atlassian.jira.util.EmailFormatter

Best Java code snippets using com.atlassian.jira.util.EmailFormatter.formatEmail (Showing top 7 results out of 315)

origin: com.atlassian.jira/jira-api

public void setEmailAddress(String emailAddress, ApplicationUser loggedInUser, EmailFormatter emailFormatter)
{
  this.emailAddress = emailFormatter.formatEmail(emailAddress, loggedInUser);
}
origin: com.atlassian.jira/jira-core

public String getDisplayEmail(String email)
{
  return emailFormatter.formatEmail(email, getLoggedInUser());
}
origin: com.atlassian.jira/jira-api

  private String[] assembleDisplayNameParts(final ApplicationUser user, final ApplicationUser searcher)
  {
    final String fullName = user.getDisplayName();
    final String name = user.getName();
    final String email = emailFormatter.formatEmail(user, searcher);

    if (email != null)
    {
      return new String [] {fullName, "- " + email,  " (" + name + ")"};
    }
    else
    {
      return new String [] {fullName, " (" + name + ")"};
    }
  }
}
origin: com.atlassian.jira.plugins/atlassian-jira-rpc-plugin

public RemoteUser createUser(final User user)
{
  Assertions.notNull("user", user);
  final RemoteUser remoteUser = new RemoteUser(user);
  // JRA-19498: set email according to visibility settings
  remoteUser.setEmail(emailFormatter.formatEmail(user.getEmailAddress(), true));
  return remoteUser;
}
origin: com.atlassian.jira/jira-rest-plugin

user.getDisplayName(),
user.isActive(),
emailFormatter.formatEmail(user.getEmailAddress(), loggedInUser),
copyOf(Iterables.transform(groups, new GroupNameToGroupJsonBean(jiraBaseUrls))),
getAvatarURLs(user, jiraAvatarSupport),
origin: com.atlassian.jira/jira-core

/**
 * Creates an AssigneeOption for the given user. This method uses {@code fullNames} as a basis for determining
 * whether a given user display name is unique in the system. If the display name is not unique then the username
 * is appended to the display name as a means to disambiguate users with the same display name.
 * <p/>
 * If {@code fullNames} is null, then the display name is returned as-is.
 * <p/>
 * See JRA-14128.
 */
private AssigneeOption createAssigneeOption(ApplicationUser user, final ApplicationUser loggedInUser, @Nullable Map<String, Boolean> fullNames)
{
  String displayName = user.getDisplayName();
  boolean isUnique = fullNames == null || fullNames.get(displayName);
  if (!isUnique)
  {
    displayName += " (" + user.getName() + ")";
  }
  URI avatarURL = avatarService.getAvatarURL(loggedInUser, user.getName(), Avatar.Size.SMALL);
  String email = emailFormatter.formatEmail(user.getEmailAddress(), loggedInUser);
  AssigneeOption option = new AssigneeOption(user.getName(), displayName, email, avatarURL.toString());
  option.setLoggedInUser(user.equals(loggedInUser));
  return option;
}
origin: com.atlassian.jira/jira-rest-plugin

/**
 * Returns a new UserBean with all properties set.
 *
 * @return a new UserBean
 */
public UserBean buildMid()
{
  if (user == null)
  {
    return buildSimple();
  }
  if (!loggedInUserIsSet) { throw new IllegalStateException("loggedInUser not set"); }
  if (emailFormatter == null) { throw new IllegalStateException("emailFormatter not set"); }
  if (timeZone == null) { throw new IllegalStateException("timeZone not set"); }
  return new UserBean(
        self != null ? self : createSelfLink(),
        user.getKey(),
        user.getUsername(),
        user.getDisplayName(),
        user.isActive(),
        emailFormatter.formatEmail(user.getEmailAddress(), loggedInUser),
        null,
        getAvatarURLs(user, jiraAvatarSupport),
        timeZone,
        beanFactory.getInstance(user).getLocale(),
        null
  );
}
com.atlassian.jira.utilEmailFormatterformatEmail

Javadoc

Formats user's email address for the purpose of displaying it to currentUser, as determined by the com.atlassian.jira.config.properties.APKeys#JIRA_OPTION_EMAIL_VISIBLE setting.

This convenience method is exactly equivalent to #formatEmail(String,boolean), except that it is null-safe.

Popular methods of EmailFormatter

  • emailVisible
    Returns whether or not email addresses are visible to this user, as determined by the com.atlassian.
  • formatEmailAsLink
    Returns email address as HTML links, if appropriate. If email addresses are masked, then they are re

Popular in Java

  • Start an intent from android
  • addToBackStack (FragmentTransaction)
  • getSupportFragmentManager (FragmentActivity)
  • compareTo (BigDecimal)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • JComboBox (javax.swing)
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now