public final class PlanHelper extends Object
@NotNull public static LinkedHashMap<Long,PlanRepositoryDefinition> getPlanRepositoryDefinitionMap(@NotNull ImmutablePlan plan)
public static List<PlanRepositoryDefinition> getPlanRepositoryDefinitions(@NotNull ImmutablePlan plan)
public static List<PlanRepositoryDefinition> getPlanRepositoryDefinitionsByType(@NotNull ImmutablePlan plan, @NotNull String pluginKey)
public static PlanRepositoryDefinition getPlanRepositoryDefinitionById(@NotNull ImmutablePlan plan, long id)
@Nullable public static PlanRepositoryDefinition getDefaultPlanRepositoryDefinition(@NotNull ImmutablePlan plan)
public static boolean isDefault(@NotNull
PlanRepositoryDefinition 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 - 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 ImmutableChainStage getBranchedStage(ImmutableChain chainBranch, ImmutableChainStage 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)
@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 Stream<ImmutableJob> getBranchesForJob(@NotNull CachedPlanManager cachedPlanManager, @NotNull ImmutableJob masterJob)
public 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 © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.