com.atlassian.bamboo.variable
Class VariableConfigurationServiceImpl

java.lang.Object
  extended by com.atlassian.bamboo.variable.VariableConfigurationServiceImpl
All Implemented Interfaces:
VariableConfigurationService

public class VariableConfigurationServiceImpl
extends java.lang.Object
implements VariableConfigurationService


Constructor Summary
VariableConfigurationServiceImpl(ScopedExclusionService scopedExclusionService, VariableDefinitionManager variableDefinitionManager, VariableDefinitionFactory variableDefinitionFactory)
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VariableConfigurationServiceImpl

public VariableConfigurationServiceImpl(@NotNull
                                        ScopedExclusionService scopedExclusionService,
                                        @NotNull
                                        VariableDefinitionManager variableDefinitionManager,
                                        @NotNull
                                        VariableDefinitionFactory variableDefinitionFactory)
Method Detail

createUniquePlanVariable

@NotNull
public VariableDefinition createUniquePlanVariable(@NotNull
                                                           Plan plan,
                                                           @NotNull
                                                           java.lang.String variableKey,
                                                           @NotNull
                                                           java.lang.String variableValue)
Description copied from interface: VariableConfigurationService
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.

Specified by:
createUniquePlanVariable in interface VariableConfigurationService
Parameters:
plan - plan the variable belongs to
variableKey - variable key.
variableValue - variable value
Returns:
created VariableDefinition

createUniqueGlobalVariable

@NotNull
public VariableDefinition createUniqueGlobalVariable(@NotNull
                                                             java.lang.String variableKey,
                                                             @NotNull
                                                             java.lang.String variableValue)
Description copied from interface: VariableConfigurationService
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.

Specified by:
createUniqueGlobalVariable in interface VariableConfigurationService
Parameters:
variableKey - variable key.
variableValue - variable value
Returns:
created VariableDefinition

createPlanVariable

@NotNull
public VariableDefinition createPlanVariable(@NotNull
                                                     Plan plan,
                                                     @NotNull
                                                     java.lang.String variableKey,
                                                     @NotNull
                                                     java.lang.String variableValue)
Description copied from interface: VariableConfigurationService
Creates new Plan variable.

Specified by:
createPlanVariable in interface VariableConfigurationService
Parameters:
plan - plan the variable belongs to
variableKey - variable key.
variableValue - variable value
Returns:
created VariableDefinition

createVariableForEnvironment

@NotNull
public VariableDefinition createVariableForEnvironment(long environmentId,
                                                               @NotNull
                                                               java.lang.String variableKey,
                                                               @NotNull
                                                               java.lang.String variableValue)
Description copied from interface: VariableConfigurationService
Creates new variable for Deployment Environment

Specified by:
createVariableForEnvironment in interface VariableConfigurationService
variableKey - variable key.
variableValue - variable value
Returns:
created VariableDefinition

createGlobalVariable

@NotNull
public VariableDefinition createGlobalVariable(@NotNull
                                                       java.lang.String variableKey,
                                                       @NotNull
                                                       java.lang.String variableValue)
Description copied from interface: VariableConfigurationService
Creates new Global variable.

Specified by:
createGlobalVariable in interface VariableConfigurationService
variableValue - variable value
Returns:
created VariableDefinition

updateVariableDefinition

@NotNull
public VariableDefinition updateVariableDefinition(@NotNull
                                                           VariableDefinition variableDefinition,
                                                           java.lang.String previousValue)
Description copied from interface: VariableConfigurationService
Updates VariableDefinition

Specified by:
updateVariableDefinition in interface VariableConfigurationService

deleteVariableDefinition

public void deleteVariableDefinition(@NotNull
                                     VariableDefinition variableDefinition)
Description copied from interface: VariableConfigurationService
Removes VariableDefinition

Specified by:
deleteVariableDefinition in interface VariableConfigurationService


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