Package com.atlassian.bamboo.chains
Class ChainStageImpl
- java.lang.Object
-
- com.atlassian.core.bean.EntityObject
-
- com.atlassian.bamboo.core.BambooEntityObject
-
- com.atlassian.bamboo.core.BambooEntityWithOid
-
- com.atlassian.bamboo.hibernate.HibernateBambooEntityWithOid
-
- com.atlassian.bamboo.chains.ChainStageImpl
-
- All Implemented Interfaces:
ImmutableChainStage
,ChainStage
,BambooIdProvider
,BambooObject
,EntityWithOid
,ImmutableEntityWithOid
,Deletable
,Describable
,ImmutableDeletable
,DescriptionProvider
,NameProvider
,VersionedEntityComponent<Chain>
,Cloneable
@Entity public class ChainStageImpl extends HibernateBambooEntityWithOid implements ChainStage
-
-
Constructor Summary
Constructors Constructor Description ChainStageImpl()
ChainStageImpl(@NotNull Chain chain, @NotNull String name, String description, boolean manual)
Deprecated.since 5.13 useChainStageImpl(Chain, String, String, boolean, boolean)
ChainStageImpl(@NotNull Chain chain, @NotNull String name, String description, boolean manual, boolean finalStage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addJob(@NotNull Job job)
Adds aJob
to theChainStage
boolean
equals(Object o)
@NotNull Set<Job>
getAllJobs()
Gets theJob
s associated with this Stage, including the ones marked for deletion@NotNull Chain
getChain()
Gets theChain
that the stage belongs to@NotNull Optional<Long>
getDatabaseId()
@Nullable String
getDescription()
Get the Stage Description@NotNull Set<Job>
getJobs()
Gets theJob
s associated with this Stage, exlcuding the ones marked for deletion@Nullable ImmutableChainStage
getMaster()
@NotNull String
getName()
Get the Stage Name@Nullable Chain
getRoot()
Returns the versioned root of the object.int
hashCode()
boolean
hasMaster()
boolean
isFinal()
boolean
isManual()
boolean
isMarkedForDeletion()
boolean
removeJob(@NotNull Job job)
Removes theJob
from theChainStage
void
setAllJobs(Set<Job> jobs)
void
setChain(@NotNull Chain chain)
Sets theChain
that the stage belongs tovoid
setDescription(String description)
Set the Stage Descriptionvoid
setFinal(boolean finalStage)
void
setManual(boolean manual)
void
setMarkedForDeletion(boolean markedForDeletion)
void
setName(@NotNull String name)
Set the Stage Name-
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.core.EntityWithOid
setOid
-
Methods inherited from interface com.atlassian.bamboo.chains.cache.ImmutableChainStage
getEntityType, getId
-
Methods inherited from interface com.atlassian.bamboo.core.ImmutableEntityWithOid
getOid
-
-
-
-
Constructor Detail
-
ChainStageImpl
public ChainStageImpl()
-
ChainStageImpl
@Deprecated public ChainStageImpl(@NotNull @NotNull Chain chain, @NotNull @NotNull String name, String description, boolean manual)
Deprecated.since 5.13 useChainStageImpl(Chain, String, String, boolean, boolean)
- Parameters:
chain
-name
-description
-manual
-
-
-
Method Detail
-
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.
-
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
-
setName
public void setName(@NotNull @NotNull String name)
Description copied from interface:ChainStage
Set the Stage Name- Specified by:
setName
in interfaceChainStage
- Specified by:
setName
in interfaceDescribable
-
getDescription
@Nullable public @Nullable String getDescription()
Description copied from interface:ImmutableChainStage
Get the Stage Description- Specified by:
getDescription
in interfaceDescriptionProvider
- Specified by:
getDescription
in interfaceImmutableChainStage
- Returns:
- description
-
setDescription
public void setDescription(String description)
Description copied from interface:ChainStage
Set the Stage Description- Specified by:
setDescription
in interfaceChainStage
- Specified by:
setDescription
in interfaceDescribable
-
isMarkedForDeletion
public boolean isMarkedForDeletion()
- Specified by:
isMarkedForDeletion
in interfaceImmutableDeletable
- Returns:
- Whether or not the Object has been marked for deletion
-
setMarkedForDeletion
public void setMarkedForDeletion(boolean markedForDeletion)
- Specified by:
setMarkedForDeletion
in interfaceDeletable
-
isManual
public boolean isManual()
- Specified by:
isManual
in interfaceImmutableChainStage
-
setManual
public void setManual(boolean manual)
- Specified by:
setManual
in interfaceChainStage
-
setFinal
public void setFinal(boolean finalStage)
- Specified by:
setFinal
in interfaceChainStage
-
isFinal
public boolean isFinal()
- Specified by:
isFinal
in interfaceImmutableChainStage
-
getChain
@NotNull public @NotNull Chain getChain()
Description copied from interface:ChainStage
Gets theChain
that the stage belongs to- Specified by:
getChain
in interfaceChainStage
- Specified by:
getChain
in interfaceImmutableChainStage
- Returns:
- chain
-
setChain
public void setChain(@NotNull @NotNull Chain chain)
Description copied from interface:ChainStage
Sets theChain
that the stage belongs to- Specified by:
setChain
in interfaceChainStage
-
getJobs
@NotNull public @NotNull Set<Job> getJobs()
Description copied from interface:ChainStage
Gets theJob
s associated with this Stage, exlcuding the ones marked for deletion- Specified by:
getJobs
in interfaceChainStage
- Specified by:
getJobs
in interfaceImmutableChainStage
- Returns:
- jobs
-
getAllJobs
@NotNull public @NotNull Set<Job> getAllJobs()
Description copied from interface:ChainStage
Gets theJob
s associated with this Stage, including the ones marked for deletion- Specified by:
getAllJobs
in interfaceChainStage
- Returns:
- jobs
-
addJob
public boolean addJob(@NotNull @NotNull Job job)
Description copied from interface:ChainStage
Adds aJob
to theChainStage
- Specified by:
addJob
in interfaceChainStage
-
removeJob
public boolean removeJob(@NotNull @NotNull Job job)
Description copied from interface:ChainStage
Removes theJob
from theChainStage
- Specified by:
removeJob
in interfaceChainStage
-
getMaster
@Nullable public @Nullable ImmutableChainStage getMaster()
- Specified by:
getMaster
in interfaceImmutableChainStage
-
hasMaster
public boolean hasMaster()
- Specified by:
hasMaster
in interfaceImmutableChainStage
-
getRoot
@Nullable public @Nullable Chain getRoot()
Description copied from interface:VersionedEntityComponent
Returns the versioned root of the object.- Specified by:
getRoot
in interfaceVersionedEntityComponent<Chain>
- Returns:
- the root of the object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classcom.atlassian.core.bean.EntityObject
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classcom.atlassian.core.bean.EntityObject
-
-