Package com.atlassian.bamboo.author
Class AuthorDuplicateNameHelper
java.lang.Object
com.atlassian.bamboo.author.AuthorDuplicateNameHelper
Utility class for BAM-5701
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
createNameMarkerPattern
(long originalId, long duplicateId) Create fake author name: "originalAuthorId;duplicateAuthorId".getAuthorIdFromNameMarkerPattern
(@NotNull String authorName) Decode original and duplicate author ids from the fake author name
-
Constructor Details
-
AuthorDuplicateNameHelper
public AuthorDuplicateNameHelper()
-
-
Method Details
-
createNameMarkerPattern
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
-