com.atlassian.bamboo.variable
Class VariableValidationServiceImpl

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

public class VariableValidationServiceImpl
extends java.lang.Object
implements VariableValidationService


Constructor Summary
VariableValidationServiceImpl(com.opensymphony.xwork.TextProvider textProvider, VariableDefinitionManager variableDefinitionManager)
           
 
Method Summary
 void validateIdForGlobalVariable(com.opensymphony.xwork.ValidationAware validationAware, long variableId)
          Validate if id identifies global variable
 void validateIdForPlanVariable(com.opensymphony.xwork.ValidationAware validationAware, long variableId, Plan expectedPlan)
          Validate if id identifies plan variable of a given plan
 void validateKey(com.opensymphony.xwork.ValidationAware validationAware, java.lang.String fieldName, java.lang.String variableKey)
          Validate String against Bamboo general rules for variable keys
 void validateValueForGlobalVariable(com.opensymphony.xwork.ValidationAware validationAware, java.lang.String fieldName, java.lang.String variableValue)
          Validate String against Bamboo general rules for global variable value
 void validateValueForPlanVariable(com.opensymphony.xwork.ValidationAware validationAware, java.lang.String fieldName, java.lang.String variableValue)
          Validate String against Bamboo general rules for plan variable value
 void validateValueForVariable(com.opensymphony.xwork.ValidationAware validationAware, java.lang.String fieldName, java.lang.String variableValue)
          Validate String against Bamboo general rules for variable value
 
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.xwork.TextProvider textProvider,
                                     VariableDefinitionManager variableDefinitionManager)
Method Detail

validateIdForGlobalVariable

public void validateIdForGlobalVariable(@NotNull
                                        com.opensymphony.xwork.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.opensymphony.xwork.ValidationAware validationAware,
                                      long variableId,
                                      @NotNull
                                      Plan 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

validateKey

public void validateKey(@NotNull
                        com.opensymphony.xwork.ValidationAware validationAware,
                        @NotNull
                        java.lang.String fieldName,
                        @Nullable
                        java.lang.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

validateValueForGlobalVariable

public void validateValueForGlobalVariable(@NotNull
                                           com.opensymphony.xwork.ValidationAware validationAware,
                                           @NotNull
                                           java.lang.String fieldName,
                                           @Nullable
                                           java.lang.String variableValue)
Description copied from interface: VariableValidationService
Validate String against Bamboo general rules for global variable value

Specified by:
validateValueForGlobalVariable 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

validateValueForPlanVariable

public void validateValueForPlanVariable(@NotNull
                                         com.opensymphony.xwork.ValidationAware validationAware,
                                         @NotNull
                                         java.lang.String fieldName,
                                         @Nullable
                                         java.lang.String variableValue)
Description copied from interface: VariableValidationService
Validate String against Bamboo general rules for plan variable value

Specified by:
validateValueForPlanVariable 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

validateValueForVariable

public void validateValueForVariable(@NotNull
                                     com.opensymphony.xwork.ValidationAware validationAware,
                                     @NotNull
                                     java.lang.String fieldName,
                                     @Nullable
                                     java.lang.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


Copyright © 2012 Atlassian. All Rights Reserved.