com.atlassian.bamboo.variable
Class VariableValidationServiceImpl

java.lang.Object
  extended by com.atlassian.bamboo.variable.VariableValidationServiceImpl
All Implemented Interfaces:
VariableValidationService

public class VariableValidationServiceImpl
extends Object
implements VariableValidationService


Constructor Summary
VariableValidationServiceImpl(com.opensymphony.xwork2.TextProvider textProvider, VariableDefinitionManager variableDefinitionManager)
           
 
Method Summary
 void validateIdForDeploymentEnvironmentVariable(com.atlassian.struts.ValidationAware validationAware, long variableId, long environmentId)
          Validate if id identifies an existing variable associated with Deployment Environment *
 void validateIdForDeploymentEnvironmentVariable(com.opensymphony.xwork.ValidationAware validationAware, long variableId, long environmentId)
           
 void validateIdForGlobalVariable(com.atlassian.struts.ValidationAware validationAware, long variableId)
          Validate if id identifies global variable
 void validateIdForGlobalVariable(com.opensymphony.xwork.ValidationAware validationAware, long variableId)
           
 void validateIdForPlanVariable(com.atlassian.struts.ValidationAware validationAware, long variableId, ImmutablePlan expectedPlan)
          Validate if id identifies plan variable of a given plan
 void validateIdForPlanVariable(com.opensymphony.xwork.ValidationAware validationAware, long variableId, ImmutablePlan expectedPlan)
           
 void validateKey(com.atlassian.struts.ValidationAware validationAware, String fieldName, String variableKey)
          Validate String against Bamboo general rules for variable keys
 void validateKey(com.opensymphony.xwork.ValidationAware validationAware, String fieldName, String variableKey)
           
 void validateValueForVariable(com.atlassian.struts.ValidationAware validationAware, String fieldName, String variableValue)
          Validate String against Bamboo general rules for variable value
 void validateValueForVariable(com.opensymphony.xwork.ValidationAware validationAware, String fieldName, String variableValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VariableValidationServiceImpl

public VariableValidationServiceImpl(com.opensymphony.xwork2.TextProvider textProvider,
                                     VariableDefinitionManager variableDefinitionManager)
Method Detail

validateIdForGlobalVariable

public void validateIdForGlobalVariable(@NotNull
                                        com.atlassian.struts.ValidationAware validationAware,
                                        long variableId)
Description copied from interface: VariableValidationService
Validate if id identifies global variable

Specified by:
validateIdForGlobalVariable in interface VariableValidationService
Parameters:
validationAware - the object to add errors to if any are found
variableId - the actual id to validate

validateIdForPlanVariable

public void validateIdForPlanVariable(@NotNull
                                      com.atlassian.struts.ValidationAware validationAware,
                                      long variableId,
                                      @NotNull
                                      ImmutablePlan expectedPlan)
Description copied from interface: VariableValidationService
Validate if id identifies plan variable of a given plan

Specified by:
validateIdForPlanVariable in interface VariableValidationService
Parameters:
validationAware - the object to add errors to if any are found
variableId - the actual id to validate
expectedPlan - the Plan we expect this variable to be associated to

validateIdForDeploymentEnvironmentVariable

public void validateIdForDeploymentEnvironmentVariable(@NotNull
                                                       com.atlassian.struts.ValidationAware validationAware,
                                                       long variableId,
                                                       long environmentId)
Description copied from interface: VariableValidationService
Validate if id identifies an existing variable associated with Deployment Environment *

Specified by:
validateIdForDeploymentEnvironmentVariable in interface VariableValidationService
Parameters:
validationAware - the object to add errors to if any are found
variableId - the actual id to validate
environmentId - the id of an Environment we expect this variable to be associated to

validateKey

public void validateKey(@NotNull
                        com.atlassian.struts.ValidationAware validationAware,
                        @NotNull
                        String fieldName,
                        @Nullable
                        String variableKey)
Description copied from interface: VariableValidationService
Validate String against Bamboo general rules for variable keys

Specified by:
validateKey in interface VariableValidationService
Parameters:
validationAware - the object to add errors to if any are found
fieldName - the name of the field to add the errors to
variableKey - the actual key to validate

validateValueForVariable

public void validateValueForVariable(@NotNull
                                     com.atlassian.struts.ValidationAware validationAware,
                                     @NotNull
                                     String fieldName,
                                     @Nullable
                                     String variableValue)
Description copied from interface: VariableValidationService
Validate String against Bamboo general rules for variable value

Specified by:
validateValueForVariable in interface VariableValidationService
Parameters:
validationAware - the object to add errors to if any are found
fieldName - the name of the field to add the errors to
variableValue - the actual value to validate

validateIdForGlobalVariable

public void validateIdForGlobalVariable(@NotNull
                                        com.opensymphony.xwork.ValidationAware validationAware,
                                        long variableId)
Specified by:
validateIdForGlobalVariable in interface VariableValidationService

validateIdForPlanVariable

public void validateIdForPlanVariable(@NotNull
                                      com.opensymphony.xwork.ValidationAware validationAware,
                                      long variableId,
                                      @NotNull
                                      ImmutablePlan expectedPlan)
Specified by:
validateIdForPlanVariable in interface VariableValidationService

validateIdForDeploymentEnvironmentVariable

public void validateIdForDeploymentEnvironmentVariable(@NotNull
                                                       com.opensymphony.xwork.ValidationAware validationAware,
                                                       long variableId,
                                                       long environmentId)
Specified by:
validateIdForDeploymentEnvironmentVariable in interface VariableValidationService

validateKey

public void validateKey(@NotNull
                        com.opensymphony.xwork.ValidationAware validationAware,
                        @NotNull
                        String fieldName,
                        @Nullable
                        String variableKey)
Specified by:
validateKey in interface VariableValidationService

validateValueForVariable

public void validateValueForVariable(@NotNull
                                     com.opensymphony.xwork.ValidationAware validationAware,
                                     @NotNull
                                     String fieldName,
                                     @Nullable
                                     String variableValue)
Specified by:
validateValueForVariable in interface VariableValidationService


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.