public final class PlanHelper extends Object
Modifier and Type | Method and Description |
---|---|
static ImmutableJob |
getBranchedImmutableJob(ImmutableChain chainBranch,
ImmutableJob masterJob)
Searches for a corresponding job in a branch.
|
static Job |
getBranchedJob(Chain chainBranch,
Job masterJob) |
static ChainStage |
getBranchedStage(Chain chainBranch,
ChainStage masterStage) |
static <T> T |
getConfigObject(BuildDefinition planDefinition,
String key,
Class<T> clazz) |
static <T> T |
getConfigObject(ImmutablePlan plan,
String key,
Class<T> clazz) |
static String |
getCurrentStatus(ImmutablePlan plan) |
static PlanRepositoryDefinition |
getDefaultPlanRepositoryDefinition(ImmutablePlan plan) |
static Repository |
getDefaultRepository(ImmutablePlan plan)
Deprecated.
since 5.14 without replacement
|
static RepositoryDefinition |
getDefaultRepositoryDefinition(ImmutablePlan plan)
Deprecated.
since 5.14 without replacement
|
static Set<PlanKey> |
getMasterAndBranchesKeys(CachedPlanManager cachedPlanManager,
PlanKey masterOrBranchKey)
Get keys of all branches and master plan.
|
static Chain |
getMasterPlan(Chain plan)
Get master plan if plan has master or passed plan otherwise.
|
static ImmutableChain |
getMasterPlan(ImmutableChain plan)
Get master plan if plan has master or passed plan otherwise.
|
static ImmutablePlan |
getMasterPlan(ImmutablePlan plan)
Get master plan if plan has master or passed plan otherwise.
|
static PlanKey |
getMasterPlanKey(ImmutablePlan plan)
Get planKey of master plan if plan has master or planKey of passed plan otherwise.
|
static long |
getPermissionPlanId(ImmutablePlan plan) |
static PlanIdentifier |
getPlanIdentifierForPermissionChecking(long id,
PlanType planType) |
static PlanRepositoryDefinition |
getPlanRepositoryDefinitionById(ImmutablePlan plan,
long id) |
static LinkedHashMap<Long,PlanRepositoryDefinition> |
getPlanRepositoryDefinitionMap(ImmutablePlan plan) |
static List<PlanRepositoryDefinition> |
getPlanRepositoryDefinitions(ImmutablePlan plan) |
static List<Repository> |
getRepositories(ImmutablePlan plan)
Deprecated.
since 5.14 without replacement
|
static RepositoryDefinition |
getRepositoryDefinitionForPlanById(ImmutablePlan plan,
long id)
Deprecated.
since 5.14 without replacement
|
static LinkedHashMap<Long,RepositoryDefinition> |
getRepositoryDefinitionMap(ImmutablePlan plan)
Deprecated.
since 5.14 without replacement
|
static List<RepositoryDefinition> |
getRepositoryDefinitions(ImmutablePlan plan)
Deprecated.
since 5.14 without replacement
|
static List<RepositoryDefinition> |
getRepositoryDefinitionsByType(ImmutablePlan plan,
String pluginKey)
Deprecated.
since 5.14 without replacement
|
static boolean |
hasMultipleBranches(CachedPlanManager cachedPlanManager,
PlanKey planKey) |
static boolean |
haveTheSameMaster(CachedPlanManager cachedPlanManager,
ImmutableChain masterOrBranchA,
ImmutableChain masterOrBranchB) |
static boolean |
haveTheSameMaster(CachedPlanManager cachedPlanManager,
PlanKey masterOrBranchKeyA,
PlanKey masterOrBranchKeyB) |
static boolean |
isDefault(PlanRepositoryDefinition repositoryDefinition) |
static boolean |
isDefault(RepositoryDefinition repositoryDefinition)
Deprecated.
since 5.14 without replacement
|
@Deprecated @NotNull public static List<Repository> getRepositories(@NotNull ImmutablePlan plan)
@Deprecated @NotNull public static LinkedHashMap<Long,RepositoryDefinition> getRepositoryDefinitionMap(@NotNull ImmutablePlan plan)
@NotNull public static LinkedHashMap<Long,PlanRepositoryDefinition> getPlanRepositoryDefinitionMap(@NotNull ImmutablePlan plan)
public static List<PlanRepositoryDefinition> getPlanRepositoryDefinitions(@NotNull ImmutablePlan plan)
@Deprecated @NotNull public static List<RepositoryDefinition> getRepositoryDefinitions(@NotNull ImmutablePlan plan)
@Deprecated @NotNull public static List<RepositoryDefinition> getRepositoryDefinitionsByType(@NotNull ImmutablePlan plan, @NotNull String pluginKey)
@Deprecated public static RepositoryDefinition getRepositoryDefinitionForPlanById(@NotNull ImmutablePlan plan, long id)
public static PlanRepositoryDefinition getPlanRepositoryDefinitionById(@NotNull ImmutablePlan plan, long id)
@Deprecated @Nullable public static RepositoryDefinition getDefaultRepositoryDefinition(@NotNull ImmutablePlan plan)
@Nullable public static PlanRepositoryDefinition getDefaultPlanRepositoryDefinition(@NotNull ImmutablePlan plan)
@Deprecated @Nullable public static Repository getDefaultRepository(@NotNull ImmutablePlan plan)
public static boolean isDefault(@NotNull PlanRepositoryDefinition repositoryDefinition)
@Deprecated public static boolean isDefault(@NotNull RepositoryDefinition repositoryDefinition)
public static String getCurrentStatus(@NotNull ImmutablePlan plan)
@NotNull public static ImmutablePlan getMasterPlan(@NotNull ImmutablePlan plan)
plan
- @NotNull public static ImmutableChain getMasterPlan(@NotNull ImmutableChain plan)
plan
- @NotNull public static Chain getMasterPlan(@NotNull Chain plan)
plan
- @NotNull public static PlanKey getMasterPlanKey(@NotNull ImmutablePlan plan)
plan
- @NotNull public static Job getBranchedJob(@NotNull Chain chainBranch, @NotNull Job masterJob)
public static ImmutableJob getBranchedImmutableJob(ImmutableChain chainBranch, ImmutableJob masterJob)
chainBranch
- branch where job has to be searchedmasterJob
- job which is to be found in a branchImmutableJob
or null if not found@NotNull public static ChainStage getBranchedStage(Chain chainBranch, ChainStage masterStage)
@Nullable public static <T> T getConfigObject(@NotNull ImmutablePlan plan, @NotNull String key, @NotNull Class<T> clazz)
@Nullable public static <T> T getConfigObject(@NotNull BuildDefinition planDefinition, @NotNull String key, @NotNull Class<T> clazz)
public static long getPermissionPlanId(ImmutablePlan plan)
public static PlanIdentifier getPlanIdentifierForPermissionChecking(long id, @NotNull PlanType planType)
@NotNull public static Set<PlanKey> getMasterAndBranchesKeys(@NotNull CachedPlanManager cachedPlanManager, @NotNull PlanKey masterOrBranchKey)
cachedPlanManager
- cachedPlanManager beanmasterOrBranchKey
- key of either master plan or one of the branches in the familypublic static boolean haveTheSameMaster(@NotNull CachedPlanManager cachedPlanManager, @NotNull PlanKey masterOrBranchKeyA, @NotNull PlanKey masterOrBranchKeyB)
public static boolean haveTheSameMaster(@NotNull CachedPlanManager cachedPlanManager, @NotNull ImmutableChain masterOrBranchA, @NotNull ImmutableChain masterOrBranchB)
public static boolean hasMultipleBranches(@NotNull CachedPlanManager cachedPlanManager, @NotNull PlanKey planKey)
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.
View cookie preferences