com.atlassian.bamboo.ww2.actions.build.admin.create
Class UIConfigBeanImpl

java.lang.Object
  extended by com.atlassian.bamboo.ww2.actions.build.admin.create.UIConfigBeanImpl
All Implemented Interfaces:
UIConfigBean, UIConfigSupport

public class UIConfigBeanImpl
extends java.lang.Object
implements UIConfigBean

Default implementation of UIConfigSupport.


Constructor Summary
UIConfigBeanImpl(WebRepositoryViewerManager webRepositoryViewerManager, BuildStrategyManager buildStrategyManager, RepositoryManager repositoryManager, ProjectManager projectManager, BambooLicenseManager bambooLicenseManager, PlanManager planManager, JdkManager jdkManager, TaskManager taskManager, com.opensymphony.xwork.TextProvider textProvider, RepositoryDefinitionManager repositoryDefinitionManager)
           
 
Method Summary
 int getAllowedNumberOfPlans()
           
 java.util.List<RepositoryData> getAvailableGlobalRepositories(ImmutablePlan plan, java.lang.String selectedRepository)
          Returns selection of the global repositories.
 java.util.Collection<BuildStrategy> getBuildStrategies()
           
 java.util.Collection<BuildStrategy> getBuildStrategies(boolean sourceControlUsed)
           
 java.util.Collection<BuildStrategy> getBuildStrategiesForCreate(boolean sourceControlUsed)
           
 java.util.Collection<BuildTriggerCondition> getBuildTriggerConditions()
           
 int getCurrentPlanCount()
           
 java.lang.String getDefaultJdkLabel()
           
 java.util.List<java.lang.String> getExecutableLabels(java.lang.String shortKey)
           
 java.util.Map<java.lang.String,java.lang.String> getExecutableLabelTypeMap()
           
 java.util.Collection<Project> getExistingProjects()
           
 java.util.Collection<NameValuePair> getFilterOptions()
           
 java.lang.String getFirstProjectKey()
           
 java.util.List<java.lang.String> getJdkLabels()
          Gets a Collection of all JDK labels available in the system.
 java.util.List<Pair<java.lang.String,java.lang.String>> getPollingTypes()
           
 java.util.List<Repository> getRepositories()
           
 java.util.List<RepositoryOption> getRepositoriesForAdding(ImmutablePlan plan, java.lang.String selectedRepository)
          Returns selection of the repository for 'Add/Edit Repository' actions.
 java.util.List<RepositoryOption> getRepositoriesForCreate()
           
 java.util.List<StandaloneRepository> getStandaloneRepositories()
           
 java.util.Collection<BuildStrategy> getTriggerTypes(java.lang.Class<? extends Triggerable> triggerableType)
           
 java.util.Collection<BuildStrategy> getTriggerTypes(java.lang.Class<? extends Triggerable> triggerableType, boolean sourceControlUsed)
           
 java.lang.String getWebRepositoryJson()
           
 java.util.List<WebRepositoryViewer> getWebRepositoryViewers()
           
 boolean isJdkLabelValid(java.lang.String label)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UIConfigBeanImpl

public UIConfigBeanImpl(WebRepositoryViewerManager webRepositoryViewerManager,
                        BuildStrategyManager buildStrategyManager,
                        RepositoryManager repositoryManager,
                        ProjectManager projectManager,
                        BambooLicenseManager bambooLicenseManager,
                        PlanManager planManager,
                        JdkManager jdkManager,
                        TaskManager taskManager,
                        com.opensymphony.xwork.TextProvider textProvider,
                        RepositoryDefinitionManager repositoryDefinitionManager)
Method Detail

getCurrentPlanCount

public int getCurrentPlanCount()
Specified by:
getCurrentPlanCount in interface UIConfigSupport
Returns:
the current count of plans on this instance

getAllowedNumberOfPlans

public int getAllowedNumberOfPlans()
Specified by:
getAllowedNumberOfPlans in interface UIConfigSupport
Returns:
the number of plans that are allowed on this instance

getExistingProjects

@NotNull
public java.util.Collection<Project> getExistingProjects()
Specified by:
getExistingProjects in interface UIConfigSupport
Returns:
a list of all existing projects in the bamboo system.

getFirstProjectKey

@Nullable
public java.lang.String getFirstProjectKey()
Specified by:
getFirstProjectKey in interface UIConfigSupport

getWebRepositoryViewers

@NotNull
public java.util.List<WebRepositoryViewer> getWebRepositoryViewers()
Specified by:
getWebRepositoryViewers in interface UIConfigSupport
Returns:
a list of all currently enabled web repository viewers

getBuildStrategies

@NotNull
public java.util.Collection<BuildStrategy> getBuildStrategies()
Specified by:
getBuildStrategies in interface UIConfigSupport
Returns:
a list of all the different build strategies available to the user to select from.

getBuildStrategies

@NotNull
public java.util.Collection<BuildStrategy> getBuildStrategies(boolean sourceControlUsed)
Specified by:
getBuildStrategies in interface UIConfigSupport
Parameters:
sourceControlUsed - iff true result will include strategies implementing RepositoryAwareBuildStrategy

getBuildStrategiesForCreate

@NotNull
public java.util.Collection<BuildStrategy> getBuildStrategiesForCreate(boolean sourceControlUsed)
Specified by:
getBuildStrategiesForCreate in interface UIConfigBean
Specified by:
getBuildStrategiesForCreate in interface UIConfigSupport
Parameters:
sourceControlUsed - iff true result will include strategies implementing RepositoryAwareBuildStrategy
Returns:

getTriggerTypes

@NotNull
public java.util.Collection<BuildStrategy> getTriggerTypes(@NotNull
                                                                   java.lang.Class<? extends Triggerable> triggerableType)
Specified by:
getTriggerTypes in interface UIConfigSupport
Returns:
triggers usable with specified triggerable class

getTriggerTypes

@NotNull
public java.util.Collection<BuildStrategy> getTriggerTypes(@NotNull
                                                                   java.lang.Class<? extends Triggerable> triggerableType,
                                                                   boolean sourceControlUsed)
Specified by:
getTriggerTypes in interface UIConfigSupport
sourceControlUsed - iff true result will include strategies implementing RepositoryAwareBuildStrategy
Returns:
triggers usable with specified triggerable class

getBuildTriggerConditions

@NotNull
public java.util.Collection<BuildTriggerCondition> getBuildTriggerConditions()
Specified by:
getBuildTriggerConditions in interface UIConfigSupport
Returns:
a list of currently available build trigger condition plugins.

getFilterOptions

@NotNull
public java.util.Collection<NameValuePair> getFilterOptions()
Specified by:
getFilterOptions in interface UIConfigSupport
Returns:
a list of change detection filter options. Filter options let you include or exclude files from triggering change detection

getRepositoriesForCreate

@NotNull
public java.util.List<RepositoryOption> getRepositoriesForCreate()
Returns:
a list of all Repository plugins currently enabled in Bamboo and additionally option for none

getRepositories

@NotNull
public java.util.List<Repository> getRepositories()
Specified by:
getRepositories in interface UIConfigSupport
Returns:
a list of all Repository plugins currently enabled in Bamboo

getStandaloneRepositories

@NotNull
public java.util.List<StandaloneRepository> getStandaloneRepositories()
Specified by:
getStandaloneRepositories in interface UIConfigSupport
Returns:
a list of all StandaloneRepository plugins currently enabled in Bamboo

getExecutableLabelTypeMap

@NotNull
public java.util.Map<java.lang.String,java.lang.String> getExecutableLabelTypeMap()
Specified by:
getExecutableLabelTypeMap in interface UIConfigSupport
Returns:
the total set of executable maps (sorted by the label).

getExecutableLabels

@NotNull
public java.util.List<java.lang.String> getExecutableLabels(@NotNull
                                                                    java.lang.String shortKey)
Specified by:
getExecutableLabels in interface UIConfigSupport

getWebRepositoryJson

public java.lang.String getWebRepositoryJson()
                                      throws java.lang.Exception
Specified by:
getWebRepositoryJson in interface UIConfigSupport
Throws:
java.lang.Exception

getPollingTypes

public java.util.List<Pair<java.lang.String,java.lang.String>> getPollingTypes()
Specified by:
getPollingTypes in interface UIConfigSupport

getJdkLabels

@NotNull
public java.util.List<java.lang.String> getJdkLabels()
Gets a Collection of all JDK labels available in the system.

Specified by:
getJdkLabels in interface UIConfigSupport
Returns:

isJdkLabelValid

public boolean isJdkLabelValid(@Nullable
                               java.lang.String label)
Specified by:
isJdkLabelValid in interface UIConfigSupport

getDefaultJdkLabel

public java.lang.String getDefaultJdkLabel()
Specified by:
getDefaultJdkLabel in interface UIConfigSupport

getAvailableGlobalRepositories

@NotNull
public java.util.List<RepositoryData> getAvailableGlobalRepositories(@Nullable
                                                                             ImmutablePlan plan,
                                                                             @Nullable
                                                                             java.lang.String selectedRepository)
Returns selection of the global repositories. If Plan is not null, the return list does not include repositories already attached to a plan, except for the one that is currently selected.

Parameters:
plan -
selectedRepository - key (id) of currently selected repository
Returns:

getRepositoriesForAdding

@NotNull
public java.util.List<RepositoryOption> getRepositoriesForAdding(@Nullable
                                                                         ImmutablePlan plan,
                                                                         @Nullable
                                                                         java.lang.String selectedRepository)
Returns selection of the repository for 'Add/Edit Repository' actions. The returned list contains: - selection of repository types for creating new repository - global repositories that can be attached to plan, as provided by getAvailableGlobalRepositories(ImmutablePlan, String)

Parameters:
plan -
selectedRepository - key (id) of currently selected repository
Returns:


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.