Class MergeResultContextImpl
- java.lang.Object
-
- com.atlassian.bamboo.chains.branches.MergeResultContextImpl
-
- All Implemented Interfaces:
MergeResultContext
public class MergeResultContextImpl extends Object implements MergeResultContext
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
UNITIALISED
-
Constructor Summary
Constructors Constructor Description MergeResultContextImpl()
MergeResultContextImpl(@NotNull MergeResultContext other)
MergeResultContextImpl(BranchIntegrationStrategy integrationStrategy)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
copy(@Nullable MergeResultContext from, @NotNull MergeResultContext to)
@Nullable String
getBranchName()
Branch name associated with this Plan Branch.@Nullable String
getBranchTargetVcsKey()
Depending on the integration strategy this could be the checked out revision or the merged revision Should be NotNull, but legacy data may exist that doesn't have this value.@Nullable String
getFailureReason()
@NotNull String
getIntegrationBranchVcsKey()
Depensing on the integration strategy this could be the checked out revision or the merged revisionString
getIntegrationRepositoryBranchName()
The branch name associated with the integration repositorylong
getIntegrationRepositoryId()
BranchIntegrationStrategy
getIntegrationStrategy()
Should not be null, however legacy data may exist that doesn't have this value.@Nullable String
getMergeResultVcsKey()
@NotNull MergeResultState
getMergeState()
The state of the merge part of the integration strategy Should be NotNull but legacy data may exist@NotNull MergeResultState
getPushState()
The state of the push part of the integration strategy Should be NotNull but legacy data may existboolean
hasFailed()
Has the branch integration failed at any point in the integration processboolean
isEmptyMerge()
void
setBranchName(@Nullable String branchName)
void
setBranchTargetVcsKey(@Nullable String branchTargetVcsKey)
void
setEmptyMerge(boolean emptyMerge)
void
setFailureReason(@Nullable String failureReason)
void
setIntegrationBranchVcsKey(@NotNull String integrationBranchVcsKey)
void
setIntegrationRepositoryBranchName(String integrationRepositoryBranchName)
void
setIntegrationRepositoryId(long integrationRepositoryId)
void
setIntegrationStrategy(BranchIntegrationStrategy integrationStrategy)
void
setMergeResultVcsKey(@Nullable String pushRevisionKey)
void
setMergeState(@NotNull MergeResultState mergeState)
void
setPushState(@NotNull MergeResultState pushState)
String
toString()
-
-
-
Field Detail
-
UNITIALISED
protected static final String UNITIALISED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MergeResultContextImpl
public MergeResultContextImpl()
-
MergeResultContextImpl
public MergeResultContextImpl(BranchIntegrationStrategy integrationStrategy)
-
MergeResultContextImpl
public MergeResultContextImpl(@NotNull @NotNull MergeResultContext other)
-
-
Method Detail
-
getIntegrationRepositoryId
public long getIntegrationRepositoryId()
- Specified by:
getIntegrationRepositoryId
in interfaceMergeResultContext
- Returns:
- id of the integrated repository. This could be the checkout or merge repo depending on strategy
-
setIntegrationRepositoryId
public void setIntegrationRepositoryId(long integrationRepositoryId)
- Specified by:
setIntegrationRepositoryId
in interfaceMergeResultContext
-
getFailureReason
@Nullable public @Nullable String getFailureReason()
- Specified by:
getFailureReason
in interfaceMergeResultContext
- Returns:
- reason of failure of merge or push operation
-
setFailureReason
public void setFailureReason(@Nullable @Nullable String failureReason)
- Specified by:
setFailureReason
in interfaceMergeResultContext
-
getIntegrationBranchVcsKey
@NotNull public @NotNull String getIntegrationBranchVcsKey()
Description copied from interface:MergeResultContext
Depensing on the integration strategy this could be the checked out revision or the merged revision- Specified by:
getIntegrationBranchVcsKey
in interfaceMergeResultContext
- Returns:
- revision key integrated into the branch
-
setIntegrationBranchVcsKey
public void setIntegrationBranchVcsKey(@NotNull @NotNull String integrationBranchVcsKey)
- Specified by:
setIntegrationBranchVcsKey
in interfaceMergeResultContext
-
getMergeResultVcsKey
@Nullable public @Nullable String getMergeResultVcsKey()
- Specified by:
getMergeResultVcsKey
in interfaceMergeResultContext
- Returns:
- revision created by the merge process
-
setMergeResultVcsKey
public void setMergeResultVcsKey(@Nullable @Nullable String pushRevisionKey)
- Specified by:
setMergeResultVcsKey
in interfaceMergeResultContext
-
isEmptyMerge
public boolean isEmptyMerge()
- Specified by:
isEmptyMerge
in interfaceMergeResultContext
- Returns:
- true iff merge doesn't produce any changes that need to be committed
-
setEmptyMerge
public void setEmptyMerge(boolean emptyMerge)
- Specified by:
setEmptyMerge
in interfaceMergeResultContext
-
getMergeState
@NotNull public @NotNull MergeResultState getMergeState()
Description copied from interface:MergeResultContext
The state of the merge part of the integration strategy Should be NotNull but legacy data may exist- Specified by:
getMergeState
in interfaceMergeResultContext
- Returns:
- MergeResultState representing the state of the merge
-
setMergeState
public void setMergeState(@NotNull @NotNull MergeResultState mergeState)
- Specified by:
setMergeState
in interfaceMergeResultContext
-
getPushState
@NotNull public @NotNull MergeResultState getPushState()
Description copied from interface:MergeResultContext
The state of the push part of the integration strategy Should be NotNull but legacy data may exist- Specified by:
getPushState
in interfaceMergeResultContext
- Returns:
- MergeResultState representing the state of the push
-
setPushState
public void setPushState(@NotNull @NotNull MergeResultState pushState)
- Specified by:
setPushState
in interfaceMergeResultContext
-
getBranchTargetVcsKey
@Nullable public @Nullable String getBranchTargetVcsKey()
Description copied from interface:MergeResultContext
Depending on the integration strategy this could be the checked out revision or the merged revision Should be NotNull, but legacy data may exist that doesn't have this value.- Specified by:
getBranchTargetVcsKey
in interfaceMergeResultContext
- Returns:
- The revision key used of the branch
-
setBranchTargetVcsKey
public void setBranchTargetVcsKey(@Nullable @Nullable String branchTargetVcsKey)
- Specified by:
setBranchTargetVcsKey
in interfaceMergeResultContext
-
getIntegrationStrategy
public BranchIntegrationStrategy getIntegrationStrategy()
Description copied from interface:MergeResultContext
Should not be null, however legacy data may exist that doesn't have this value.- Specified by:
getIntegrationStrategy
in interfaceMergeResultContext
- Returns:
- The integration strategy used for his merge.
-
setIntegrationStrategy
public void setIntegrationStrategy(BranchIntegrationStrategy integrationStrategy)
- Specified by:
setIntegrationStrategy
in interfaceMergeResultContext
-
getIntegrationRepositoryBranchName
public String getIntegrationRepositoryBranchName()
Description copied from interface:MergeResultContext
The branch name associated with the integration repository- Specified by:
getIntegrationRepositoryBranchName
in interfaceMergeResultContext
- Returns:
- A string representation of the branch at the time of integration.
-
setIntegrationRepositoryBranchName
public void setIntegrationRepositoryBranchName(String integrationRepositoryBranchName)
- Specified by:
setIntegrationRepositoryBranchName
in interfaceMergeResultContext
-
getBranchName
@Nullable public @Nullable String getBranchName()
Description copied from interface:MergeResultContext
Branch name associated with this Plan Branch.- Specified by:
getBranchName
in interfaceMergeResultContext
- Returns:
- a string representation of the branch at the time of integration
-
setBranchName
public void setBranchName(@Nullable @Nullable String branchName)
- Specified by:
setBranchName
in interfaceMergeResultContext
-
hasFailed
public boolean hasFailed()
Description copied from interface:MergeResultContext
Has the branch integration failed at any point in the integration process- Specified by:
hasFailed
in interfaceMergeResultContext
- Returns:
- true if the integration has failed.
-
copy
public static void copy(@Nullable @Nullable MergeResultContext from, @NotNull @NotNull MergeResultContext to)
-
-