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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBranchIntegrationConfigurationImpl(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 StringfindBranchToMergeWith(@NotNull PlanKey featureBranch) Returns the PlanKey or branch name of the relevant vcs branch we want to merge with.@Nullable PlanKeygetBranchToMergeWith(@NotNull PlanKey featureBranch) Returns the PlanKey we want to merge with.@Nullable PlanKey@NotNull BranchIntegrationPoint@NotNull PlanKeygetMergeResultDestinationBranch(@NotNull PlanKey planBranch) Returns the PlanKey of the relevant VCS branch we want to perform the merge on.static booleanhasConfiguration(BuildConfiguration buildConfiguration) Tests if aBuildConfigurationcontains aBranchIntegrationConfigurationbooleanbooleanTells whether Bamboo should push back the merged commit back into upstream repository if the build finishes successfully.booleanisValid()Is the object state valid after it has been initialised from properties.voidpopulateFromConfig(@NotNull org.apache.commons.configuration.HierarchicalConfiguration config) Update the current object with data in theHierarchicalConfigurationvoidsetBranchIntegrationPoint(@NotNull BranchIntegrationPoint branchIntegrationPoint) @NotNull org.apache.commons.configuration.HierarchicalConfigurationGenerate aHierarchicalConfigurationfrom the current state of the objectvoidtoConfiguration(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 aBuildConfigurationcontains aBranchIntegrationConfiguration- Parameters:
buildConfiguration- to test- Returns:
- true if contains a
BranchIntegrationConfiguration
-
getIntegrationPlanBranchKey
- Specified by:
getIntegrationPlanBranchKeyin interfaceBranchIntegrationConfiguration
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceBranchIntegrationConfiguration
-
getStrategy
- Specified by:
getStrategyin interfaceBranchIntegrationConfiguration
-
isPushEnabled
public boolean isPushEnabled()Description copied from interface:BranchIntegrationConfigurationTells whether Bamboo should push back the merged commit back into upstream repository if the build finishes successfully.- Specified by:
isPushEnabledin interfaceBranchIntegrationConfiguration
-
getMergeResultDestinationBranch
@NotNull public @NotNull PlanKey getMergeResultDestinationBranch(@NotNull @NotNull PlanKey planBranch) Description copied from interface:BranchIntegrationConfigurationReturns 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:
getMergeResultDestinationBranchin interfaceBranchIntegrationConfiguration
-
getBranchToMergeWith
Description copied from interface:BranchIntegrationConfigurationReturns 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:
getBranchToMergeWithin interfaceBranchIntegrationConfiguration
-
findBranchToMergeWith
Description copied from interface:BranchIntegrationConfigurationReturns 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:
findBranchToMergeWithin interfaceBranchIntegrationConfiguration
-
getIntegrationPoint
- Specified by:
getIntegrationPointin 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:ConvertibleFromConfigUpdate the current object with data in theHierarchicalConfiguration- Specified by:
populateFromConfigin interfaceConvertibleFromConfig- Parameters:
config-
-
toConfiguration
@NotNull public @NotNull org.apache.commons.configuration.HierarchicalConfiguration toConfiguration()Description copied from interface:ConvertibleFromConfigGenerate aHierarchicalConfigurationfrom the current state of the object- Specified by:
toConfigurationin interfaceConvertibleFromConfig- Returns:
- Always returns an
HierarchicalConfiguration. Never null
-
toConfiguration
public void toConfiguration(org.apache.commons.configuration.HierarchicalConfiguration dstConfiguration) - Specified by:
toConfigurationin interfaceConfigurationMergingCapable
-
isValid
public boolean isValid()Description copied from interface:OptionallyConvertibleFromConfigIs the object state valid after it has been initialised from properties.- Specified by:
isValidin interfaceOptionallyConvertibleFromConfig- Returns:
-