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 StringBRANCH_INTEGRATION_PREFIXstatic StringBRANCHES_PREFIXstatic StringINTEGRATION_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 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 PlanKeygetIntegrationPlanBranchKey()@NotNull BranchIntegrationPointgetIntegrationPoint()@NotNull PlanKeygetMergeResultDestinationBranch(@NotNull PlanKey planBranch)Returns the PlanKey of the relevant VCS branch we want to perform the merge on.BranchIntegrationStrategygetStrategy()static booleanhasConfiguration(BuildConfiguration buildConfiguration)Tests if aBuildConfigurationcontains aBranchIntegrationConfigurationbooleanisEnabled()booleanisPushEnabled()Tells 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.HierarchicalConfigurationtoConfiguration()Generate aHierarchicalConfigurationfrom the current state of the objectvoidtoConfiguration(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 aBuildConfigurationcontains aBranchIntegrationConfiguration- Parameters:
buildConfiguration- to test- Returns:
- true if contains a
BranchIntegrationConfiguration
-
getIntegrationPlanBranchKey
@Nullable public @Nullable PlanKey getIntegrationPlanBranchKey()
- Specified by:
getIntegrationPlanBranchKeyin interfaceBranchIntegrationConfiguration
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabledin interfaceBranchIntegrationConfiguration
-
getStrategy
public BranchIntegrationStrategy 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
@Nullable public @Nullable PlanKey getBranchToMergeWith(@NotNull @NotNull PlanKey featureBranch)
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
@NotNull public @NotNull String findBranchToMergeWith(@NotNull @NotNull PlanKey featureBranch)
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
@NotNull public @NotNull BranchIntegrationPoint 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
-
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:
-
-