Package com.atlassian.bamboo.v2.build
Class BuildIdentifierImpl
- java.lang.Object
-
- com.atlassian.bamboo.v2.build.BuildIdentifierImpl
-
- All Implemented Interfaces:
BuildIdentifier,Serializable
- Direct Known Subclasses:
BuildContextImpl
@Immutable public class BuildIdentifierImpl extends Object implements BuildIdentifier
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BuildIdentifierImpl(long planId, String planKey, String projectName, String planName, String shortName, int buildNumber)Deprecated.BuildIdentifierImpl(@NotNull BuildIdentifier buildIdentifier)BuildIdentifierImpl(@Nullable Long planId, @Nullable Long masterPlanId, String planKey, String projectName, String planName, String shortName, int buildNumber)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)intgetBuildNumber()The build number being built@NotNull StringgetBuildResultKey()Full build result key (e.g.Optional<Long>getMasterPlanId()BuildIdentifiergetParentBuildIdentifier()Optional<Long>getPlanDbId()longgetPlanId()@NotNull StringgetPlanKey()Full plan key (e.g.@NotNull StringgetPlanName()The full name of thePlan@NotNull PlanResultKeygetPlanResultKey()Gets thePlanResultKeyfor the currentBuildIdentifier@NotNull StringgetProjectName()@NotNull StringgetShortName()The short name of thePlan@NotNull PlanKeygetTypedPlanKey()Full plan key (e.g.@NotNull UUIDgetUuid()Id of the run.inthashCode()
-
-
-
Constructor Detail
-
BuildIdentifierImpl
public BuildIdentifierImpl(@NotNull @NotNull BuildIdentifier buildIdentifier)
-
BuildIdentifierImpl
@Deprecated public BuildIdentifierImpl(long planId, String planKey, String projectName, String planName, String shortName, int buildNumber)
Deprecated.
-
BuildIdentifierImpl
public BuildIdentifierImpl(@Nullable @Nullable Long planId, @Nullable @Nullable Long masterPlanId, String planKey, String projectName, String planName, String shortName, int buildNumber)- Parameters:
planId- db id of the plan or null if N/AmasterPlanId- db id of the master plan or null if this build is not a branch buildplanKey- plan keyprojectName- name of the projectplanName- full name of the planshortName- short name of the plan (without project part)buildNumber- build number
-
-
Method Detail
-
getParentBuildIdentifier
public BuildIdentifier getParentBuildIdentifier()
- Specified by:
getParentBuildIdentifierin interfaceBuildIdentifier- Returns:
- the
BuildContextof the parentPlanexecution. Should return null if the currentBuildContextis for aChain
-
getPlanId
public long getPlanId()
- Specified by:
getPlanIdin interfaceBuildIdentifier- Returns:
- Database id of the plan.
-
getPlanDbId
public Optional<Long> getPlanDbId()
- Specified by:
getPlanDbIdin interfaceBuildIdentifier- Returns:
- Id of the plan or empty if N/A.
-
getMasterPlanId
public Optional<Long> getMasterPlanId()
- Specified by:
getMasterPlanIdin interfaceBuildIdentifier- Returns:
- id of the master plan or empty if plan has no master.
-
getPlanKey
@NotNull public @NotNull String getPlanKey()
Description copied from interface:BuildIdentifierFull plan key (e.g. BAM-MAIN)- Specified by:
getPlanKeyin interfaceBuildIdentifier- Returns:
- Key for the plan BAM-MAIN
-
getTypedPlanKey
@NotNull public @NotNull PlanKey getTypedPlanKey()
Description copied from interface:BuildIdentifierFull plan key (e.g. BAM-MAIN)- Specified by:
getTypedPlanKeyin interfaceBuildIdentifier- Returns:
- Key for the plan BAM-MAIN
-
getPlanName
@NotNull public @NotNull String getPlanName()
Description copied from interface:BuildIdentifierThe full name of thePlan- Specified by:
getPlanNamein interfaceBuildIdentifier- Returns:
DescriptionProvider.getName()
-
getShortName
@NotNull public @NotNull String getShortName()
Description copied from interface:BuildIdentifierThe short name of thePlan- Specified by:
getShortNamein interfaceBuildIdentifier- Returns:
PlanIdentifier.getBuildName()
-
getBuildNumber
public int getBuildNumber()
Description copied from interface:BuildIdentifierThe build number being built- Specified by:
getBuildNumberin interfaceBuildIdentifier- Returns:
- int
-
getBuildResultKey
@NotNull public @NotNull String getBuildResultKey()
Description copied from interface:BuildIdentifierFull build result key (e.g. BAM-MAIN-100)- Specified by:
getBuildResultKeyin interfaceBuildIdentifier- Returns:
- Key for build result
-
getPlanResultKey
@NotNull public @NotNull PlanResultKey getPlanResultKey()
Description copied from interface:BuildIdentifierGets thePlanResultKeyfor the currentBuildIdentifier- Specified by:
getPlanResultKeyin interfaceBuildIdentifier- Returns:
- planResultKey
-
getProjectName
@NotNull public @NotNull String getProjectName()
- Specified by:
getProjectNamein interfaceBuildIdentifier
-
getUuid
@NotNull public @NotNull UUID getUuid()
Description copied from interface:BuildIdentifierId of the run. Allows to tell apart instances of build if a job is restarted.- Specified by:
getUuidin interfaceBuildIdentifier
-
-