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 void
validateIdForDeploymentEnvironmentVariable(@NotNull com.atlassian.struts.ValidationAware validationAware, long variableId, long environmentId)
Validate if id identifies an existing variable associated with Deployment Environment *void
validateIdForGlobalVariable(@NotNull com.atlassian.struts.ValidationAware validationAware, long variableId)
Validate if id identifies global variablevoid
validateIdForPlanVariable(@NotNull com.atlassian.struts.ValidationAware validationAware, long variableId, @NotNull ImmutablePlan expectedPlan)
Validate if id identifies plan variable of a given planvoid
validateIdForProjectVariable(@NotNull com.atlassian.struts.ValidationAware validationAware, long variableId, long projectId)
Validate if id identifies project variable of a given projectvoid
validateKey(@NotNull com.atlassian.struts.ValidationAware validationAware, @NotNull String fieldName, @Nullable String variableKey)
Validate String against Bamboo general rules for variable keysvoid
validateValueForEncryptedVariable(@NotNull com.atlassian.struts.ValidationAware validationAware, @NotNull String fieldName, @Nullable String variableValue)
Validate value of password variablevoid
validateValueForVariable(@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:VariableValidationService
Validate if id identifies global variable- Specified by:
validateIdForGlobalVariable
in 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:VariableValidationService
Validate if id identifies plan variable of a given plan- Specified by:
validateIdForPlanVariable
in interfaceVariableValidationService
- Parameters:
validationAware
- the object to add errors to if any are foundvariableId
- the actual id to validateexpectedPlan
- thePlan
we 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:VariableValidationService
Validate if id identifies an existing variable associated with Deployment Environment *- Specified by:
validateIdForDeploymentEnvironmentVariable
in 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:VariableValidationService
Validate if id identifies project variable of a given project- Specified by:
validateIdForProjectVariable
in interfaceVariableValidationService
- Parameters:
validationAware
- the object to add errors to if any are foundvariableId
- the actual id to validateprojectId
- the if of aProject
we 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:VariableValidationService
Validate String against Bamboo general rules for variable keys- Specified by:
validateKey
in 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:VariableValidationService
Validate String against Bamboo general rules for variable value- Specified by:
validateValueForVariable
in 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:VariableValidationService
Validate value of password variable- Specified by:
validateValueForEncryptedVariable
in 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
-
-