com.atlassian.bamboo.build.creation
Class RepositoryConfigHelper

java.lang.Object
  extended by com.atlassian.bamboo.build.creation.RepositoryConfigHelper
All Implemented Interfaces:
PlanConfigHelper

public class RepositoryConfigHelper
extends java.lang.Object
implements PlanConfigHelper


Constructor Summary
RepositoryConfigHelper(RepositoryManager repositoryManager, com.opensymphony.xwork.TextProvider textProvider, RepositoryDefinitionManager repositoryDefinitionManager)
           
 
Method Summary
 void addDefaultsToConfig(BuildConfiguration buildConfiguration)
          Adds default values for all possible selections, esp preparing for display on the UI
 void cleanConfig(BuildConfiguration buildConfiguration)
          Cleans out any data from the build config, not required by the selected option.
 java.util.List<PlanRepositoryLink> extractRepositoriesFromConfiguration(BuildConfiguration buildConfiguration, Plan plan)
          Deprecated. since 3.3 to be removed as soon as possible - created only as temporary hack to make plan creation work
static java.util.Map<java.lang.Long,java.lang.String> getRepositoriesForWorkingDirSelection(Job job)
          Scans checkout tasks for repositories that define their source directory.
 void performPostActionsOnConfig(BuildConfiguration buildConfiguration, Plan plan)
          Performs any miscellaneous actions required before saving the plan.
 void prepareConfig(BuildConfiguration buildConfiguration)
          Prepare the build configuration for validation.
static org.apache.commons.configuration.XMLConfiguration prepareXmlConfiguration(Repository repository, WebRepositoryViewer webRepositoryViewer)
           
static java.lang.String prepareXmlConfigurationString(Repository repository, WebRepositoryViewer webRepositoryViewer)
           
 void validateConfig(com.opensymphony.xwork.ValidationAware validationAware, BuildConfiguration buildConfiguration)
          Validates the configuration for a plan.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepositoryConfigHelper

public RepositoryConfigHelper(RepositoryManager repositoryManager,
                              com.opensymphony.xwork.TextProvider textProvider,
                              RepositoryDefinitionManager repositoryDefinitionManager)
Method Detail

addDefaultsToConfig

public void addDefaultsToConfig(@NotNull
                                BuildConfiguration buildConfiguration)
Description copied from interface: PlanConfigHelper
Adds default values for all possible selections, esp preparing for display on the UI

Specified by:
addDefaultsToConfig in interface PlanConfigHelper
Parameters:
buildConfiguration - - to add defaults to

validateConfig

public void validateConfig(@NotNull
                           com.opensymphony.xwork.ValidationAware validationAware,
                           @NotNull
                           BuildConfiguration buildConfiguration)
Description copied from interface: PlanConfigHelper
Validates the configuration for a plan. Adds any errors to the validationAware object

Specified by:
validateConfig in interface PlanConfigHelper
Parameters:
validationAware - - normally the action calling this
buildConfiguration - - the configuration to validate

prepareConfig

public void prepareConfig(@NotNull
                          BuildConfiguration buildConfiguration)
Description copied from interface: PlanConfigHelper
Prepare the build configuration for validation. Performs required manual manipulations on the build config.

Specified by:
prepareConfig in interface PlanConfigHelper
Parameters:
buildConfiguration - to manipulate

cleanConfig

public void cleanConfig(@NotNull
                        BuildConfiguration buildConfiguration)
Description copied from interface: PlanConfigHelper
Cleans out any data from the build config, not required by the selected option.

Specified by:
cleanConfig in interface PlanConfigHelper
Parameters:
buildConfiguration - - to clean

performPostActionsOnConfig

public void performPostActionsOnConfig(@NotNull
                                       BuildConfiguration buildConfiguration,
                                       @NotNull
                                       Plan plan)
Description copied from interface: PlanConfigHelper
Performs any miscellaneous actions required before saving the plan. Is aware of the currently selected option.

Specified by:
performPostActionsOnConfig in interface PlanConfigHelper
Parameters:
buildConfiguration - - of the current configuration
plan - - the current plan

extractRepositoriesFromConfiguration

@Deprecated
public java.util.List<PlanRepositoryLink> extractRepositoriesFromConfiguration(@NotNull
                                                                                          BuildConfiguration buildConfiguration,
                                                                                          @NotNull
                                                                                          Plan plan)
Deprecated. since 3.3 to be removed as soon as possible - created only as temporary hack to make plan creation work

Parameters:
buildConfiguration -
plan -
Returns:

prepareXmlConfiguration

public static org.apache.commons.configuration.XMLConfiguration prepareXmlConfiguration(@NotNull
                                                                                        Repository repository,
                                                                                        @Nullable
                                                                                        WebRepositoryViewer webRepositoryViewer)

prepareXmlConfigurationString

public static java.lang.String prepareXmlConfigurationString(@NotNull
                                                             Repository repository,
                                                             @Nullable
                                                             WebRepositoryViewer webRepositoryViewer)

getRepositoriesForWorkingDirSelection

public static java.util.Map<java.lang.Long,java.lang.String> getRepositoriesForWorkingDirSelection(@NotNull
                                                                                                   Job job)
Scans checkout tasks for repositories that define their source directory. If there's at least one such repository and it's not the only repository used in Job it returns map containing possible settings of Job's or Task's working directory root.

Parameters:
job -
Returns:


Copyright © 2012 Atlassian. All Rights Reserved.