Class ImmutableChainStageImpl
- java.lang.Object
-
- com.atlassian.bamboo.chains.cache.ImmutableChainStageImpl
-
- All Implemented Interfaces:
ImmutableChainStage,BambooIdProvider,ImmutableEntityWithOid,ImmutableDeletable,DescriptionProvider,NameProvider
public class ImmutableChainStageImpl extends Object implements ImmutableChainStage
-
-
Constructor Summary
Constructors Constructor Description ImmutableChainStageImpl(@NotNull ImmutableChain chain, @NotNull ChainStage mutableStage, @NotNull ImmutablePlanManager immutablePlanManager, @NotNull ImmutablePlanCacheService immutablePlanCacheService)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableChainStageImplcreateImmutableChainStageBasedOnFlatData(@NotNull ImmutableChain chain, @NotNull FlatChainStageDto stageDto, @NotNull ImmutablePlanManager immutablePlanManager, @NotNull ImmutablePlanCacheService immutablePlanCacheService, @NotNull Map<Long,List<EnrichedPlanDto>> jobsGroupedByStageId, @NotNull Map<Long,EnrichedPlanDto> jobsGroupedById, boolean isLightWeight)@NotNull ImmutableChaingetChain()Gets theChainthat the stage belongs to@NotNull Optional<Long>getDatabaseId()StringgetDescription()Get the Stage DescriptionlonggetId()Returns database id of the stage.@NotNull Set<ImmutableJob>getJobs()Gets theImmutableJobs associated with this Stage.ImmutableChainStagegetMaster()@NotNull StringgetName()Get the Stage NameBambooEntityOidgetOid()OID assigned to this object.booleanhasMaster()booleanisFinal()booleanisManual()booleanisMarkedForDeletion()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.chains.cache.ImmutableChainStage
getEntityType
-
-
-
-
Constructor Detail
-
ImmutableChainStageImpl
public ImmutableChainStageImpl(@NotNull @NotNull ImmutableChain chain, @NotNull @NotNull ChainStage mutableStage, @NotNull @NotNull ImmutablePlanManager immutablePlanManager, @NotNull @NotNull ImmutablePlanCacheService immutablePlanCacheService)
-
-
Method Detail
-
createImmutableChainStageBasedOnFlatData
public static ImmutableChainStageImpl createImmutableChainStageBasedOnFlatData(@NotNull @NotNull ImmutableChain chain, @NotNull @NotNull FlatChainStageDto stageDto, @NotNull @NotNull ImmutablePlanManager immutablePlanManager, @NotNull @NotNull ImmutablePlanCacheService immutablePlanCacheService, @NotNull @NotNull Map<Long,List<EnrichedPlanDto>> jobsGroupedByStageId, @NotNull @NotNull Map<Long,EnrichedPlanDto> jobsGroupedById, boolean isLightWeight)
-
getName
@NotNull public @NotNull String getName()
Description copied from interface:ImmutableChainStageGet the Stage Name- Specified by:
getNamein interfaceDescriptionProvider- Specified by:
getNamein interfaceImmutableChainStage- Specified by:
getNamein interfaceNameProvider- Returns:
- name
-
getDescription
public String getDescription()
Description copied from interface:ImmutableChainStageGet the Stage Description- Specified by:
getDescriptionin interfaceDescriptionProvider- Specified by:
getDescriptionin interfaceImmutableChainStage- Returns:
- description
-
isManual
public boolean isManual()
- Specified by:
isManualin interfaceImmutableChainStage
-
isFinal
public boolean isFinal()
- Specified by:
isFinalin interfaceImmutableChainStage
-
getChain
@NotNull public @NotNull ImmutableChain getChain()
Description copied from interface:ImmutableChainStageGets theChainthat the stage belongs to- Specified by:
getChainin interfaceImmutableChainStage- Returns:
- chain
-
getJobs
@NotNull public @NotNull Set<ImmutableJob> getJobs()
Description copied from interface:ImmutableChainStageGets theImmutableJobs associated with this Stage. Only deletion code will see deleted jobs.- Specified by:
getJobsin interfaceImmutableChainStage- Returns:
- jobs
-
getMaster
public ImmutableChainStage getMaster()
- Specified by:
getMasterin interfaceImmutableChainStage
-
hasMaster
public boolean hasMaster()
- Specified by:
hasMasterin interfaceImmutableChainStage
-
isMarkedForDeletion
public boolean isMarkedForDeletion()
- Specified by:
isMarkedForDeletionin interfaceImmutableDeletable- Returns:
- Whether or not the Object has been marked for deletion
-
getId
public long getId()
Description copied from interface:ImmutableChainStageReturns database id of the stage. Use ofImmutableChainStage.getDatabaseId()should be preferred.- Specified by:
getIdin interfaceBambooIdProvider- Specified by:
getIdin interfaceImmutableChainStage
-
getDatabaseId
@NotNull public @NotNull Optional<Long> getDatabaseId()
- Specified by:
getDatabaseIdin interfaceImmutableChainStage- Returns:
- database id of the stage or empty if this stage is not a DB object.
-
getOid
public BambooEntityOid getOid()
Description copied from interface:ImmutableEntityWithOidOID assigned to this object. TheBambooEntityOid.getEntityType()should be the same as this object'sImmutableEntityWithOid.getEntityType().- Specified by:
getOidin interfaceImmutableEntityWithOid
-
-