Package com.atlassian.jira.user.util
Class DuplicatedUsersToDirectoriesMapping
java.lang.Object
com.atlassian.jira.user.util.DuplicatedUsersToDirectoriesMapping
Container class used to hold a mapping of duplicated users to the directories they have accounts in.
Duplicated means that the user has an account in more than one directory and either more than one account is active
or the only active account does not belong to the directory with the highest priority.
Use the
EMPTY public static member if you want to retrieve an empty instance.- Since:
- 8.19
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to constructDuplicatedUsersToDirectoriesMappingobjects.static classContainer class holding id and name of the directory and an indication if user has an active account in it. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetDirectoriesForUser(String username) Returns the list of directories where the duplicated user has an account.Returns the set of usernames present in the container.intReturns the number of users who have duplicated accounts.
-
Field Details
-
EMPTY
-
-
Method Details
-
userCount
public int userCount()Returns the number of users who have duplicated accounts.- Returns:
- count of duplicated users.
- Since:
- 8.19
-
getDirectoriesForUser
public List<DuplicatedUsersToDirectoriesMapping.DirectoryWithUserActive> getDirectoriesForUser(String username) Returns the list of directories where the duplicated user has an account. If there are none, an empty list is returned. Returned objects also contain information on whether the user account is active.- Returns:
- List of directories the user has accounts in.
- Since:
- 8.19
-
getUsernames
Returns the set of usernames present in the container.- Returns:
- Set of usernames.
- Since:
- 8.19
-