Package com.atlassian.bamboo.plan
Class PlanIdentifierImpl
- java.lang.Object
-
- com.atlassian.bamboo.plan.PlanIdentifierImpl
-
- All Implemented Interfaces:
BambooIdProvider
,PlanIdentifier
,PlanKeyProvider
,DescriptionProvider
,NameProvider
- Direct Known Subclasses:
ChainBranchIdentifierImpl
public class PlanIdentifierImpl extends Object implements PlanIdentifier
-
-
Field Summary
-
Fields inherited from interface com.atlassian.bamboo.plan.PlanIdentifier
NAME_DELIMITER
-
Fields inherited from interface com.atlassian.bamboo.plan.PlanKeyProvider
getPlanKey
-
-
Constructor Summary
Constructors Constructor Description PlanIdentifierImpl(PlanIdentifier plan)
PlanIdentifierImpl(Long id, String discriminator, PlanKey planKey, String description, String buildName, String buildKey, boolean suspendedFromBuilding, long projectId, String projectKey, String projectName, String projectDescription, Long masterId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull String
getBuildKey()
This objects specific portion of the key.@NotNull String
getBuildName()
@NotNull Optional<Long>
getDatabaseId()
String
getDescription()
long
getId()
Returns database id of the plan.long
getMasterId()
@NotNull Optional<Long>
getMasterIdIfExists()
@NotNull String
getName()
Returns the full name for the build in the form of "project name - build name" e.g.@NotNull PlanKey
getPlanKey()
@NotNull PlanType
getPlanType()
@NotNull ProjectIdentifier
getProject()
Returns the parentProject
boolean
isSuspendedFromBuilding()
Checks if the build has been enabled / disabled.
-
-
-
Constructor Detail
-
PlanIdentifierImpl
public PlanIdentifierImpl(Long id, String discriminator, PlanKey planKey, String description, String buildName, String buildKey, boolean suspendedFromBuilding, long projectId, String projectKey, String projectName, String projectDescription, Long masterId)
-
PlanIdentifierImpl
public PlanIdentifierImpl(PlanIdentifier plan)
-
-
Method Detail
-
getId
public long getId()
Description copied from interface:PlanIdentifier
Returns database id of the plan. Use ofPlanIdentifier.getDatabaseId()
should be preferred.- Specified by:
getId
in interfaceBambooIdProvider
- Specified by:
getId
in interfacePlanIdentifier
-
getDatabaseId
@NotNull public @NotNull Optional<Long> getDatabaseId()
- Specified by:
getDatabaseId
in interfacePlanIdentifier
- Returns:
- database id of the plan or empty if this plan is not a DB object.
-
getPlanType
@NotNull public @NotNull PlanType getPlanType()
- Specified by:
getPlanType
in interfacePlanIdentifier
- Returns:
- the type of this plan
-
getPlanKey
@NotNull public @NotNull PlanKey getPlanKey()
Description copied from interface:PlanIdentifier
- Specified by:
getPlanKey
in interfacePlanIdentifier
- Specified by:
getPlanKey
in interfacePlanKeyProvider
- Returns:
- planKey
-
getBuildKey
@NotNull public @NotNull String getBuildKey()
Description copied from interface:PlanIdentifier
This objects specific portion of the key. You probably want to usePlanIdentifier.getPlanKey()
.- Specified by:
getBuildKey
in interfacePlanIdentifier
- Returns:
- This objects specific portion of the key
-
getName
@NotNull public @NotNull String getName()
Description copied from interface:PlanIdentifier
Returns the full name for the build in the form of "project name - build name" e.g. "Confluence - HEAD"- Specified by:
getName
in interfaceDescriptionProvider
- Specified by:
getName
in interfaceNameProvider
- Specified by:
getName
in interfacePlanIdentifier
- Returns:
- String
-
getBuildName
@NotNull public @NotNull String getBuildName()
- Specified by:
getBuildName
in interfacePlanIdentifier
- Returns:
- The plan specific portion of the name (without the project and/or parent's names). You probably want to use
PlanIdentifier.getName()
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceDescriptionProvider
-
isSuspendedFromBuilding
public boolean isSuspendedFromBuilding()
Description copied from interface:PlanIdentifier
Checks if the build has been enabled / disabled.- Specified by:
isSuspendedFromBuilding
in interfacePlanIdentifier
- Returns:
- true if plan is disabled
-
getMasterId
public long getMasterId()
- Specified by:
getMasterId
in interfacePlanIdentifier
- Returns:
- database id of master of this Plan or -1 if none.
-
getMasterIdIfExists
@NotNull public @NotNull Optional<Long> getMasterIdIfExists()
- Specified by:
getMasterIdIfExists
in interfacePlanIdentifier
- Returns:
- database id of master of this Plan or empty if none.
-
getProject
@NotNull public @NotNull ProjectIdentifier getProject()
Description copied from interface:PlanIdentifier
Returns the parentProject
- Specified by:
getProject
in interfacePlanIdentifier
- Returns:
Project
. Never null
-
-