public class VariableValidationServiceImpl extends Object implements VariableValidationService
Constructor and Description |
---|
VariableValidationServiceImpl(SecretEncryptionService secretEncryptionService,
com.opensymphony.xwork2.TextProvider textProvider,
EncryptedVariableDefinitionAccessor variableDefinitionAccessor) |
Modifier and Type | Method and 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 variable
|
void |
validateIdForPlanVariable(@NotNull com.atlassian.struts.ValidationAware validationAware,
long variableId,
@NotNull ImmutablePlan expectedPlan)
Validate if id identifies plan variable of a given plan
|
void |
validateIdForProjectVariable(@NotNull com.atlassian.struts.ValidationAware validationAware,
long variableId,
long projectId)
Validate if id identifies project variable of a given project
|
void |
validateKey(@NotNull com.atlassian.struts.ValidationAware validationAware,
@NotNull String fieldName,
@Nullable String variableKey)
Validate String against Bamboo general rules for variable keys
|
void |
validateValueForEncryptedVariable(@NotNull com.atlassian.struts.ValidationAware validationAware,
@NotNull String fieldName,
@Nullable String variableValue)
Validate value of password variable
|
void |
validateValueForVariable(@NotNull com.atlassian.struts.ValidationAware validationAware,
@NotNull String fieldName,
@Nullable String variableValue)
Validate String against Bamboo general rules for variable value
|
public VariableValidationServiceImpl(SecretEncryptionService secretEncryptionService, com.opensymphony.xwork2.TextProvider textProvider, EncryptedVariableDefinitionAccessor variableDefinitionAccessor)
public void validateIdForGlobalVariable(@NotNull @NotNull com.atlassian.struts.ValidationAware validationAware, long variableId)
VariableValidationService
validateIdForGlobalVariable
in interface VariableValidationService
validationAware
- the object to add errors to if any are foundvariableId
- the actual id to validatepublic void validateIdForPlanVariable(@NotNull @NotNull com.atlassian.struts.ValidationAware validationAware, long variableId, @NotNull @NotNull ImmutablePlan expectedPlan)
VariableValidationService
validateIdForPlanVariable
in interface VariableValidationService
validationAware
- the object to add errors to if any are foundvariableId
- the actual id to validateexpectedPlan
- the Plan
we expect this variable to be associated topublic void validateIdForDeploymentEnvironmentVariable(@NotNull @NotNull com.atlassian.struts.ValidationAware validationAware, long variableId, long environmentId)
VariableValidationService
validateIdForDeploymentEnvironmentVariable
in interface VariableValidationService
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 topublic void validateIdForProjectVariable(@NotNull @NotNull com.atlassian.struts.ValidationAware validationAware, long variableId, long projectId)
VariableValidationService
validateIdForProjectVariable
in interface VariableValidationService
validationAware
- the object to add errors to if any are foundvariableId
- the actual id to validateprojectId
- the if of a Project
we expect this variable to be associated topublic void validateKey(@NotNull @NotNull com.atlassian.struts.ValidationAware validationAware, @NotNull @NotNull String fieldName, @Nullable @Nullable String variableKey)
VariableValidationService
validateKey
in interface VariableValidationService
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 validatepublic void validateValueForVariable(@NotNull @NotNull com.atlassian.struts.ValidationAware validationAware, @NotNull @NotNull String fieldName, @Nullable @Nullable String variableValue)
VariableValidationService
validateValueForVariable
in interface VariableValidationService
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 validatepublic void validateValueForEncryptedVariable(@NotNull @NotNull com.atlassian.struts.ValidationAware validationAware, @NotNull @NotNull String fieldName, @Nullable @Nullable String variableValue)
VariableValidationService
validateValueForEncryptedVariable
in interface VariableValidationService
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 validateCopyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.