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:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionBranchIntegrationConfigurationImpl
(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
Modifier and TypeMethodDescription@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
@NotNull BranchIntegrationPoint
@NotNull PlanKey
getMergeResultDestinationBranch
(@NotNull PlanKey planBranch) Returns the PlanKey of the relevant VCS branch we want to perform the merge on.static boolean
hasConfiguration
(BuildConfiguration buildConfiguration) Tests if aBuildConfiguration
contains aBranchIntegrationConfiguration
boolean
boolean
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
Generate aHierarchicalConfiguration
from the current state of the objectvoid
toConfiguration
(org.apache.commons.configuration.HierarchicalConfiguration dstConfiguration)
-
Field Details
-
INTEGRATION_BRANCH_UPDATER_MERGE_FROM_VCS_BRANCH
- See Also:
-
BRANCH_INTEGRATION_PREFIX
- See Also:
-
BRANCHES_PREFIX
- See Also:
-
-
Constructor Details
-
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 Details
-
hasConfiguration
Tests if aBuildConfiguration
contains aBranchIntegrationConfiguration
- Parameters:
buildConfiguration
- to test- Returns:
- true if contains a
BranchIntegrationConfiguration
-
getIntegrationPlanBranchKey
- Specified by:
getIntegrationPlanBranchKey
in interfaceBranchIntegrationConfiguration
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceBranchIntegrationConfiguration
-
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
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
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
- 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:
-