Package com.atlassian.bamboo.author
Class AuthorDuplicateNameHelper
- java.lang.Object
-
- com.atlassian.bamboo.author.AuthorDuplicateNameHelper
-
public class AuthorDuplicateNameHelper extends Object
Utility class for BAM-5701
-
-
Constructor Summary
Constructors Constructor Description AuthorDuplicateNameHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
createNameMarkerPattern(long originalId, long duplicateId)
Create fake author name: "originalAuthorId;duplicateAuthorId".static @Nullable Pair<Long,Long>
getAuthorIdFromNameMarkerPattern(@NotNull String authorName)
Decode original and duplicate author ids from the fake author name
-
-
-
Method Detail
-
createNameMarkerPattern
public static String createNameMarkerPattern(long originalId, long duplicateId)
Create fake author name: "originalAuthorId;duplicateAuthorId". This method relies on a fact that it is unlikely that real author name would be something like "123456;234567"- Parameters:
originalId
- original author idduplicateId
- duplicate author id- Returns:
- fake name to be used for author duplicate
-
getAuthorIdFromNameMarkerPattern
@Nullable public static @Nullable Pair<Long,Long> getAuthorIdFromNameMarkerPattern(@NotNull @NotNull String authorName)
Decode original and duplicate author ids from the fake author name- Parameters:
authorName
- fake author name to be decoded- Returns:
- pair of originalId and duplicateId or null if name cannot be decoded
-
-