com.atlassian.bamboo.build
Class VariableSubstitutionBeanImpl

java.lang.Object
  extended by com.atlassian.bamboo.build.AbstractSubstitutionBean
      extended by com.atlassian.bamboo.build.VariableSubstitutionBeanImpl
All Implemented Interfaces:
VariableSubstitutionBean
Direct Known Subclasses:
VariableSubstitutionBeanForTesting

public class VariableSubstitutionBeanImpl
extends AbstractSubstitutionBean

This bean is responsible for substituting BuildDefinition values with variables.


Constructor Summary
VariableSubstitutionBeanImpl(VariableBuilderBean variableBuilderBean)
           
 
Method Summary
 VariableBuilderBean getVariableBuilderBean()
           
 java.util.Map<java.lang.String,java.lang.String> getVariables(BuildContext buildContext)
           
 java.lang.String removeAllVariables(java.lang.String unparsedString)
          Remove all variables from unparsedString
 java.lang.String substituteBambooVariables(java.lang.String stringWithValuesToSubstitute)
          Takes a String to be parsed for variable references and substitutes with the variable values then returns the substituted string.
 java.lang.String[] substituteBambooVariables(java.lang.String[] stringWithValuesToSubstitute, BuildContext buildContext, BuildLogger buildLogger)
          Takes an array of Strings to be parsed for variable references and substitutes with the variable values then returns the substituted string If BuildContext is null only global variables, system variables and capabilities will be substituted.
 java.lang.String substituteBambooVariables(java.lang.String stringWithValuesToSubstitute, BuildContext buildContext, BuildLogger buildLogger)
          Takes a String to be parsed for variable references and substitutes with the variable values then returns the substituted string.
 
Methods inherited from class com.atlassian.bamboo.build.AbstractSubstitutionBean
findAllVariables, removeAllVariables, substituteVariables
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VariableSubstitutionBeanImpl

public VariableSubstitutionBeanImpl(VariableBuilderBean variableBuilderBean)
Method Detail

getVariableBuilderBean

public VariableBuilderBean getVariableBuilderBean()

substituteBambooVariables

public java.lang.String substituteBambooVariables(@Nullable
                                                  java.lang.String stringWithValuesToSubstitute,
                                                  @Nullable
                                                  BuildContext buildContext,
                                                  BuildLogger buildLogger)
Description copied from interface: VariableSubstitutionBean
Takes a String to be parsed for variable references and substitutes with the variable values then returns the substituted string. If BuildContext is null only global variables, system variables and capabilities will be substituted.

Parameters:
stringWithValuesToSubstitute - - to substitute
buildContext - - associated with the command line
buildLogger - - for logging messages to get logged to.
Returns:
string

substituteBambooVariables

@Nullable
public java.lang.String substituteBambooVariables(@Nullable
                                                           java.lang.String stringWithValuesToSubstitute)
Description copied from interface: VariableSubstitutionBean
Takes a String to be parsed for variable references and substitutes with the variable values then returns the substituted string. Only global variables, system variables and capabilities will be substituted.

Parameters:
stringWithValuesToSubstitute - - to substitute
Returns:
string

substituteBambooVariables

public java.lang.String[] substituteBambooVariables(java.lang.String[] stringWithValuesToSubstitute,
                                                    @Nullable
                                                    BuildContext buildContext,
                                                    @Nullable
                                                    BuildLogger buildLogger)
Description copied from interface: VariableSubstitutionBean
Takes an array of Strings to be parsed for variable references and substitutes with the variable values then returns the substituted string If BuildContext is null only global variables, system variables and capabilities will be substituted.

Parameters:
stringWithValuesToSubstitute - - to substitute
Returns:
string

getVariables

@NotNull
public java.util.Map<java.lang.String,java.lang.String> getVariables(@Nullable
                                                                             BuildContext buildContext)
See Also:
VariableBuilderBean.getVariables(BuildContext)

removeAllVariables

public java.lang.String removeAllVariables(@NotNull
                                           java.lang.String unparsedString)
Description copied from interface: VariableSubstitutionBean
Remove all variables from unparsedString

Returns:


Copyright © 2010 Atlassian. All Rights Reserved.