Package com.atlassian.bamboo.plan.branch
Class ChainBranchImpl
- java.lang.Object
-
- com.atlassian.core.bean.EntityObject
-
- All Implemented Interfaces:
Chain
,BambooIdProvider
,BambooObject
,BambooObjectWithOid
,EntityWithOid
,ImmutableEntityWithOid
,Deletable
,Describable
,ChainBranch
,ChainBranchIdentifier
,ImmutableChain
,ImmutableChainBranch
,ImmutableDeletable
,ImmutablePlan
,Plan
,PlanIdentifier
,PlanKeyProvider
,Triggerable
,DescriptionProvider
,NameProvider
,Versionable
,Cloneable
,Comparable<Plan>
@Entity public class ChainBranchImpl extends AbstractChain implements ChainBranch
-
-
Field Summary
-
Fields inherited from class com.atlassian.bamboo.plan.AbstractChain
master, NUMBER_OF_RESULTS
-
Fields inherited from class com.atlassian.bamboo.plan.AbstractPlan
resultsSummaryManager
-
Fields inherited from interface com.atlassian.bamboo.plan.cache.ImmutablePlan
MAX_PREVIOUS_BUILD_FOR_AVE, STATUS_CURRENTLY_BUILDING, STATUS_FAIL, STATUS_NO_BUILDS, STATUS_NOT_RUN, STATUS_SUCCESS
-
Fields inherited from interface com.atlassian.bamboo.plan.PlanIdentifier
NAME_DELIMITER
-
Fields inherited from interface com.atlassian.bamboo.plan.PlanKeyProvider
getPlanKey
-
-
Constructor Summary
Constructors Constructor Description ChainBranchImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static List<PlanRepositoryDefinition>
createEffectivePlanRepositoryDefinitions(List<PlanRepositoryDefinition> branchRepositories, List<PlanRepositoryDefinition> masterRepositories)
BranchCommitInformation
getCommitInformation()
@NotNull List<RepositoryDefinition>
getEffectiveRepositoryDefinitions()
Return list of repositories available to the chain.String
getLinkedJiraIssue()
Branches can be linked to a specific jira issue.@NotNull Chain
getMaster()
Return the master plan if one exists.PlanBranchMetadata
getMetadata()
NotificationSet
getNotificationSet()
Get notifications defined for this plan.@NotNull List<PlanRepositoryDefinition>
getPlanRepositoryDefinitions()
Return list of repositories available to the chain.@NotNull PlanType
getPlanType()
boolean
isDivergent()
Is branch divergent.boolean
isRemoteJiraLinkRequired()
Stores whether a JIRA Issue exists but the remote issue link has not successfully been created for this branchvoid
setCommitInformation(@Nullable BranchCommitInformation commitInformation)
void
setDivergent(boolean divergent)
void
setLinkedJiraIssue(String linkedJiraIssue)
void
setMaster(@NotNull Plan master)
Set which plan is the master of this plan.void
setMetadata(@NotNull PlanBranchMetadata planBranchMetadata)
void
setRemoteJiraLinkRequired(boolean remoteJiraIssueLinkRequired)
-
Methods inherited from class com.atlassian.bamboo.plan.AbstractChain
addNewStage, addStage, addStage, containsStage, getAllJobs, getAllStages, getAverageBuildDuration, getCurrentStatus, getJobCount, getLastResultKey, getNotificationSetField, getStages, getStorageTag, getTriggerDefinitions, getVcsBambooSpecsSource, isActive, isExecuting, isSuspended, removeStage, removeStagesIf, setAllStages, setBambooSpecsManager, setChainExecutionManager, setNotificationSet, setRepositoryDefinitionManager, setStorageTag, setVcsBambooSpecsSource
-
Methods inherited from class com.atlassian.bamboo.plan.AbstractPlan
compareTo, equals, getBuildDefinition, getBuildDefinitionXml, getBuildKey, getBuildLogger, getBuildName, getDatabaseId, getDescription, getDiscriminator, getEffectiveVariables, getFirstBuildNumber, getKey, getLabellings, getLabelNames, getLastBuildNumber, getLatestResultsSummary, getMasterId, getMasterIdIfExists, getName, getPlanKey, getProject, getRelatedLabellings, getType, getVariables, getVersion, hashCode, hasMaster, isBusy, isMarkedForDeletion, isSuspendedFromBuilding, setBuildDefinitionManager, setBuildDefinitionXml, setBuildKey, setBuildLoggerManager, setBuildName, setDescription, setDiscriminator, setKey, setLabellings, setLabelManager, setMarkedForDeletion, setName, setPlanExecutionManager, setPlanKey, setProject, setResultsSummaryManager, setSuspendedFromBuilding, setVariableDefinitionManager, setVersion
-
Methods inherited from class com.atlassian.bamboo.hibernate.HibernateBambooEntityWithOid
getId, getOid, setId, setOid
-
Methods inherited from class com.atlassian.core.bean.EntityObject
clone, getCreationDate, getCurrentDate, getLastModificationDate, setClock, setCreationDate, setLastModificationDate
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
-
Methods inherited from interface com.atlassian.bamboo.chains.Chain
addNewStage, addStage, addStage, getAllJobs, getAllStages, getStages, removeStage, removeStagesIf, setNotificationSet, setStorageTag
-
Methods inherited from interface com.atlassian.bamboo.deletion.Deletable
setMarkedForDeletion
-
Methods inherited from interface com.atlassian.bamboo.Describable
setDescription, setName
-
Methods inherited from interface com.atlassian.bamboo.utils.DescriptionProvider
getDescription
-
Methods inherited from interface com.atlassian.bamboo.core.EntityWithOid
setOid
-
Methods inherited from interface com.atlassian.bamboo.plan.cache.ImmutableChain
containsStage, getCreationDate, getEntityType, getJobCount, getLastResultKey, getStorageTag, getVcsBambooSpecsSource
-
Methods inherited from interface com.atlassian.bamboo.core.ImmutableEntityWithOid
getOid
-
Methods inherited from interface com.atlassian.bamboo.plan.cache.ImmutablePlan
getAverageBuildDuration, getBuildDefinition, getBuildLogger, getCurrentStatus, getEffectiveVariables, getFirstBuildNumber, getKey, getLabelNames, getLastBuildNumber, getProject, getType, getVariables, hasMaster, isActive, isBusy, isExecuting, isMarkedForDeletion
-
Methods inherited from interface com.atlassian.bamboo.plan.Plan
getBuildDefinitionXml, getLabellings, getLatestResultsSummary, getRelatedLabellings, setBuildDefinitionXml, setBuildKey, setBuildName, setKey, setLabellings, setPlanKey, setProject, setSuspendedFromBuilding
-
Methods inherited from interface com.atlassian.bamboo.plan.PlanIdentifier
getBuildKey, getBuildName, getDatabaseId, getId, getMasterId, getMasterIdIfExists, getName, getPlanKey, isSuspendedFromBuilding
-
Methods inherited from interface com.atlassian.bamboo.trigger.Triggerable
getTriggerDefinitions, isSuspended
-
Methods inherited from interface com.atlassian.bamboo.versioning.Versionable
getVersion
-
-
-
-
Method Detail
-
getMaster
@NotNull public @NotNull Chain getMaster()
Description copied from interface:ImmutablePlan
Return the master plan if one exists. The master is the plan which this one is derived from. Configuration is pulled from the master if one exists.- Specified by:
getMaster
in interfaceChain
- Specified by:
getMaster
in interfaceImmutableChain
- Specified by:
getMaster
in interfaceImmutablePlan
- Overrides:
getMaster
in classAbstractChain
- Returns:
- the master
Plan
if one exists.
-
getPlanType
@NotNull public @NotNull PlanType getPlanType()
- Specified by:
getPlanType
in interfacePlanIdentifier
- Returns:
- the type of this plan
-
setCommitInformation
public void setCommitInformation(@Nullable @Nullable BranchCommitInformation commitInformation)
- Specified by:
setCommitInformation
in interfaceChainBranch
-
getCommitInformation
public BranchCommitInformation getCommitInformation()
- Specified by:
getCommitInformation
in interfaceImmutableChainBranch
-
getMetadata
public PlanBranchMetadata getMetadata()
- Specified by:
getMetadata
in interfaceImmutableChainBranch
-
setMetadata
public void setMetadata(@NotNull @NotNull PlanBranchMetadata planBranchMetadata)
- Specified by:
setMetadata
in interfaceChainBranch
-
getLinkedJiraIssue
public String getLinkedJiraIssue()
Description copied from interface:ChainBranchIdentifier
Branches can be linked to a specific jira issue. This is the issue key of that issue.- Specified by:
getLinkedJiraIssue
in interfaceChainBranchIdentifier
- Returns:
-
setLinkedJiraIssue
public void setLinkedJiraIssue(String linkedJiraIssue)
- Specified by:
setLinkedJiraIssue
in interfaceChainBranch
-
isRemoteJiraLinkRequired
public boolean isRemoteJiraLinkRequired()
Description copied from interface:ChainBranchIdentifier
Stores whether a JIRA Issue exists but the remote issue link has not successfully been created for this branch- Specified by:
isRemoteJiraLinkRequired
in interfaceChainBranchIdentifier
- Returns:
- true if a remote issue link has not yet been created.
-
setRemoteJiraLinkRequired
public void setRemoteJiraLinkRequired(boolean remoteJiraIssueLinkRequired)
- Specified by:
setRemoteJiraLinkRequired
in interfaceChainBranch
-
getEffectiveRepositoryDefinitions
@NotNull public @NotNull List<RepositoryDefinition> getEffectiveRepositoryDefinitions()
Description copied from interface:ImmutableChain
Return list of repositories available to the chain. In case of non-master object it will return list of master's repository definitions with default repository overridden by a private copy of default repository.- Specified by:
getEffectiveRepositoryDefinitions
in interfaceImmutableChain
- Overrides:
getEffectiveRepositoryDefinitions
in classAbstractChain
- Returns:
- ordered
List
of repositories available to this plan
-
getPlanRepositoryDefinitions
@NotNull public @NotNull List<PlanRepositoryDefinition> getPlanRepositoryDefinitions()
Description copied from interface:ImmutableChain
Return list of repositories available to the chain. In case of non-master object it will return list of master's repository definitions with default repository overridden by a private copy of default repository.- Specified by:
getPlanRepositoryDefinitions
in interfaceImmutableChain
- Overrides:
getPlanRepositoryDefinitions
in classAbstractChain
- Returns:
- ordered
List
of repositories available to this plan
-
createEffectivePlanRepositoryDefinitions
public static List<PlanRepositoryDefinition> createEffectivePlanRepositoryDefinitions(List<PlanRepositoryDefinition> branchRepositories, List<PlanRepositoryDefinition> masterRepositories)
-
getNotificationSet
public NotificationSet getNotificationSet()
Description copied from interface:ImmutableChain
Get notifications defined for this plan.- Specified by:
getNotificationSet
in interfaceImmutableChain
- Overrides:
getNotificationSet
in classAbstractChain
- Returns:
NotificationSet
containing notifications for this plan.
-
setMaster
public void setMaster(@NotNull @NotNull Plan master)
Description copied from interface:Plan
Set which plan is the master of this plan. The master is the plan which this one is derived from. Configuration is pulled from the master if one exists.- Specified by:
setMaster
in interfaceChainBranch
- Specified by:
setMaster
in interfacePlan
-
isDivergent
public boolean isDivergent()
Description copied from interface:ImmutableChainBranch
Is branch divergent.- Specified by:
isDivergent
in interfaceImmutableChainBranch
-
setDivergent
public void setDivergent(boolean divergent)
- Specified by:
setDivergent
in interfaceChainBranch
-
-