com.atlassian.jira.user
Class ApplicationUsers

java.lang.Object
  extended by com.atlassian.jira.user.ApplicationUsers

public final class ApplicationUsers
extends Object

Contains utility methods for getting an ApplicationUser from a directory User.

Since:
v5.1.1

Constructor Summary
ApplicationUsers()
           
 
Method Summary
static ApplicationUser from(com.atlassian.crowd.embedded.api.User user)
          Obtains an ApplicationUser for the given directory User.
static String getKeyFor(com.atlassian.crowd.embedded.api.User user)
          Gets the user key for the given directory User.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationUsers

public ApplicationUsers()
Method Detail

from

public static ApplicationUser from(@Nullable
                                   com.atlassian.crowd.embedded.api.User user)
Obtains an ApplicationUser for the given directory User.

Parameters:
user - the directory User
Returns:
the Application User or null if the incoming user is null

getKeyFor

public static String getKeyFor(@Nullable
                               com.atlassian.crowd.embedded.api.User user)
Gets the user key for the given directory User.

This is a null-safe shorthand for

  ApplicationUsers.from(user).getKey()

Parameters:
user - the directory User
Returns:
the application user Key for the given directory User or null if the incoming user is null


Copyright © 2002-2013 Atlassian. All Rights Reserved.