Package com.atlassian.bamboo.variable
Class VariableValidationServiceImpl
- java.lang.Object
-
- com.atlassian.bamboo.variable.VariableValidationServiceImpl
-
- All Implemented Interfaces:
VariableValidationService
public class VariableValidationServiceImpl extends Object implements VariableValidationService
-
-
Constructor Summary
Constructors Constructor Description VariableValidationServiceImpl(SecretEncryptionService secretEncryptionService, com.opensymphony.xwork2.TextProvider textProvider, EncryptedVariableDefinitionAccessor variableDefinitionAccessor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidvalidateIdForDeploymentEnvironmentVariable(@NotNull com.atlassian.struts.ValidationAware validationAware, long variableId, long environmentId)Validate if id identifies an existing variable associated with Deployment Environment *voidvalidateIdForGlobalVariable(@NotNull com.atlassian.struts.ValidationAware validationAware, long variableId)Validate if id identifies global variablevoidvalidateIdForPlanVariable(@NotNull com.atlassian.struts.ValidationAware validationAware, long variableId, @NotNull ImmutablePlan expectedPlan)Validate if id identifies plan variable of a given planvoidvalidateIdForProjectVariable(@NotNull com.atlassian.struts.ValidationAware validationAware, long variableId, long projectId)Validate if id identifies project variable of a given projectvoidvalidateKey(@NotNull com.atlassian.struts.ValidationAware validationAware, @NotNull String fieldName, @Nullable String variableKey)Validate String against Bamboo general rules for variable keysvoidvalidateValueForEncryptedVariable(@NotNull com.atlassian.struts.ValidationAware validationAware, @NotNull String fieldName, @Nullable String variableValue)Validate value of password variablevoidvalidateValueForVariable(@NotNull com.atlassian.struts.ValidationAware validationAware, @NotNull String fieldName, @Nullable String variableValue)Validate String against Bamboo general rules for variable value
-
-
-
Constructor Detail
-
VariableValidationServiceImpl
public VariableValidationServiceImpl(SecretEncryptionService secretEncryptionService, com.opensymphony.xwork2.TextProvider textProvider, EncryptedVariableDefinitionAccessor variableDefinitionAccessor)
-
-
Method Detail
-
validateIdForGlobalVariable
public void validateIdForGlobalVariable(@NotNull @NotNull com.atlassian.struts.ValidationAware validationAware, long variableId)Description copied from interface:VariableValidationServiceValidate if id identifies global variable- Specified by:
validateIdForGlobalVariablein interfaceVariableValidationService- Parameters:
validationAware- the object to add errors to if any are foundvariableId- the actual id to validate
-
validateIdForPlanVariable
public void validateIdForPlanVariable(@NotNull @NotNull com.atlassian.struts.ValidationAware validationAware, long variableId, @NotNull @NotNull ImmutablePlan expectedPlan)Description copied from interface:VariableValidationServiceValidate if id identifies plan variable of a given plan- Specified by:
validateIdForPlanVariablein interfaceVariableValidationService- Parameters:
validationAware- the object to add errors to if any are foundvariableId- the actual id to validateexpectedPlan- thePlanwe expect this variable to be associated to
-
validateIdForDeploymentEnvironmentVariable
public void validateIdForDeploymentEnvironmentVariable(@NotNull @NotNull com.atlassian.struts.ValidationAware validationAware, long variableId, long environmentId)Description copied from interface:VariableValidationServiceValidate if id identifies an existing variable associated with Deployment Environment *- Specified by:
validateIdForDeploymentEnvironmentVariablein interfaceVariableValidationService- Parameters:
validationAware- the object to add errors to if any are foundvariableId- the actual id to validateenvironmentId- the id of an com.atlassian.bamboo.deployments.environments.Environment we expect this variable to be associated to
-
validateIdForProjectVariable
public void validateIdForProjectVariable(@NotNull @NotNull com.atlassian.struts.ValidationAware validationAware, long variableId, long projectId)Description copied from interface:VariableValidationServiceValidate if id identifies project variable of a given project- Specified by:
validateIdForProjectVariablein interfaceVariableValidationService- Parameters:
validationAware- the object to add errors to if any are foundvariableId- the actual id to validateprojectId- the if of aProjectwe expect this variable to be associated to
-
validateKey
public void validateKey(@NotNull @NotNull com.atlassian.struts.ValidationAware validationAware, @NotNull @NotNull String fieldName, @Nullable @Nullable String variableKey)Description copied from interface:VariableValidationServiceValidate String against Bamboo general rules for variable keys- Specified by:
validateKeyin interfaceVariableValidationService- Parameters:
validationAware- the object to add errors to if any are foundfieldName- the name of the field to add the errors tovariableKey- the actual key to validate
-
validateValueForVariable
public void validateValueForVariable(@NotNull @NotNull com.atlassian.struts.ValidationAware validationAware, @NotNull @NotNull String fieldName, @Nullable @Nullable String variableValue)Description copied from interface:VariableValidationServiceValidate String against Bamboo general rules for variable value- Specified by:
validateValueForVariablein interfaceVariableValidationService- Parameters:
validationAware- the object to add errors to if any are foundfieldName- the name of the field to add the errors tovariableValue- the actual value to validate
-
validateValueForEncryptedVariable
public void validateValueForEncryptedVariable(@NotNull @NotNull com.atlassian.struts.ValidationAware validationAware, @NotNull @NotNull String fieldName, @Nullable @Nullable String variableValue)Description copied from interface:VariableValidationServiceValidate value of password variable- Specified by:
validateValueForEncryptedVariablein interfaceVariableValidationService- Parameters:
validationAware- the object to add errors to if any are foundfieldName- the name of the field to add the errors tovariableValue- the actual value to validate
-
-