|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.build.creation.PlanValidationServiceImpl
public class PlanValidationServiceImpl
Field Summary | |
---|---|
static java.lang.String |
CHAIN_PREFIX
|
static java.lang.String |
ILLEGAL_NAME_CHARACTERS
|
static java.lang.String |
JOB_PREFIX
|
static java.util.regex.Pattern |
KEY_PATTERN
|
static java.lang.String |
PLAN_PREFIX
|
static java.lang.String |
PROJECT_PREFIX
|
static java.lang.String |
STAGE_PREFIX
|
static java.lang.String |
SUB_BUILD_KEY
|
Fields inherited from interface com.atlassian.bamboo.build.creation.PlanValidationService |
---|
KEY_REGEXP |
Constructor Summary | |
---|---|
PlanValidationServiceImpl(ProjectManager projectManager,
PlanManager planManager,
com.opensymphony.xwork.TextProvider textProvider,
RepositoryConfigHelper repositoryConfigHelper,
WebRepositoryConfigHelper webRepositoryConfigHelper,
BuildStrategyConfigHelper buildStrategyConfigHelper,
ChainBranchManager chainBranchManager)
|
Method Summary | |
---|---|
BuildStrategyConfigHelper |
getBuildStrategyConfigHelper()
|
RepositoryConfigHelper |
getRepositoryConfigHelper()
|
WebRepositoryConfigHelper |
getWebRepositoryConfigHelper()
|
void |
validateDescription(com.opensymphony.xwork.ValidationAware validationAware,
java.lang.String fieldName,
java.lang.String description)
Validate the description field of any object. |
void |
validateKey(com.opensymphony.xwork.ValidationAware validationAware,
java.lang.String fieldName,
java.lang.String errorPrefix,
java.lang.String key)
Validate any String against Bamboo's generic rules for keys. |
void |
validateName(com.opensymphony.xwork.ValidationAware validationAware,
java.lang.String fieldName,
java.lang.String errorPrefix,
java.lang.String name)
Validate any String against Bamboo's generic rules for names. |
void |
validateNewChainForExistingProject(com.opensymphony.xwork.ValidationAware validationAware,
java.lang.String existingProjectKey,
java.lang.String buildName)
Validate that new chain name (only) is unique within the project |
void |
validateNewChainForExistingProject(com.opensymphony.xwork.ValidationAware validationAware,
java.lang.String existingProjectKey,
java.lang.String buildKey,
java.lang.String buildName)
Validate that new chain name and key is unique within the project |
void |
validateNewJobForExistingChain(com.opensymphony.xwork.ValidationAware validationAware,
Chain existingChain,
java.lang.String buildKey,
java.lang.String buildName)
|
void |
validateNewPlanBranchForMaster(com.opensymphony.xwork.ValidationAware validationAware,
ImmutableChain masterChain,
java.lang.String branchName)
Validate that new plan branch name (only) is unique within a set of branches with a common master |
void |
validateNewPlanDetails(com.opensymphony.xwork.ValidationAware validationAware,
java.lang.String buildKey,
java.lang.String buildName)
Ensure that the build key & name are valid |
void |
validateNewProjectDetails(com.opensymphony.xwork.ValidationAware validationAware,
java.lang.String projectName,
java.lang.String projectKey)
Validate that the new project details are valid |
void |
validateNewStageForChain(com.opensymphony.xwork.ValidationAware validationAware,
Chain chain,
java.lang.String stageName)
Validate the the new stage can be added to the given chain |
void |
validatePlanToCloneExists(com.opensymphony.xwork.ValidationAware validationAware,
java.lang.String buildKeyToClone)
Validate that the plan t clone exists |
void |
validateStageExistsForChain(com.opensymphony.xwork.ValidationAware validationAware,
Chain chain,
java.lang.String stageName)
Ensures that the stage currently exists for a chain |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ILLEGAL_NAME_CHARACTERS
public static final java.util.regex.Pattern KEY_PATTERN
public static final java.lang.String PLAN_PREFIX
public static final java.lang.String PROJECT_PREFIX
public static final java.lang.String CHAIN_PREFIX
public static final java.lang.String JOB_PREFIX
public static final java.lang.String STAGE_PREFIX
public static final java.lang.String SUB_BUILD_KEY
Constructor Detail |
---|
public PlanValidationServiceImpl(ProjectManager projectManager, PlanManager planManager, com.opensymphony.xwork.TextProvider textProvider, RepositoryConfigHelper repositoryConfigHelper, WebRepositoryConfigHelper webRepositoryConfigHelper, BuildStrategyConfigHelper buildStrategyConfigHelper, ChainBranchManager chainBranchManager)
Method Detail |
---|
public void validateKey(@NotNull com.opensymphony.xwork.ValidationAware validationAware, java.lang.String fieldName, java.lang.String errorPrefix, java.lang.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.opensymphony.xwork.ValidationAware validationAware, java.lang.String fieldName, java.lang.String errorPrefix, java.lang.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.opensymphony.xwork.ValidationAware validationAware, java.lang.String fieldName, java.lang.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.opensymphony.xwork.ValidationAware validationAware, @Nullable java.lang.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.opensymphony.xwork.ValidationAware validationAware, java.lang.String buildKey, java.lang.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.opensymphony.xwork.ValidationAware validationAware, @NotNull Chain existingChain, @NotNull java.lang.String buildKey, @Nullable java.lang.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.opensymphony.xwork.ValidationAware validationAware, java.lang.String existingProjectKey, java.lang.String buildKey, java.lang.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.opensymphony.xwork.ValidationAware validationAware, @NotNull java.lang.String existingProjectKey, @NotNull java.lang.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.opensymphony.xwork.ValidationAware validationAware, @NotNull ImmutableChain masterChain, @NotNull java.lang.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.opensymphony.xwork.ValidationAware validationAware, java.lang.String projectName, java.lang.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 validateNewStageForChain(@NotNull com.opensymphony.xwork.ValidationAware validationAware, @NotNull Chain chain, @Nullable java.lang.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.opensymphony.xwork.ValidationAware validationAware, Chain chain, java.lang.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 RepositoryConfigHelper getRepositoryConfigHelper()
getRepositoryConfigHelper
in interface PlanValidationService
public BuildStrategyConfigHelper getBuildStrategyConfigHelper()
getBuildStrategyConfigHelper
in interface PlanValidationService
public WebRepositoryConfigHelper getWebRepositoryConfigHelper()
getWebRepositoryConfigHelper
in interface PlanValidationService
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |