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 ImmutableChainStageImpl
createImmutableChainStageBasedOnFlatData(@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 ImmutableChain
getChain()
Gets theChain
that the stage belongs to@NotNull Optional<Long>
getDatabaseId()
String
getDescription()
Get the Stage Descriptionlong
getId()
Returns database id of the stage.@NotNull Set<ImmutableJob>
getJobs()
Gets theImmutableJob
s associated with this Stage.ImmutableChainStage
getMaster()
@NotNull String
getName()
Get the Stage NameBambooEntityOid
getOid()
OID assigned to this object.boolean
hasMaster()
boolean
isFinal()
boolean
isManual()
boolean
isMarkedForDeletion()
-
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:ImmutableChainStage
Get the Stage Name- Specified by:
getName
in interfaceDescriptionProvider
- Specified by:
getName
in interfaceImmutableChainStage
- Specified by:
getName
in interfaceNameProvider
- Returns:
- name
-
getDescription
public String getDescription()
Description copied from interface:ImmutableChainStage
Get the Stage Description- Specified by:
getDescription
in interfaceDescriptionProvider
- Specified by:
getDescription
in interfaceImmutableChainStage
- Returns:
- description
-
isManual
public boolean isManual()
- Specified by:
isManual
in interfaceImmutableChainStage
-
isFinal
public boolean isFinal()
- Specified by:
isFinal
in interfaceImmutableChainStage
-
getChain
@NotNull public @NotNull ImmutableChain getChain()
Description copied from interface:ImmutableChainStage
Gets theChain
that the stage belongs to- Specified by:
getChain
in interfaceImmutableChainStage
- Returns:
- chain
-
getJobs
@NotNull public @NotNull Set<ImmutableJob> getJobs()
Description copied from interface:ImmutableChainStage
Gets theImmutableJob
s associated with this Stage. Only deletion code will see deleted jobs.- Specified by:
getJobs
in interfaceImmutableChainStage
- Returns:
- jobs
-
getMaster
public ImmutableChainStage getMaster()
- Specified by:
getMaster
in interfaceImmutableChainStage
-
hasMaster
public boolean hasMaster()
- Specified by:
hasMaster
in interfaceImmutableChainStage
-
isMarkedForDeletion
public boolean isMarkedForDeletion()
- Specified by:
isMarkedForDeletion
in interfaceImmutableDeletable
- Returns:
- Whether or not the Object has been marked for deletion
-
getId
public long getId()
Description copied from interface:ImmutableChainStage
Returns database id of the stage. Use ofImmutableChainStage.getDatabaseId()
should be preferred.- Specified by:
getId
in interfaceBambooIdProvider
- Specified by:
getId
in interfaceImmutableChainStage
-
getDatabaseId
@NotNull public @NotNull Optional<Long> getDatabaseId()
- Specified by:
getDatabaseId
in 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:ImmutableEntityWithOid
OID assigned to this object. TheBambooEntityOid.getEntityType()
should be the same as this object'sImmutableEntityWithOid.getEntityType()
.- Specified by:
getOid
in interfaceImmutableEntityWithOid
-
-