public class PlanValidationServiceImpl extends Object implements PlanValidationService
Modifier and Type | Field and Description |
---|---|
static String |
CHAIN_PREFIX |
static String |
JOB_PREFIX |
static Pattern |
KEY_PATTERN |
static String |
PLAN_PREFIX |
static String |
PROJECT_PREFIX |
static String |
STAGE_PREFIX |
static String |
SUB_BUILD_KEY |
KEY_REGEXP
Constructor and Description |
---|
PlanValidationServiceImpl(ValidationService validationService,
ProjectManager projectManager,
PlanManager planManager,
com.opensymphony.xwork2.TextProvider textProvider,
ChainBranchManager chainBranchManager,
ProjectConfigurationService projectConfigurationService) |
Modifier and Type | Method and Description |
---|---|
void |
validateDescription(com.atlassian.struts.ValidationAware validationAware,
String fieldName,
String description)
Validate the description field of any object.
|
void |
validateDescription(com.opensymphony.xwork.ValidationAware validationAware,
String fieldName,
String description)
Validate the description field of any object.
|
void |
validateKey(com.atlassian.struts.ValidationAware validationAware,
String fieldName,
String errorPrefix,
String key)
Validate any String against Bamboo's generic rules for keys.
|
void |
validateKey(com.opensymphony.xwork.ValidationAware validationAware,
String fieldName,
String errorPrefix,
String key)
Validate any String against Bamboo's generic rules for keys.
|
void |
validateName(com.atlassian.struts.ValidationAware validationAware,
String fieldName,
String errorPrefix,
String name)
Validate any String against Bamboo's generic rules for names.
|
void |
validateName(com.opensymphony.xwork.ValidationAware validationAware,
String fieldName,
String errorPrefix,
String name)
Validate any String against Bamboo's generic rules for names.
|
void |
validateNewChainForExistingProject(com.atlassian.struts.ValidationAware validationAware,
String existingProjectKey,
String buildName)
Validate that new chain name (only) is unique within the project
|
void |
validateNewChainForExistingProject(com.opensymphony.xwork.ValidationAware validationAware,
String existingProjectKey,
String chainName)
Validate that new chain name (only) is unique within the project
|
void |
validateNewChainForExistingProject(com.atlassian.struts.ValidationAware validationAware,
String existingProjectKey,
String buildKey,
String buildName)
Validate that new chain name and key is unique within the project
|
void |
validateNewChainForExistingProject(com.opensymphony.xwork.ValidationAware validationAware,
String existingProjectKey,
String chainKey,
String chainName)
Validate that new chain name and key is unique within the project
|
void |
validateNewJobForExistingChain(com.atlassian.struts.ValidationAware validationAware,
Chain existingChain,
String buildKey,
String buildName) |
void |
validateNewJobForExistingChain(com.opensymphony.xwork.ValidationAware validationAware,
Chain existingChain,
String buildKey,
String buildName) |
void |
validateNewPlanBranchForMaster(com.atlassian.struts.ValidationAware validationAware,
ImmutableChain masterChain,
String branchName)
Validate that new plan branch name (only) is unique within a set of branches with a common master
|
void |
validateNewPlanBranchForMaster(com.opensymphony.xwork.ValidationAware validationAware,
ImmutableChain masterChain,
String branchName)
Validate that new plan branch name (only) is unique within a set of branches with a common master
|
void |
validateNewPlanDetails(com.atlassian.struts.ValidationAware validationAware,
String buildKey,
String buildName)
Ensure that the build key and name are valid
|
void |
validateNewPlanDetails(com.opensymphony.xwork.ValidationAware validationAware,
String buildKey,
String buildName)
Ensure that the build key and name are valid
|
void |
validateNewProjectDetails(com.atlassian.struts.ValidationAware validationAware,
String projectName,
String projectKey)
Validate that the new project details are valid
|
void |
validateNewProjectDetails(com.opensymphony.xwork.ValidationAware validationAware,
String projectName,
String projectKey)
Validate that the new project details are valid
|
void |
validateNewProjectDetails(com.atlassian.struts.ValidationAware validationAware,
String projectName,
String projectKey,
String projectDescription)
Validate that the new project details are valid
|
void |
validateNewStageForChain(com.atlassian.struts.ValidationAware validationAware,
Chain chain,
String stageName)
Validate the the new stage can be added to the given chain
|
void |
validateNewStageForChain(com.opensymphony.xwork.ValidationAware validationAware,
Chain chain,
String stageName)
Validate the the new stage can be added to the given chain
|
void |
validatePlanToCloneExists(com.atlassian.struts.ValidationAware validationAware,
String buildKeyToClone)
Validate that the plan t clone exists
|
void |
validatePlanToCloneExists(com.opensymphony.xwork.ValidationAware validationAware,
String buildKeyToClone)
Validate that the plan t clone exists
|
void |
validateStageExistsForChain(com.atlassian.struts.ValidationAware validationAware,
Chain chain,
String stageName)
Ensures that the stage currently exists for a chain
|
void |
validateStageExistsForChain(com.opensymphony.xwork.ValidationAware validationAware,
Chain chain,
String stageName)
Ensures that the stage currently exists for a chain
|
public static final Pattern KEY_PATTERN
public static final String PLAN_PREFIX
public static final String PROJECT_PREFIX
public static final String CHAIN_PREFIX
public static final String JOB_PREFIX
public static final String STAGE_PREFIX
public static final String SUB_BUILD_KEY
public PlanValidationServiceImpl(ValidationService validationService, ProjectManager projectManager, PlanManager planManager, com.opensymphony.xwork2.TextProvider textProvider, ChainBranchManager chainBranchManager, ProjectConfigurationService projectConfigurationService)
public void validateKey(@NotNull com.atlassian.struts.ValidationAware validationAware, String fieldName, String errorPrefix, String key)
PlanValidationService
validateKey
in interface PlanValidationService
validationAware
- - the object to add errors to if any are foundfieldName
- - the name of the field to add the errors toerrorPrefix
- - the prefix to put in front of the standardised error keys. (e.g. "plan", "chain")key
- - the actual string to validatepublic void validateName(@NotNull com.atlassian.struts.ValidationAware validationAware, String fieldName, String errorPrefix, String name)
PlanValidationService
validateName
in interface PlanValidationService
validationAware
- - the object to add errors to if any are foundfieldName
- - the name of the field to add the errors toerrorPrefix
- - the prefix to put in front of the standardised error keys. (e.g. "plan", "chain")name
- - the actual string to validatepublic void validateDescription(@NotNull com.atlassian.struts.ValidationAware validationAware, String fieldName, String description)
PlanValidationService
validateDescription
in interface PlanValidationService
validationAware
- - the object to add errors to if any are foundfieldName
- - the name of the field to add the errors todescription
- - the actual text to validatepublic void validatePlanToCloneExists(@NotNull com.atlassian.struts.ValidationAware validationAware, @Nullable String buildKeyToClone)
PlanValidationService
validatePlanToCloneExists
in interface PlanValidationService
validationAware
- - object to add errors to if any are foundbuildKeyToClone
- - the key of the plan to clonepublic void validateNewPlanDetails(@NotNull com.atlassian.struts.ValidationAware validationAware, String buildKey, String buildName)
PlanValidationService
validateNewPlanDetails
in interface PlanValidationService
validationAware
- - object to add errors to if any are foundbuildKey
- - the key for the planbuildName
- - the name for the planpublic void validateNewJobForExistingChain(@NotNull com.atlassian.struts.ValidationAware validationAware, @NotNull Chain existingChain, @NotNull String buildKey, @Nullable String buildName)
validateNewJobForExistingChain
in interface PlanValidationService
validationAware
- - object to add errors to if any are foundexistingChain
- - the chain the new job will be added tobuildKey
- - the key for the jobbuildName
- - the name for the job.public void validateNewChainForExistingProject(@NotNull com.atlassian.struts.ValidationAware validationAware, String existingProjectKey, String buildKey, String buildName)
PlanValidationService
validateNewChainForExistingProject
in interface PlanValidationService
validationAware
- - object to add errors to if any are foundexistingProjectKey
- - the key of an existing projectbuildKey
- - the key for the new chainbuildName
- - the name of the new chainpublic void validateNewChainForExistingProject(@NotNull com.atlassian.struts.ValidationAware validationAware, @NotNull String existingProjectKey, @NotNull String buildName)
PlanValidationService
validateNewChainForExistingProject
in interface PlanValidationService
validationAware
- - object to add errors to if any are foundexistingProjectKey
- - the key of an existing projectbuildName
- - the name of the new chainpublic void validateNewPlanBranchForMaster(@NotNull com.atlassian.struts.ValidationAware validationAware, @NotNull ImmutableChain masterChain, @NotNull String branchName)
PlanValidationService
validateNewPlanBranchForMaster
in interface PlanValidationService
validationAware
- object to add errors to if any are foundmasterChain
- the master chainbranchName
- the name of the new chainpublic void validateNewProjectDetails(@NotNull com.atlassian.struts.ValidationAware validationAware, String projectName, String projectKey)
PlanValidationService
validateNewProjectDetails
in interface PlanValidationService
validationAware
- object to add errors to if any are foundprojectName
- name of the project to validateprojectKey
- key of the project to validatepublic void validateNewProjectDetails(@NotNull com.atlassian.struts.ValidationAware validationAware, @Nullable String projectName, @Nullable String projectKey, @Nullable String projectDescription)
PlanValidationService
validateNewProjectDetails
in interface PlanValidationService
validationAware
- object to add errors to if any are foundprojectName
- name of the project to validateprojectKey
- key of the project to validateprojectDescription
- description of the project to validatepublic void validateNewStageForChain(@NotNull com.atlassian.struts.ValidationAware validationAware, @NotNull Chain chain, @Nullable String stageName)
PlanValidationService
validateNewStageForChain
in interface PlanValidationService
validationAware
- - to add any errors tochain
- - the chain the stage will be added tostageName
- - the stage to be addedpublic void validateStageExistsForChain(com.atlassian.struts.ValidationAware validationAware, Chain chain, String stageName)
PlanValidationService
validateStageExistsForChain
in interface PlanValidationService
validationAware
- - to add the errors tochain
- - the chain the stage should exist instageName
- - the stage to check forpublic void validateKey(@NotNull com.opensymphony.xwork.ValidationAware validationAware, String fieldName, String errorPrefix, String key)
PlanValidationServiceXWork1
validateKey
in interface PlanValidationServiceXWork1
validationAware
- - the object to add errors to if any are foundfieldName
- - the name of the field to add the errors toerrorPrefix
- - the prefix to put in front of the standardised error keys. (e.g. "plan", "chain")key
- - the actual string to validatepublic void validateName(@NotNull com.opensymphony.xwork.ValidationAware validationAware, String fieldName, String errorPrefix, String name)
PlanValidationServiceXWork1
validateName
in interface PlanValidationServiceXWork1
validationAware
- - the object to add errors to if any are foundfieldName
- - the name of the field to add the errors toerrorPrefix
- - the prefix to put in front of the standardised error keys. (e.g. "plan", "chain")name
- - the actual string to validatepublic void validateDescription(@NotNull com.opensymphony.xwork.ValidationAware validationAware, String fieldName, String description)
PlanValidationServiceXWork1
validateDescription
in interface PlanValidationServiceXWork1
validationAware
- - the object to add errors to if any are foundfieldName
- - the name of the field to add the errors todescription
- - the actual text to validatepublic void validatePlanToCloneExists(@NotNull com.opensymphony.xwork.ValidationAware validationAware, @Nullable String buildKeyToClone)
PlanValidationServiceXWork1
validatePlanToCloneExists
in interface PlanValidationServiceXWork1
validationAware
- - object to add errors to if any are foundbuildKeyToClone
- - the key of the plan to clonepublic void validateNewPlanDetails(@NotNull com.opensymphony.xwork.ValidationAware validationAware, @Nullable String buildKey, @Nullable String buildName)
PlanValidationServiceXWork1
validateNewPlanDetails
in interface PlanValidationServiceXWork1
validationAware
- - object to add errors to if any are foundbuildKey
- - the key for the planbuildName
- - the name for the planpublic void validateNewJobForExistingChain(@NotNull com.opensymphony.xwork.ValidationAware validationAware, @NotNull Chain existingChain, @NotNull String buildKey, @Nullable String buildName)
validateNewJobForExistingChain
in interface PlanValidationServiceXWork1
validationAware
- - object to add errors to if any are foundexistingChain
- - the chain the new job will be added tobuildKey
- - the key for the jobbuildName
- - the name for the job.public void validateNewChainForExistingProject(@NotNull com.opensymphony.xwork.ValidationAware validationAware, String existingProjectKey, String chainKey, String chainName)
PlanValidationServiceXWork1
validateNewChainForExistingProject
in interface PlanValidationServiceXWork1
validationAware
- - object to add errors to if any are foundexistingProjectKey
- - the key of an existing projectchainKey
- - the key for the new chainchainName
- - the name of the new chainpublic void validateNewChainForExistingProject(@NotNull com.opensymphony.xwork.ValidationAware validationAware, @NotNull String existingProjectKey, @NotNull String chainName)
PlanValidationServiceXWork1
validateNewChainForExistingProject
in interface PlanValidationServiceXWork1
validationAware
- - object to add errors to if any are foundexistingProjectKey
- - the key of an existing projectchainName
- - the name of the new chainpublic void validateNewPlanBranchForMaster(@NotNull com.opensymphony.xwork.ValidationAware validationAware, @NotNull ImmutableChain masterChain, @NotNull String branchName)
PlanValidationServiceXWork1
validateNewPlanBranchForMaster
in interface PlanValidationServiceXWork1
validationAware
- object to add errors to if any are foundmasterChain
- the master chainbranchName
- the name of the new chainpublic void validateNewProjectDetails(@NotNull com.opensymphony.xwork.ValidationAware validationAware, @Nullable String projectName, @Nullable String projectKey)
PlanValidationServiceXWork1
validateNewProjectDetails
in interface PlanValidationServiceXWork1
validationAware
- - object to add errors to if any are foundprojectName
- - name of the project to validateprojectKey
- - key of the project to validatepublic void validateNewStageForChain(com.opensymphony.xwork.ValidationAware validationAware, Chain chain, String stageName)
PlanValidationServiceXWork1
validateNewStageForChain
in interface PlanValidationServiceXWork1
validationAware
- - to add any errors tochain
- - the chain the stage will be added tostageName
- - the stage to be addedpublic void validateStageExistsForChain(com.opensymphony.xwork.ValidationAware validationAware, Chain chain, String stageName)
PlanValidationServiceXWork1
validateStageExistsForChain
in interface PlanValidationServiceXWork1
validationAware
- - to add the errors tochain
- - the chain the stage should exist instageName
- - the stage to check forCopyright © 2018 Atlassian Software Systems Pty Ltd. All rights reserved.