Package com.atlassian.bamboo.variable
Class VariableValidationServiceImpl
java.lang.Object
com.atlassian.bamboo.variable.VariableValidationServiceImpl
- All Implemented Interfaces:
VariableValidationService
-
Constructor Summary
ConstructorsConstructorDescriptionVariableValidationServiceImpl(SecretEncryptionService secretEncryptionService, org.apache.struts2.text.TextProvider textProvider, EncryptedVariableDefinitionAccessor variableDefinitionAccessor) -
Method Summary
Modifier and TypeMethodDescriptionvoidvalidateIdForDeploymentEnvironmentVariable(@NotNull org.apache.struts2.interceptor.ValidationAware validationAware, long variableId, long environmentId) Validate if id identifies an existing variable associated with Deployment Environment *voidvalidateIdForGlobalVariable(@NotNull org.apache.struts2.interceptor.ValidationAware validationAware, long variableId) Validate if id identifies global variablevoidvalidateIdForPlanVariable(@NotNull org.apache.struts2.interceptor.ValidationAware validationAware, long variableId, @NotNull ImmutablePlan expectedPlan) Validate if id identifies plan variable of a given planvoidvalidateIdForProjectVariable(@NotNull org.apache.struts2.interceptor.ValidationAware validationAware, long variableId, long projectId) Validate if id identifies project variable of a given projectvoidvalidateKey(@NotNull org.apache.struts2.interceptor.ValidationAware validationAware, @NotNull String fieldName, @Nullable String variableKey) Validate String against Bamboo general rules for variable keysvoidvalidateValueForEncryptedVariable(@NotNull org.apache.struts2.interceptor.ValidationAware validationAware, @NotNull String fieldName, @Nullable String variableValue) Validate value of password variablevoidvalidateValueForVariable(@NotNull org.apache.struts2.interceptor.ValidationAware validationAware, @NotNull String fieldName, @Nullable String variableValue) Validate String against Bamboo general rules for variable value
-
Constructor Details
-
VariableValidationServiceImpl
public VariableValidationServiceImpl(SecretEncryptionService secretEncryptionService, org.apache.struts2.text.TextProvider textProvider, EncryptedVariableDefinitionAccessor variableDefinitionAccessor)
-
-
Method Details
-
validateIdForGlobalVariable
public void validateIdForGlobalVariable(@NotNull @NotNull org.apache.struts2.interceptor.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 org.apache.struts2.interceptor.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 org.apache.struts2.interceptor.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 org.apache.struts2.interceptor.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 awe expect this variable to be associated toinvalid reference
Project
-
validateKey
public void validateKey(@NotNull @NotNull org.apache.struts2.interceptor.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 org.apache.struts2.interceptor.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 org.apache.struts2.interceptor.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
-