com.atlassian.bamboo.author
Class AuthorDuplicateNameHelper
java.lang.Object
com.atlassian.bamboo.author.AuthorDuplicateNameHelper
public class AuthorDuplicateNameHelper
- extends java.lang.Object
Utility class for BAM-5701
Method Summary |
static java.lang.String |
createNameMarkerPattern(long originalId,
long duplicateId)
Create fake author name: "originalAuthorId;duplicateAuthorId". |
static Pair<java.lang.Long,java.lang.Long> |
getAuthorIdFromNameMarkerPattern(java.lang.String authorName)
Decode original and duplicate author ids from the fake author name |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AuthorDuplicateNameHelper
public AuthorDuplicateNameHelper()
createNameMarkerPattern
public static java.lang.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 Pair<java.lang.Long,java.lang.Long> getAuthorIdFromNameMarkerPattern(@NotNull
java.lang.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
Copyright © 2011 Atlassian. All Rights Reserved.