com.atlassian.bamboo.variable
Interface VariableConfigurationService

All Known Implementing Classes:
VariableConfigurationServiceImpl

public interface VariableConfigurationService

Service for modification of global and plan variable definitions.

Since:
4.4

Method Summary
 VariableDefinition createGlobalVariable(java.lang.String variableKey, java.lang.String variableValue)
          Creates new Global variable.
 VariableDefinition createPlanVariable(Plan plan, java.lang.String variableKey, java.lang.String variableValue)
          Creates new Plan variable.
 VariableDefinition createUniqueGlobalVariable(java.lang.String variableKey, java.lang.String variableValue)
          Creates new global variable.
 VariableDefinition createUniquePlanVariable(Plan plan, java.lang.String variableKey, java.lang.String variableValue)
          Creates new Plan variable.
 VariableDefinition createVariableForEnvironment(long environmentId, java.lang.String variableKey, java.lang.String variableValue)
          Creates new variable for Deployment Environment
 void deleteVariableDefinition(VariableDefinition variableDefinition)
          Removes VariableDefinition
 VariableDefinition updateVariableDefinition(VariableDefinition variableDefinition, java.lang.String previousValue)
          Updates VariableDefinition
 

Method Detail

createUniquePlanVariable

@NotNull
VariableDefinition createUniquePlanVariable(@NotNull
                                                    Plan plan,
                                                    @NotNull
                                                    java.lang.String variableKey,
                                                    @NotNull
                                                    java.lang.String variableValue)
Creates new Plan variable. If a variable with the same key prefix and value already exists nothing will be created and existing variable is returned. If a variable with the same key but different value already exists, this method will add unique suffix to the key and create a new variable.

Parameters:
plan - plan the variable belongs to
variableKey - variable key.
variableValue - variable value
Returns:
created VariableDefinition

createUniqueGlobalVariable

@NotNull
VariableDefinition createUniqueGlobalVariable(@NotNull
                                                      java.lang.String variableKey,
                                                      @NotNull
                                                      java.lang.String variableValue)
Creates new global variable. If a variable with the same key prefix and value already exists nothing will be created and existing variable is returned. If a variable with the same key but different value already exists, this method will add unique suffix to the key and create a new variable.

Parameters:
variableKey - variable key.
variableValue - variable value
Returns:
created VariableDefinition

createPlanVariable

@NotNull
VariableDefinition createPlanVariable(@NotNull
                                              Plan plan,
                                              @NotNull
                                              java.lang.String variableKey,
                                              @NotNull
                                              java.lang.String variableValue)
Creates new Plan variable.

Parameters:
plan - plan the variable belongs to
variableKey - variable key.
variableValue - variable value
Returns:
created VariableDefinition
Throws:
java.lang.IllegalArgumentException - iff variable key is not unique

createVariableForEnvironment

@NotNull
VariableDefinition createVariableForEnvironment(long environmentId,
                                                        @NotNull
                                                        java.lang.String variableKey,
                                                        @NotNull
                                                        java.lang.String variableValue)
Creates new variable for Deployment Environment

Parameters:
environmentId -
variableKey - variable key.
variableValue - variable value
Returns:
created VariableDefinition
Throws:
java.lang.IllegalArgumentException - iff variable key is not unique or Environment does not exist

createGlobalVariable

@NotNull
VariableDefinition createGlobalVariable(@NotNull
                                                java.lang.String variableKey,
                                                @NotNull
                                                java.lang.String variableValue)
Creates new Global variable.

Parameters:
variableValue - variable value
Returns:
created VariableDefinition
Throws:
java.lang.IllegalArgumentException - iff variable key is not unique

updateVariableDefinition

@NotNull
VariableDefinition updateVariableDefinition(@NotNull
                                                    VariableDefinition variableDefinition,
                                                    java.lang.String previousValue)
Updates VariableDefinition

Throws:
java.lang.IllegalArgumentException - iff variable key is not unique

deleteVariableDefinition

void deleteVariableDefinition(@NotNull
                              VariableDefinition variableDefinition)
Removes VariableDefinition



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