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 boolean
equals(Object obj)
int
getBuildNumber()
The build number being built@NotNull String
getBuildResultKey()
Full build result key (e.g.Optional<Long>
getMasterPlanId()
BuildIdentifier
getParentBuildIdentifier()
Optional<Long>
getPlanDbId()
long
getPlanId()
@NotNull String
getPlanKey()
Full plan key (e.g.@NotNull String
getPlanName()
The full name of thePlan
@NotNull PlanResultKey
getPlanResultKey()
Gets thePlanResultKey
for the currentBuildIdentifier
@NotNull String
getProjectName()
@NotNull String
getShortName()
The short name of thePlan
@NotNull PlanKey
getTypedPlanKey()
Full plan key (e.g.@NotNull UUID
getUuid()
Id of the run.int
hashCode()
-
-
-
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:
getParentBuildIdentifier
in interfaceBuildIdentifier
- Returns:
- the
BuildContext
of the parentPlan
execution. Should return null if the currentBuildContext
is for aChain
-
getPlanId
public long getPlanId()
- Specified by:
getPlanId
in interfaceBuildIdentifier
- Returns:
- Database id of the plan.
-
getPlanDbId
public Optional<Long> getPlanDbId()
- Specified by:
getPlanDbId
in interfaceBuildIdentifier
- Returns:
- Id of the plan or empty if N/A.
-
getMasterPlanId
public Optional<Long> getMasterPlanId()
- Specified by:
getMasterPlanId
in interfaceBuildIdentifier
- Returns:
- id of the master plan or empty if plan has no master.
-
getPlanKey
@NotNull public @NotNull String getPlanKey()
Description copied from interface:BuildIdentifier
Full plan key (e.g. BAM-MAIN)- Specified by:
getPlanKey
in interfaceBuildIdentifier
- Returns:
- Key for the plan BAM-MAIN
-
getTypedPlanKey
@NotNull public @NotNull PlanKey getTypedPlanKey()
Description copied from interface:BuildIdentifier
Full plan key (e.g. BAM-MAIN)- Specified by:
getTypedPlanKey
in interfaceBuildIdentifier
- Returns:
- Key for the plan BAM-MAIN
-
getPlanName
@NotNull public @NotNull String getPlanName()
Description copied from interface:BuildIdentifier
The full name of thePlan
- Specified by:
getPlanName
in interfaceBuildIdentifier
- Returns:
DescriptionProvider.getName()
-
getShortName
@NotNull public @NotNull String getShortName()
Description copied from interface:BuildIdentifier
The short name of thePlan
- Specified by:
getShortName
in interfaceBuildIdentifier
- Returns:
PlanIdentifier.getBuildName()
-
getBuildNumber
public int getBuildNumber()
Description copied from interface:BuildIdentifier
The build number being built- Specified by:
getBuildNumber
in interfaceBuildIdentifier
- Returns:
- int
-
getBuildResultKey
@NotNull public @NotNull String getBuildResultKey()
Description copied from interface:BuildIdentifier
Full build result key (e.g. BAM-MAIN-100)- Specified by:
getBuildResultKey
in interfaceBuildIdentifier
- Returns:
- Key for build result
-
getPlanResultKey
@NotNull public @NotNull PlanResultKey getPlanResultKey()
Description copied from interface:BuildIdentifier
Gets thePlanResultKey
for the currentBuildIdentifier
- Specified by:
getPlanResultKey
in interfaceBuildIdentifier
- Returns:
- planResultKey
-
getProjectName
@NotNull public @NotNull String getProjectName()
- Specified by:
getProjectName
in interfaceBuildIdentifier
-
getUuid
@NotNull public @NotNull UUID getUuid()
Description copied from interface:BuildIdentifier
Id of the run. Allows to tell apart instances of build if a job is restarted.- Specified by:
getUuid
in interfaceBuildIdentifier
-
-