public class

UserResolverImpl

extends Object
implements UserResolver
java.lang.Object
   ↳ com.atlassian.jira.jql.resolver.UserResolverImpl

Class Overview

Resolves User objects and their names.

Summary

Public Constructors
UserResolverImpl(UserKeyService userKeyService, UserManager userManager, UserSearchService userSearchService)
Public Methods
ApplicationUser get(Long id)
Get a user from an ID
@Nonnull Collection<ApplicationUser> getAll()
Get all users
ApplicationUser getApplicationUser(Long id)
Gets an application user from an ID
List<String> getIdsFromName(String name)
Returns the list of ids of T objects that have the given name.
boolean idExists(Long id)
Returns true if the id would resolve to a domain object.
boolean nameExists(String name)
Returns true if the name would resolve to a domain object.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.jql.resolver.NameResolver
From interface com.atlassian.jira.jql.resolver.UserResolver

Public Constructors

public UserResolverImpl (UserKeyService userKeyService, UserManager userManager, UserSearchService userSearchService)

Public Methods

public ApplicationUser get (Long id)

Get a user from an ID

Parameters
id the id.
Returns
  • a User

@Nonnull public Collection<ApplicationUser> getAll ()

Get all users

Returns
  • All users

public ApplicationUser getApplicationUser (Long id)

Gets an application user from an ID

Parameters
id the id.
Returns
  • an ApplicationUser

public List<String> getIdsFromName (String name)

Returns the list of ids of T objects that have the given name. Names may be unique but often are not, hence the List return type.

Parameters
name the name of the T.
Returns
  • all IDs of objects matching the name or the empty list on name lookup failure.

public boolean idExists (Long id)

Returns true if the id would resolve to a domain object.

Parameters
id the primary key.
Returns
  • true only if the id resolves to a domain object in the database.

public boolean nameExists (String name)

Returns true if the name would resolve to a domain object.

Parameters
name the addressable name.
Returns
  • true only if the name resolves to a domain object in the database.