com.atlassian.bamboo.plan.branch
Class ChainBranchImpl

java.lang.Object
  extended by com.atlassian.core.bean.EntityObject
      extended by com.atlassian.bamboo.core.BambooEntityObject
          extended by com.atlassian.bamboo.plan.AbstractPlan
              extended by com.atlassian.bamboo.plan.AbstractChain
                  extended by com.atlassian.bamboo.plan.branch.ChainBranchImpl
All Implemented Interfaces:
Chain, BambooIdProvider, BambooObject, Deletable, Describable, ChainBranch, ChainBranchIdentifier, ImmutableChain, ImmutableChainBranch, ImmutableDeletable, ImmutablePlan, Plan, PlanIdentifier, DescriptionProvider, NameProvider, java.lang.Cloneable, java.lang.Comparable<Plan>

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 class com.atlassian.bamboo.core.BambooEntityObject
id
 
Fields inherited from interface com.atlassian.bamboo.plan.cache.ImmutablePlan
MAX_NUMBER_LOG_ENTRIES, MAX_PREVIOUS_BUILD_FOR_AVE, STATUS_CURRENTLY_BUILDING, STATUS_FAIL, STATUS_NO_BUILDS, STATUS_NOT_RUN, STATUS_SUCCESS
 
Constructor Summary
ChainBranchImpl()
           
 
Method Summary
static java.util.List<RepositoryDefinition> createEffectiveRepositoryDefinitions(java.util.List<RepositoryDefinition> branchRepositories, java.util.List<RepositoryDefinition> masterRepositories, BranchSpecificConfiguration bsc)
           
 BranchCommitInformation getCommitInformation()
           
 java.util.List<RepositoryDefinition> getEffectiveRepositoryDefinitions()
          Return list of repositories available to the chain.
 java.lang.String getLinkedJiraIssue()
          Branches can be linked to a specific jira issue.
 Chain getMaster()
          Return the master plan if one exists.
 NotificationSet getNotificationSet()
          Get notifications defined for this plan.
 PlanType getPlanType()
           
 boolean isRemoteJiraLinkRequired()
          Stores whether a JIRA Issue exists but the remote issue link has not successfully been created for this branch
 void setCommitInformation(BranchCommitInformation commitInformation)
           
 void setLinkedJiraIssue(java.lang.String linkedJiraIssue)
           
 void setMaster(Plan master)
          Set which plan is the master of this plan.
 void setRemoteJiraLinkRequired(boolean remoteJiraIssueLinkRequired)
           
 
Methods inherited from class com.atlassian.bamboo.plan.AbstractChain
addNewStage, addStage, containsStage, getAllJobs, getAllStages, getAverageBuildDuration, getCurrentStatus, getJobCount, getLastResultKey, getNotificationSetField, getStages, isActive, isExecuting, removeStage, setAllStages, setChainExecutionManager, setNotificationSet, setRepositoryDefinitionManager, validateBuild
 
Methods inherited from class com.atlassian.bamboo.plan.AbstractPlan
compareTo, equals, getBuildDefinition, getBuildDefinitionXml, getBuildKey, getBuildLogger, getBuildName, getDescription, getDiscriminator, getEffectiveVariables, getFirstBuildNumber, getKey, getLabellings, getLabelNames, getLastBuildNumber, getLatestResultsSummary, getMasterId, getName, getNextBuildNumber, getPlanKey, getProject, getRelatedLabellings, getTestClasses, getType, getVariables, hashCode, hasMaster, isBusy, isMarkedForDeletion, isSuspendedFromBuilding, setBuildDefinitionManager, setBuildDefinitionXml, setBuildKey, setBuildLoggerManager, setBuildName, setDescription, setDiscriminator, setFirstBuildNumber, setKey, setLabellings, setLabelManager, setLastBuildNumber, setMarkedForDeletion, setName, setNextBuildNumber, setPlanExecutionManager, setPlanKey, setProject, setResultsSummaryManager, setSuspendedFromBuilding, setTaskManager, setTestClasses, setVariableDefinitionManager
 
Methods inherited from class com.atlassian.bamboo.core.BambooEntityObject
getId, setId
 
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.chains.Chain
addNewStage, addStage, getAllJobs, getAllStages, getStages, removeStage, setNotificationSet
 
Methods inherited from interface com.atlassian.bamboo.plan.Plan
getLabellings, getRelatedLabellings, setBuildDefinitionXml, setBuildKey, setBuildName, setFirstBuildNumber, setKey, setLabellings, setLastBuildNumber, setNextBuildNumber, setPlanKey, setProject, setSuspendedFromBuilding, validateBuild
 
Methods inherited from interface com.atlassian.bamboo.Describable
setDescription, setName
 
Methods inherited from interface com.atlassian.bamboo.deletion.Deletable
setMarkedForDeletion
 
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
 
Methods inherited from interface com.atlassian.bamboo.plan.cache.ImmutableDeletable
isMarkedForDeletion
 
Methods inherited from interface com.atlassian.bamboo.plan.cache.ImmutableChain
containsStage, getJobCount, getLastResultKey
 
Methods inherited from interface com.atlassian.bamboo.plan.cache.ImmutablePlan
getAverageBuildDuration, getBuildDefinition, getBuildDefinitionXml, getBuildLogger, getCurrentStatus, getEffectiveVariables, getFirstBuildNumber, getKey, getLabelNames, getLastBuildNumber, getLatestResultsSummary, getNextBuildNumber, getProject, getType, getVariables, hasMaster, isActive, isBusy, isExecuting, isMarkedForDeletion
 

Constructor Detail

ChainBranchImpl

public ChainBranchImpl()
Method Detail

getMaster

@NotNull
public 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 interface Chain
Specified by:
getMaster in interface ImmutablePlan
Overrides:
getMaster in class AbstractChain
Returns:
the master Plan if one exists.

getPlanType

@NotNull
public PlanType getPlanType()
Specified by:
getPlanType in interface PlanIdentifier
Returns:
the type of this plan

setCommitInformation

public void setCommitInformation(@Nullable
                                 BranchCommitInformation commitInformation)
Specified by:
setCommitInformation in interface ChainBranch

getCommitInformation

public BranchCommitInformation getCommitInformation()
Specified by:
getCommitInformation in interface ImmutableChainBranch

getLinkedJiraIssue

public java.lang.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 interface ChainBranchIdentifier
Returns:

setLinkedJiraIssue

public void setLinkedJiraIssue(java.lang.String linkedJiraIssue)
Specified by:
setLinkedJiraIssue in interface ChainBranch

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 interface ChainBranchIdentifier
Returns:
true if a remote issue link has not yet been created.

setRemoteJiraLinkRequired

public void setRemoteJiraLinkRequired(boolean remoteJiraIssueLinkRequired)
Specified by:
setRemoteJiraLinkRequired in interface ChainBranch

getEffectiveRepositoryDefinitions

@NotNull
public java.util.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 overriden by a private copy of default repository.

Specified by:
getEffectiveRepositoryDefinitions in interface ImmutableChain
Overrides:
getEffectiveRepositoryDefinitions in class AbstractChain
Returns:
ordered List of repositories available to this plan

createEffectiveRepositoryDefinitions

public static java.util.List<RepositoryDefinition> createEffectiveRepositoryDefinitions(java.util.List<RepositoryDefinition> branchRepositories,
                                                                                        java.util.List<RepositoryDefinition> masterRepositories,
                                                                                        BranchSpecificConfiguration bsc)

getNotificationSet

public NotificationSet getNotificationSet()
Description copied from interface: ImmutableChain
Get notifications defined for this plan.

Specified by:
getNotificationSet in interface ImmutableChain
Overrides:
getNotificationSet in class AbstractChain
Returns:
NotificationSet containing notifications for this plan.

setMaster

public void setMaster(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 interface ChainBranch
Specified by:
setMaster in interface Plan


Copyright © 2012 Atlassian. All Rights Reserved.