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 StringgetBuildKey()This objects specific portion of the key.@NotNull StringgetBuildName()@NotNull Optional<Long>getDatabaseId()StringgetDescription()longgetId()Returns database id of the plan.longgetMasterId()@NotNull Optional<Long>getMasterIdIfExists()@NotNull StringgetName()Returns the full name for the build in the form of "project name - build name" e.g.@NotNull PlanKeygetPlanKey()@NotNull PlanTypegetPlanType()@NotNull ProjectIdentifiergetProject()Returns the parentProjectbooleanisSuspendedFromBuilding()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:PlanIdentifierReturns database id of the plan. Use ofPlanIdentifier.getDatabaseId()should be preferred.- Specified by:
getIdin interfaceBambooIdProvider- Specified by:
getIdin interfacePlanIdentifier
-
getDatabaseId
@NotNull public @NotNull Optional<Long> getDatabaseId()
- Specified by:
getDatabaseIdin 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:
getPlanTypein interfacePlanIdentifier- Returns:
- the type of this plan
-
getPlanKey
@NotNull public @NotNull PlanKey getPlanKey()
Description copied from interface:PlanIdentifier- Specified by:
getPlanKeyin interfacePlanIdentifier- Specified by:
getPlanKeyin interfacePlanKeyProvider- Returns:
- planKey
-
getBuildKey
@NotNull public @NotNull String getBuildKey()
Description copied from interface:PlanIdentifierThis objects specific portion of the key. You probably want to usePlanIdentifier.getPlanKey().- Specified by:
getBuildKeyin interfacePlanIdentifier- Returns:
- This objects specific portion of the key
-
getName
@NotNull public @NotNull String getName()
Description copied from interface:PlanIdentifierReturns the full name for the build in the form of "project name - build name" e.g. "Confluence - HEAD"- Specified by:
getNamein interfaceDescriptionProvider- Specified by:
getNamein interfaceNameProvider- Specified by:
getNamein interfacePlanIdentifier- Returns:
- String
-
getBuildName
@NotNull public @NotNull String getBuildName()
- Specified by:
getBuildNamein 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:
getDescriptionin interfaceDescriptionProvider
-
isSuspendedFromBuilding
public boolean isSuspendedFromBuilding()
Description copied from interface:PlanIdentifierChecks if the build has been enabled / disabled.- Specified by:
isSuspendedFromBuildingin interfacePlanIdentifier- Returns:
- true if plan is disabled
-
getMasterId
public long getMasterId()
- Specified by:
getMasterIdin interfacePlanIdentifier- Returns:
- database id of master of this Plan or -1 if none.
-
getMasterIdIfExists
@NotNull public @NotNull Optional<Long> getMasterIdIfExists()
- Specified by:
getMasterIdIfExistsin interfacePlanIdentifier- Returns:
- database id of master of this Plan or empty if none.
-
getProject
@NotNull public @NotNull ProjectIdentifier getProject()
Description copied from interface:PlanIdentifierReturns the parentProject- Specified by:
getProjectin interfacePlanIdentifier- Returns:
Project. Never null
-
-