Class ConflictingUsersCalculator
- java.lang.Object
-
- jetbrains.buildServer.serverSide.projectsImport.conflicts.ConflictingUsersCalculator
-
@ThreadSafe public class ConflictingUsersCalculator extends Object
Some users from the imported archive can have usernames that are already used on the server. We merged such users into the target servers. It means that the data related to such user is attached to the corresponding user on the target server. For example, if both servers have user with username 'Pavel' then all investigations that are assigned to Pavel on the source server are assigned to Pavel on the target server. It's fine, if 'Pavel' represents the same person on both servers. We can be sure about it only if emails are the same and verified. All such users are returned bygetUsersWithSameVerifiedEmail()
. Also there are users with the same but not-verified emails -getUsersWithSameNotVerifiedEmail()
. Other users (with different emails) are returned bygetUsersWithDifferentEmail()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConflictingUsersCalculator.ConflictingUser
-
Constructor Summary
Constructors Constructor Description ConflictingUsersCalculator(ImportedUsersModel importedUsersModel, UserModel userModel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
calculate()
Set<ImportedUser>
getImportedUsersWithDifferentEmail()
Set<ImportedUser>
getImportedUsersWithSameNotVerifiedEmail()
Set<ImportedUser>
getImportedUsersWithSameVerifiedEmail()
Set<ImportedUser>
getNonConflictingUsers()
SortedSet<ConflictingUsersCalculator.ConflictingUser>
getUsersWithDifferentEmail()
Returned list is sorted by username.SortedSet<ConflictingUsersCalculator.ConflictingUser>
getUsersWithSameNotVerifiedEmail()
Returned list is sorted by username.SortedSet<ConflictingUsersCalculator.ConflictingUser>
getUsersWithSameVerifiedEmail()
Returned list is sorted by username.
-
-
-
Constructor Detail
-
ConflictingUsersCalculator
public ConflictingUsersCalculator(@NotNull ImportedUsersModel importedUsersModel, @NotNull UserModel userModel)
-
-
Method Detail
-
calculate
public void calculate()
-
getUsersWithDifferentEmail
@NotNull public SortedSet<ConflictingUsersCalculator.ConflictingUser> getUsersWithDifferentEmail()
Returned list is sorted by username.
-
getUsersWithSameNotVerifiedEmail
@NotNull public SortedSet<ConflictingUsersCalculator.ConflictingUser> getUsersWithSameNotVerifiedEmail()
Returned list is sorted by username.
-
getUsersWithSameVerifiedEmail
@NotNull public SortedSet<ConflictingUsersCalculator.ConflictingUser> getUsersWithSameVerifiedEmail()
Returned list is sorted by username.
-
getImportedUsersWithDifferentEmail
@NotNull public Set<ImportedUser> getImportedUsersWithDifferentEmail()
-
getImportedUsersWithSameVerifiedEmail
@NotNull public Set<ImportedUser> getImportedUsersWithSameVerifiedEmail()
-
getImportedUsersWithSameNotVerifiedEmail
@NotNull public Set<ImportedUser> getImportedUsersWithSameNotVerifiedEmail()
-
getNonConflictingUsers
@NotNull public Set<ImportedUser> getNonConflictingUsers()
-
-