com.atlassian.bamboo.chains.cache
Class ImmutableChainStageImpl

java.lang.Object
  extended by com.atlassian.bamboo.chains.cache.ImmutableChainStageImpl
All Implemented Interfaces:
ImmutableChainStage, ChainStage, BambooIdProvider, BambooObject, Deletable, Describable, ImmutableDeletable, DescriptionProvider, NameProvider

public class ImmutableChainStageImpl
extends java.lang.Object
implements ChainStage


Constructor Summary
ImmutableChainStageImpl(Chain chain, ChainStage chainStage, ImmutablePlanManager immutablePlanManager)
           
 
Method Summary
 boolean addJob(Job job)
          Adds a Job to the ChainStage
protected  void exceptionOnModification()
           
 java.util.Collection<Job> getAllJobs()
          Gets the Jobs associated with this Stage, including the ones marked for deletion
 Chain getChain()
          Gets the Chain that the stage belongs to
 java.lang.String getDescription()
          Get the Stage Description
 long getId()
           
 java.util.Set<Job> getJobs()
          Gets the Jobs associated with this Stage, exlcuding the ones marked for deletion
 ChainStage getMaster()
           
 java.lang.String getName()
          Get the Stage Name
 boolean hasMaster()
           
 boolean isManual()
           
 boolean isMarkedForDeletion()
           
 boolean removeJob(Job job)
          Removes the Job from the ChainStage
 void setChain(Chain chain)
          Sets the Chain that the stage belongs to
 void setDescription(java.lang.String description)
          Set the Stage Description
 void setId(long id)
           
 void setManual(boolean manual)
           
 void setMarkedForDeletion(boolean markedForDeletion)
           
 void setName(java.lang.String name)
          Set the Stage Name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImmutableChainStageImpl

public ImmutableChainStageImpl(@NotNull
                               Chain chain,
                               @NotNull
                               ChainStage chainStage,
                               @NotNull
                               ImmutablePlanManager immutablePlanManager)
Method Detail

getName

@NotNull
public java.lang.String getName()
Description copied from interface: ImmutableChainStage
Get the Stage Name

Specified by:
getName in interface ImmutableChainStage
Specified by:
getName in interface DescriptionProvider
Specified by:
getName in interface NameProvider
Returns:
name

setName

public void setName(@NotNull
                    java.lang.String name)
Description copied from interface: ChainStage
Set the Stage Name

Specified by:
setName in interface ChainStage
Specified by:
setName in interface Describable

getDescription

public java.lang.String getDescription()
Description copied from interface: ImmutableChainStage
Get the Stage Description

Specified by:
getDescription in interface ImmutableChainStage
Specified by:
getDescription in interface DescriptionProvider
Returns:
description

setDescription

public void setDescription(@NotNull
                           java.lang.String description)
Description copied from interface: ChainStage
Set the Stage Description

Specified by:
setDescription in interface ChainStage
Specified by:
setDescription in interface Describable

isManual

public boolean isManual()
Specified by:
isManual in interface ImmutableChainStage

setManual

public void setManual(boolean manual)
Specified by:
setManual in interface ChainStage

getChain

@NotNull
public Chain getChain()
Description copied from interface: ChainStage
Gets the Chain that the stage belongs to

Specified by:
getChain in interface ImmutableChainStage
Specified by:
getChain in interface ChainStage
Returns:
chain

setChain

public void setChain(@NotNull
                     Chain chain)
Description copied from interface: ChainStage
Sets the Chain that the stage belongs to

Specified by:
setChain in interface ChainStage

getJobs

@NotNull
public java.util.Set<Job> getJobs()
Description copied from interface: ChainStage
Gets the Jobs associated with this Stage, exlcuding the ones marked for deletion

Specified by:
getJobs in interface ImmutableChainStage
Specified by:
getJobs in interface ChainStage
Returns:
jobs

getAllJobs

@NotNull
public java.util.Collection<Job> getAllJobs()
Description copied from interface: ChainStage
Gets the Jobs associated with this Stage, including the ones marked for deletion

Specified by:
getAllJobs in interface ChainStage
Returns:
jobs

addJob

public boolean addJob(@NotNull
                      Job job)
Description copied from interface: ChainStage
Adds a Job to the ChainStage

Specified by:
addJob in interface ChainStage

removeJob

public boolean removeJob(@NotNull
                         Job job)
Description copied from interface: ChainStage
Removes the Job from the ChainStage

Specified by:
removeJob in interface ChainStage

getMaster

public ChainStage getMaster()
Specified by:
getMaster in interface ImmutableChainStage

hasMaster

public boolean hasMaster()
Specified by:
hasMaster in interface ImmutableChainStage

isMarkedForDeletion

public boolean isMarkedForDeletion()
Specified by:
isMarkedForDeletion in interface ImmutableDeletable
Returns:
Whether or not the Object has been marked for deletion

setMarkedForDeletion

public void setMarkedForDeletion(boolean markedForDeletion)
Specified by:
setMarkedForDeletion in interface Deletable

getId

public long getId()
Specified by:
getId in interface BambooIdProvider

setId

public void setId(long id)
Specified by:
setId in interface BambooObject

exceptionOnModification

protected void exceptionOnModification()


Copyright © 2012 Atlassian. All Rights Reserved.