com.atlassian.bamboo.plan
Class PlanHelper

java.lang.Object
  extended by com.atlassian.bamboo.plan.PlanHelper

public class PlanHelper
extends java.lang.Object


Method Summary
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, java.lang.String key, java.lang.Class<T> clazz)
           
static
<T> T
getConfigObject(ImmutablePlan plan, java.lang.String key, java.lang.Class<T> clazz)
           
static java.lang.String getCurrentStatus(ImmutablePlan plan)
           
static Repository getDefaultRepository(ImmutablePlan plan)
           
static RepositoryDefinition getDefaultRepositoryDefinition(ImmutablePlan plan)
           
static long getPermissionPlanId(ImmutablePlan plan)
           
static PlanIdentifier getPlanIdentifierForPermissionChecking(long id, PlanType planType)
           
static java.util.List<Repository> getRepositories(ImmutablePlan plan)
           
static RepositoryDefinition getRepositoryDefinitionForPlanById(Plan plan, long id)
           
static java.util.LinkedHashMap<java.lang.Long,RepositoryDefinition> getRepositoryDefinitionMap(ImmutablePlan plan)
           
static java.util.List<RepositoryDefinition> getRepositoryDefinitions(ImmutablePlan plan)
           
static java.util.List<RepositoryDefinition> getRepositoryDefinitionsByType(ImmutablePlan plan, java.lang.String pluginKey)
           
static boolean isDefault(RepositoryDefinition repositoryDefinition)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRepositories

public static java.util.List<Repository> getRepositories(@NotNull
                                                         ImmutablePlan plan)

getRepositoryDefinitionMap

@NotNull
public static java.util.LinkedHashMap<java.lang.Long,RepositoryDefinition> getRepositoryDefinitionMap(@NotNull
                                                                                                              ImmutablePlan plan)

getRepositoryDefinitions

@NotNull
public static java.util.List<RepositoryDefinition> getRepositoryDefinitions(@NotNull
                                                                                    ImmutablePlan plan)

getRepositoryDefinitionsByType

@NotNull
public static java.util.List<RepositoryDefinition> getRepositoryDefinitionsByType(@NotNull
                                                                                          ImmutablePlan plan,
                                                                                          @NotNull
                                                                                          java.lang.String pluginKey)

getRepositoryDefinitionForPlanById

public static RepositoryDefinition getRepositoryDefinitionForPlanById(@NotNull
                                                                      Plan plan,
                                                                      long id)

getDefaultRepositoryDefinition

@Nullable
public static RepositoryDefinition getDefaultRepositoryDefinition(@NotNull
                                                                           ImmutablePlan plan)

getDefaultRepository

@Nullable
public static Repository getDefaultRepository(@NotNull
                                                       ImmutablePlan plan)

isDefault

public static boolean isDefault(@NotNull
                                RepositoryDefinition repositoryDefinition)

getCurrentStatus

public static java.lang.String getCurrentStatus(@NotNull
                                                ImmutablePlan plan)

getBranchedJob

@NotNull
public static Job getBranchedJob(@NotNull
                                         Chain chainBranch,
                                         @NotNull
                                         Job masterJob)

getBranchedImmutableJob

public static ImmutableJob getBranchedImmutableJob(ImmutableChain chainBranch,
                                                   ImmutableJob masterJob)
Searches for a corresponding job in a branch.

Parameters:
chainBranch - branch where job has to be searched
masterJob - job which is to be found in a branch
Returns:
ImmutableJob or null if not found

getBranchedStage

@NotNull
public static ChainStage getBranchedStage(Chain chainBranch,
                                                  ChainStage masterStage)

getConfigObject

@Nullable
public static <T> T getConfigObject(@NotNull
                                             ImmutablePlan plan,
                                             @NotNull
                                             java.lang.String key,
                                             @NotNull
                                             java.lang.Class<T> clazz)

getConfigObject

@Nullable
public static <T> T getConfigObject(@NotNull
                                             BuildDefinition planDefinition,
                                             @NotNull
                                             java.lang.String key,
                                             @NotNull
                                             java.lang.Class<T> clazz)

getPermissionPlanId

public static long getPermissionPlanId(ImmutablePlan plan)

getPlanIdentifierForPermissionChecking

public static PlanIdentifier getPlanIdentifierForPermissionChecking(long id,
                                                                    @NotNull
                                                                    PlanType planType)


Copyright © 2012 Atlassian. All Rights Reserved.