Package com.atlassian.bamboo.plan.branch
Class BranchIntegrationConfigurationImpl
- java.lang.Object
-
- com.atlassian.bamboo.plan.branch.BranchIntegrationConfigurationImpl
-
- All Implemented Interfaces:
ConfigurationMergingCapable
,ConvertibleFromConfig
,OptionallyConvertibleFromConfig
,BranchIntegrationConfiguration
,Serializable
public class BranchIntegrationConfigurationImpl extends Object implements BranchIntegrationConfiguration
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
BRANCH_INTEGRATION_PREFIX
static String
BRANCHES_PREFIX
static String
INTEGRATION_BRANCH_UPDATER_MERGE_FROM_VCS_BRANCH
-
Constructor Summary
Constructors Constructor Description BranchIntegrationConfigurationImpl()
BranchIntegrationConfigurationImpl(boolean aDefaultConfiguration)
BranchIntegrationConfigurationImpl(boolean enabled, BranchIntegrationStrategy strategy, BranchIntegrationPoint branchIntegrationPoint, boolean pushEnabled, boolean isDefaultConfiguration)
BranchIntegrationConfigurationImpl(BranchIntegrationConfiguration other, boolean isDefaultConfiguration)
BranchIntegrationConfigurationImpl(BranchIntegrationConfiguration other, boolean isDefaultConfiguration, boolean pushEnabled)
BranchIntegrationConfigurationImpl(BranchIntegrationStrategy strategy, PlanKey integrationPlanKey, boolean pushEnabled)
Deprecated.since 6.0.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull String
findBranchToMergeWith(@NotNull PlanKey featureBranch)
Returns the PlanKey or branch name of the relevant vcs branch we want to merge with.@Nullable PlanKey
getBranchToMergeWith(@NotNull PlanKey featureBranch)
Returns the PlanKey we want to merge with.@Nullable PlanKey
getIntegrationPlanBranchKey()
@NotNull BranchIntegrationPoint
getIntegrationPoint()
@NotNull PlanKey
getMergeResultDestinationBranch(@NotNull PlanKey planBranch)
Returns the PlanKey of the relevant VCS branch we want to perform the merge on.BranchIntegrationStrategy
getStrategy()
static boolean
hasConfiguration(BuildConfiguration buildConfiguration)
Tests if aBuildConfiguration
contains aBranchIntegrationConfiguration
boolean
isEnabled()
boolean
isPushEnabled()
Tells whether Bamboo should push back the merged commit back into upstream repository if the build finishes successfully.boolean
isValid()
Is the object state valid after it has been initialised from properties.void
populateFromConfig(@NotNull org.apache.commons.configuration.HierarchicalConfiguration config)
Update the current object with data in theHierarchicalConfiguration
void
setBranchIntegrationPoint(@NotNull BranchIntegrationPoint branchIntegrationPoint)
@NotNull org.apache.commons.configuration.HierarchicalConfiguration
toConfiguration()
Generate aHierarchicalConfiguration
from the current state of the objectvoid
toConfiguration(org.apache.commons.configuration.HierarchicalConfiguration dstConfiguration)
-
-
-
Field Detail
-
INTEGRATION_BRANCH_UPDATER_MERGE_FROM_VCS_BRANCH
public static final String INTEGRATION_BRANCH_UPDATER_MERGE_FROM_VCS_BRANCH
- See Also:
- Constant Field Values
-
BRANCH_INTEGRATION_PREFIX
public static final String BRANCH_INTEGRATION_PREFIX
- See Also:
- Constant Field Values
-
BRANCHES_PREFIX
public static final String BRANCHES_PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BranchIntegrationConfigurationImpl
public BranchIntegrationConfigurationImpl()
-
BranchIntegrationConfigurationImpl
public BranchIntegrationConfigurationImpl(boolean aDefaultConfiguration)
-
BranchIntegrationConfigurationImpl
public BranchIntegrationConfigurationImpl(BranchIntegrationConfiguration other, boolean isDefaultConfiguration, boolean pushEnabled)
-
BranchIntegrationConfigurationImpl
public BranchIntegrationConfigurationImpl(BranchIntegrationConfiguration other, boolean isDefaultConfiguration)
-
BranchIntegrationConfigurationImpl
@Deprecated public BranchIntegrationConfigurationImpl(BranchIntegrationStrategy strategy, PlanKey integrationPlanKey, boolean pushEnabled)
-
BranchIntegrationConfigurationImpl
public BranchIntegrationConfigurationImpl(boolean enabled, BranchIntegrationStrategy strategy, BranchIntegrationPoint branchIntegrationPoint, boolean pushEnabled, boolean isDefaultConfiguration)
-
-
Method Detail
-
hasConfiguration
public static boolean hasConfiguration(BuildConfiguration buildConfiguration)
Tests if aBuildConfiguration
contains aBranchIntegrationConfiguration
- Parameters:
buildConfiguration
- to test- Returns:
- true if contains a
BranchIntegrationConfiguration
-
getIntegrationPlanBranchKey
@Nullable public @Nullable PlanKey getIntegrationPlanBranchKey()
- Specified by:
getIntegrationPlanBranchKey
in interfaceBranchIntegrationConfiguration
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in interfaceBranchIntegrationConfiguration
-
getStrategy
public BranchIntegrationStrategy getStrategy()
- Specified by:
getStrategy
in interfaceBranchIntegrationConfiguration
-
isPushEnabled
public boolean isPushEnabled()
Description copied from interface:BranchIntegrationConfiguration
Tells whether Bamboo should push back the merged commit back into upstream repository if the build finishes successfully.- Specified by:
isPushEnabled
in interfaceBranchIntegrationConfiguration
-
getMergeResultDestinationBranch
@NotNull public @NotNull PlanKey getMergeResultDestinationBranch(@NotNull @NotNull PlanKey planBranch)
Description copied from interface:BranchIntegrationConfiguration
Returns the PlanKey of the relevant VCS branch we want to perform the merge on. In Hg/Git/SVN terms, this will be the VCS branch we checkout prior to merge.- Specified by:
getMergeResultDestinationBranch
in interfaceBranchIntegrationConfiguration
-
getBranchToMergeWith
@Nullable public @Nullable PlanKey getBranchToMergeWith(@NotNull @NotNull PlanKey featureBranch)
Description copied from interface:BranchIntegrationConfiguration
Returns the PlanKey we want to merge with. Used only for debug messages In Hg/Git/SVN terms, this will be the VCS branch we merge with after checkout.- Specified by:
getBranchToMergeWith
in interfaceBranchIntegrationConfiguration
-
findBranchToMergeWith
@NotNull public @NotNull String findBranchToMergeWith(@NotNull @NotNull PlanKey featureBranch)
Description copied from interface:BranchIntegrationConfiguration
Returns the PlanKey or branch name of the relevant vcs branch we want to merge with. Used only for debug messages In Hg/Git/SVN terms, this will be the VCS branch we merge with after checkout.- Specified by:
findBranchToMergeWith
in interfaceBranchIntegrationConfiguration
-
getIntegrationPoint
@NotNull public @NotNull BranchIntegrationPoint getIntegrationPoint()
- Specified by:
getIntegrationPoint
in interfaceBranchIntegrationConfiguration
-
setBranchIntegrationPoint
public void setBranchIntegrationPoint(@NotNull @NotNull BranchIntegrationPoint branchIntegrationPoint)
-
populateFromConfig
public void populateFromConfig(@NotNull @NotNull org.apache.commons.configuration.HierarchicalConfiguration config)
Description copied from interface:ConvertibleFromConfig
Update the current object with data in theHierarchicalConfiguration
- Specified by:
populateFromConfig
in interfaceConvertibleFromConfig
-
toConfiguration
@NotNull public @NotNull org.apache.commons.configuration.HierarchicalConfiguration toConfiguration()
Description copied from interface:ConvertibleFromConfig
Generate aHierarchicalConfiguration
from the current state of the object- Specified by:
toConfiguration
in interfaceConvertibleFromConfig
- Returns:
- Always returns an
HierarchicalConfiguration
. Never null
-
toConfiguration
public void toConfiguration(org.apache.commons.configuration.HierarchicalConfiguration dstConfiguration)
- Specified by:
toConfiguration
in interfaceConfigurationMergingCapable
-
isValid
public boolean isValid()
Description copied from interface:OptionallyConvertibleFromConfig
Is the object state valid after it has been initialised from properties.- Specified by:
isValid
in interfaceOptionallyConvertibleFromConfig
- Returns:
-
-