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

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

Best Java code snippets using com.atlassian.jira.util.EmailFormatter (Showing top 13 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 boolean isEmailVisible(final ApplicationUser user)
{
  return emailFormatter.emailVisible(user);
}
origin: com.atlassian.jira/jira-core

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

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

public boolean getEmailColumnVisible()
{
  return emailFormatter.emailVisible(getLoggedInUser());
}
origin: com.atlassian.jira/jira-core

public String getFormattedEmail()
{
  if (user != null)
  {
    return emailFormatter.formatEmailAsLink(user.getEmailAddress(), getLoggedInUser());
  }
  return "";
}
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.streams/streams-jira-plugin

if (user != null)
  if(emailFormatter.emailVisible(authenticationContext.getLoggedInUser()))
origin: com.atlassian.jira/jira-core

@HtmlSafe
public String getDisplayEmail(final ApplicationUser user)
{
  return emailFormatter.formatEmailAsLink(user.getEmailAddress(), user);
}
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.utilEmailFormatter

Javadoc

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

Most used methods

  • formatEmail
    Formats an email address for the purpose of displaying it to a user as determined by the com.atlassi
  • 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

  • Making http post requests using okhttp
  • compareTo (BigDecimal)
  • scheduleAtFixedRate (Timer)
  • startActivity (Activity)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Top 12 Jupyter Notebook extensions
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