Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.atlassian.bamboo.builder
Class ScriptBuilder

    java.lang.Object
      com.atlassian.bamboo.command.Command
          com.atlassian.bamboo.builder.AbstractBuilder
              com.atlassian.bamboo.builder.ScriptBuilder

All Implemented Interfaces:
  Builder

    public class ScriptBuilder

extends AbstractBuilder

This class provides a command line Script version of `Builder`.

Field Summary
`static String` | `DEFAULT_EXECUTOR`
`static String` | `KEY`
`static String` | `KEY_PREFIX`
`static String` | `NAME`
`static String` | `PARAM_ARG`
`static String` | `PARAM_SCRIPT`

Fields inherited from class com.atlassian.bamboo.builder.AbstractBuilder
`builderManager, DEFAULT_TEST_REPORTS_XML, PARAM_BUILD_LABEL, PARAM_BUILDJDK, PARAM_ENV_VAR, PARAM_HASTESTS, PARAM_HOME, PARAM_TEST_RESULTS_DIRECTORY, PARAM_WORKING_SUB_DIR, pluginManager, templateRenderer, velocityManager`

Constructor Summary
`ScriptBuilder()`

Method Summary
`Map` | `addDefaultLabelPathMaps(Map labelPathMaps)`
`void` | `addDefaultValues(BuildConfiguration configuration)`
`Map` | `customiseLabelPathMaps(Map labelPathMaps)` Allows the builder to add extra `LabelPathMap` objects as required
`String` | `getArgument()`
`Commandline` | `getCommandLine()` Get the command line to execite the ant build Note we have to execute windows different an Windoz can't execute a batch file...
`Map` | `getFullParams()` Subclasses should extend this method rather than `Builder.getFilteredParams()` since it calls back on this method (getFillParams)
`String` | `getKey()`
`String` | `getName()`
`String` | `getScript()` What is the name of the build script to be executed
`String` | `getUrl()`
`boolean` | `isLabelPathMapConfigurable()` Returns true if the Builder can have its `LabelPathMap` configurable.
`boolean` | `isPathValid(String path)` Returns true if the passed path is valid for this builder.
`void` | `setArgument(String argument)`
`void` | `setParams(FilteredMap filteredParams)`
`void` | `setScript(String script)` Specify the script to be executed by the build
`ErrorCollection` | `validate(BuildConfiguration buildConfiguration)`
`ErrorCollection` | `validate(FilteredMap filteredBuilderParams)` Validate that the scripts mandatory fields have been defined correctly

Methods inherited from class com.atlassian.bamboo.builder.AbstractBuilder
`build, collateTestResults, filterParameters, getAdminConfig, getBuildJdk, getCompleteKey, getEditHtml, getEnvironmentVariables, getFilteredParams, getFreemarkerEditHtml, getLabel, getPath, getPathHelp, getTemplateContext, getTestChecked, getTestResultsDirectory, getViewHtml, getWorkingDirectory, getWorkingSubDirectory, hasPassed, hasTests, init, outputEndsWith, setAdminConfig, setBuildDir, setBuilderManager, setBuildJdk, setEnvironmentVariables, setHasTests, setLabel, setPluginManager, setTemplateRenderer, setTestChecked, setTestResultsDirectory, setVelocityManager, setWorkingSubDirectory, toString, validate`

Methods inherited from class com.atlassian.bamboo.command.Command
`executeCommand, getEnvironmentSetting, getErrorOutput, getOutput, hasErrors, isExecutableExists, isWindowsPlatform`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### DEFAULT_EXECUTOR

    public static final String DEFAULT_EXECUTOR

See Also:
  Constant Field Values

### NAME

    public static final String NAME

See Also:
  Constant Field Values

### KEY

    public static final String KEY

See Also:
  Constant Field Values

### KEY_PREFIX

    public static final String KEY_PREFIX

See Also:
  Constant Field Values

### PARAM_SCRIPT

    public static final String PARAM_SCRIPT

See Also:
  Constant Field Values

### PARAM_ARG

    public static final String PARAM_ARG

See Also:
  Constant Field Values

Constructor Detail

### ScriptBuilder

    public ScriptBuilder()

Method Detail

### getName

    public String getName()

### getKey

    public String getKey()

  Returns:
    The simple key of this builder.

### getUrl

    public String getUrl()

### getScript

    public String getScript()

  What is the name of the build script to be executed

  Returns:
    The name of the script

### setScript

    public void setScript(String script)

  Specify the script to be executed by the build

  Parameters:
    `script` - The script file to execute

### getCommandLine

    public Commandline getCommandLine()

  Get the command line to execite the ant build

  Note we have to execute windows different an Windoz can't execute a batch file...

  Specified by:
    `getCommandLine` in class `Command`
  Returns:
    command line

### validate

    public ErrorCollection validate(FilteredMap filteredBuilderParams)

  Validate that the scripts mandatory fields have been defined correctly

  Returns:
    The collection of form errors. An empty list if there are no errors.

### validate

    public ErrorCollection validate(BuildConfiguration buildConfiguration)

### addDefaultValues

    public void addDefaultValues(BuildConfiguration configuration)

### getFullParams

    public Map getFullParams()

  Description copied from interface: `Builder`
  Subclasses should extend this method rather than `Builder.getFilteredParams()` since it calls back on this method (getFillParams)

  Specified by:
    `getFullParams` in interface `Builder`
  Overrides:
    `getFullParams` in class `AbstractBuilder`
  Returns:
    Map key by the full param key (e.g. builder.ant.label). Never null

### setParams

    public void setParams(FilteredMap filteredParams)

  Specified by:
    `setParams` in interface `Builder`
  Overrides:
    `setParams` in class `AbstractBuilder`

### isPathValid

    public boolean isPathValid(String path)

  Description copied from interface: `Builder`
  Returns true if the passed path is valid for this builder. The definition of a path depends on the builder itself. It could be the path to the executable (e.g script builder) or just the home directory (e.g. Ant builder)

  Returns:
    true if valid

### isLabelPathMapConfigurable

    public boolean isLabelPathMapConfigurable()

  Description copied from interface: `Builder`
  Returns true if the Builder can have its `LabelPathMap` configurable. If it can't be, it won't be displayed on the ConfigureBuilder page.

  Specified by:
    `isLabelPathMapConfigurable` in interface `Builder`
  Overrides:
    `isLabelPathMapConfigurable` in class `AbstractBuilder`
  Returns:
    true if `LabelPathMap` is configurable

### customiseLabelPathMaps

    public Map customiseLabelPathMaps(Map labelPathMaps)

  Description copied from interface: `Builder`
  Allows the builder to add extra `LabelPathMap` objects as required

  Specified by:
    `customiseLabelPathMaps` in interface `Builder`
  Overrides:
    `customiseLabelPathMaps` in class `AbstractBuilder`
  Parameters:
    `labelPathMaps` - may be null

### addDefaultLabelPathMaps

    public Map addDefaultLabelPathMaps(Map labelPathMaps)

### getArgument

    public String getArgument()

### setArgument

    public void setArgument(String argument)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 Atlassian Software Systems. All Rights Reserved.