Class PlanValidationServiceImpl

    • Method Detail

      • validateKey

        public void validateKey​(@NotNull
                                @NotNull com.atlassian.struts.ValidationAware validationAware,
                                String fieldName,
                                String errorPrefix,
                                String key)
        Description copied from interface: PlanValidationService
        Validate any String against Bamboo's generic rules for keys.
        Specified by:
        validateKey in interface PlanValidationService
        Parameters:
        validationAware - - the object to add errors to if any are found
        fieldName - - the name of the field to add the errors to
        errorPrefix - - the prefix to put in front of the standardised error keys. (e.g. "plan", "chain")
        key - - the actual string to validate
      • validateName

        public void validateName​(@NotNull
                                 @NotNull com.atlassian.struts.ValidationAware validationAware,
                                 String fieldName,
                                 String errorPrefix,
                                 String name)
        Description copied from interface: PlanValidationService
        Validate any String against Bamboo's generic rules for names.
        Specified by:
        validateName in interface PlanValidationService
        Parameters:
        validationAware - - the object to add errors to if any are found
        fieldName - - the name of the field to add the errors to
        errorPrefix - - the prefix to put in front of the standardised error keys. (e.g. "plan", "chain")
        name - - the actual string to validate
      • validateDescription

        public void validateDescription​(@NotNull
                                        @NotNull com.atlassian.struts.ValidationAware validationAware,
                                        String fieldName,
                                        String description)
        Description copied from interface: PlanValidationService
        Validate the description field of any object. All it really does is check length
        Specified by:
        validateDescription in interface PlanValidationService
        Parameters:
        validationAware - - the object to add errors to if any are found
        fieldName - - the name of the field to add the errors to
        description - - the actual text to validate
      • validatePlanToCloneExists

        public void validatePlanToCloneExists​(@NotNull
                                              @NotNull com.atlassian.struts.ValidationAware validationAware,
                                              @Nullable
                                              @Nullable String buildKeyToClone)
        Description copied from interface: PlanValidationService
        Validate that the plan t clone exists
        Specified by:
        validatePlanToCloneExists in interface PlanValidationService
        Parameters:
        validationAware - - object to add errors to if any are found
        buildKeyToClone - - the key of the plan to clone
      • validateNewPlanDetails

        public void validateNewPlanDetails​(@NotNull
                                           @NotNull com.atlassian.struts.ValidationAware validationAware,
                                           String buildKey,
                                           String buildName)
        Description copied from interface: PlanValidationService
        Ensure that the build key and name are valid
        Specified by:
        validateNewPlanDetails in interface PlanValidationService
        Parameters:
        validationAware - - object to add errors to if any are found
        buildKey - - the key for the plan
        buildName - - the name for the plan
      • validateNewJobForExistingChain

        public void validateNewJobForExistingChain​(@NotNull
                                                   @NotNull com.atlassian.struts.ValidationAware validationAware,
                                                   @NotNull
                                                   @NotNull Chain existingChain,
                                                   @NotNull
                                                   @NotNull String buildKey,
                                                   @Nullable
                                                   @Nullable String buildName)
        Specified by:
        validateNewJobForExistingChain in interface PlanValidationService
        Parameters:
        validationAware - - object to add errors to if any are found
        existingChain - - the chain the new job will be added to
        buildKey - - the key for the job
        buildName - - the name for the job.
      • validateNewChainForExistingProject

        public void validateNewChainForExistingProject​(@NotNull
                                                       @NotNull com.atlassian.struts.ValidationAware validationAware,
                                                       String existingProjectKey,
                                                       String buildKey,
                                                       String buildName)
        Description copied from interface: PlanValidationService
        Validate that new chain name and key is unique within the project
        Specified by:
        validateNewChainForExistingProject in interface PlanValidationService
        Parameters:
        validationAware - - object to add errors to if any are found
        existingProjectKey - - the key of an existing project
        buildKey - - the key for the new chain
        buildName - - the name of the new chain
      • validateNewChainForExistingProject

        public void validateNewChainForExistingProject​(@NotNull
                                                       @NotNull com.atlassian.struts.ValidationAware validationAware,
                                                       @NotNull
                                                       @NotNull String existingProjectKey,
                                                       @NotNull
                                                       @NotNull String buildName)
        Description copied from interface: PlanValidationService
        Validate that new chain name (only) is unique within the project
        Specified by:
        validateNewChainForExistingProject in interface PlanValidationService
        Parameters:
        validationAware - - object to add errors to if any are found
        existingProjectKey - - the key of an existing project
        buildName - - the name of the new chain
      • validateNewPlanBranchForMaster

        public void validateNewPlanBranchForMaster​(@NotNull
                                                   @NotNull com.atlassian.struts.ValidationAware validationAware,
                                                   @NotNull
                                                   @NotNull ImmutableChain masterChain,
                                                   @NotNull
                                                   @NotNull String branchName)
        Description copied from interface: PlanValidationService
        Validate that new plan branch name (only) is unique within a set of branches with a common master
        Specified by:
        validateNewPlanBranchForMaster in interface PlanValidationService
        Parameters:
        validationAware - object to add errors to if any are found
        masterChain - the master chain
        branchName - the name of the new chain
      • validateNewProjectDetails

        public void validateNewProjectDetails​(@NotNull
                                              @NotNull com.atlassian.struts.ValidationAware validationAware,
                                              String projectName,
                                              String projectKey)
        Description copied from interface: PlanValidationService
        Validate that the new project details are valid
        Specified by:
        validateNewProjectDetails in interface PlanValidationService
        Parameters:
        validationAware - object to add errors to if any are found
        projectName - name of the project to validate
        projectKey - key of the project to validate
      • validateNewProjectDetails

        public void validateNewProjectDetails​(@NotNull
                                              @NotNull com.atlassian.struts.ValidationAware validationAware,
                                              @Nullable
                                              @Nullable String projectName,
                                              @Nullable
                                              @Nullable String projectKey,
                                              @Nullable
                                              @Nullable String projectDescription)
        Description copied from interface: PlanValidationService
        Validate that the new project details are valid
        Specified by:
        validateNewProjectDetails in interface PlanValidationService
        Parameters:
        validationAware - object to add errors to if any are found
        projectName - name of the project to validate
        projectKey - key of the project to validate
        projectDescription - description of the project to validate
      • validateNewStageForChain

        public void validateNewStageForChain​(@NotNull
                                             @NotNull com.atlassian.struts.ValidationAware validationAware,
                                             @NotNull
                                             @NotNull Chain chain,
                                             @Nullable
                                             @Nullable String stageName)
        Description copied from interface: PlanValidationService
        Validate the the new stage can be added to the given chain
        Specified by:
        validateNewStageForChain in interface PlanValidationService
        Parameters:
        validationAware - - to add any errors to
        chain - - the chain the stage will be added to
        stageName - - the stage to be added
      • validateStageExistsForChain

        public void validateStageExistsForChain​(com.atlassian.struts.ValidationAware validationAware,
                                                Chain chain,
                                                String stageName)
        Description copied from interface: PlanValidationService
        Ensures that the stage currently exists for a chain
        Specified by:
        validateStageExistsForChain in interface PlanValidationService
        Parameters:
        validationAware - - to add the errors to
        chain - - the chain the stage should exist in
        stageName - - the stage to check for
      • validateKey

        public void validateKey​(@NotNull
                                com.opensymphony.xwork.ValidationAware validationAware,
                                String fieldName,
                                String errorPrefix,
                                String key)
        Description copied from interface: PlanValidationServiceXWork1
        Validate any String against Bamboo's generic rules for keys.
        Specified by:
        validateKey in interface PlanValidationServiceXWork1
        Parameters:
        validationAware - - the object to add errors to if any are found
        fieldName - - the name of the field to add the errors to
        errorPrefix - - the prefix to put in front of the standardised error keys. (e.g. "plan", "chain")
        key - - the actual string to validate
      • validateName

        public void validateName​(@NotNull
                                 com.opensymphony.xwork.ValidationAware validationAware,
                                 String fieldName,
                                 String errorPrefix,
                                 String name)
        Description copied from interface: PlanValidationServiceXWork1
        Validate any String against Bamboo's generic rules for names.
        Specified by:
        validateName in interface PlanValidationServiceXWork1
        Parameters:
        validationAware - - the object to add errors to if any are found
        fieldName - - the name of the field to add the errors to
        errorPrefix - - the prefix to put in front of the standardised error keys. (e.g. "plan", "chain")
        name - - the actual string to validate
      • validateDescription

        public void validateDescription​(@NotNull
                                        com.opensymphony.xwork.ValidationAware validationAware,
                                        String fieldName,
                                        String description)
        Description copied from interface: PlanValidationServiceXWork1
        Validate the description field of any object. All it really does is check length
        Specified by:
        validateDescription in interface PlanValidationServiceXWork1
        Parameters:
        validationAware - - the object to add errors to if any are found
        fieldName - - the name of the field to add the errors to
        description - - the actual text to validate
      • validatePlanToCloneExists

        public void validatePlanToCloneExists​(@NotNull
                                              com.opensymphony.xwork.ValidationAware validationAware,
                                              @Nullable
                                              @Nullable String buildKeyToClone)
        Description copied from interface: PlanValidationServiceXWork1
        Validate that the plan t clone exists
        Specified by:
        validatePlanToCloneExists in interface PlanValidationServiceXWork1
        Parameters:
        validationAware - - object to add errors to if any are found
        buildKeyToClone - - the key of the plan to clone
      • validateNewPlanDetails

        public void validateNewPlanDetails​(@NotNull
                                           com.opensymphony.xwork.ValidationAware validationAware,
                                           @Nullable
                                           @Nullable String buildKey,
                                           @Nullable
                                           @Nullable String buildName)
        Description copied from interface: PlanValidationServiceXWork1
        Ensure that the build key and name are valid
        Specified by:
        validateNewPlanDetails in interface PlanValidationServiceXWork1
        Parameters:
        validationAware - - object to add errors to if any are found
        buildKey - - the key for the plan
        buildName - - the name for the plan
      • validateNewJobForExistingChain

        public void validateNewJobForExistingChain​(@NotNull
                                                   com.opensymphony.xwork.ValidationAware validationAware,
                                                   @NotNull
                                                   @NotNull Chain existingChain,
                                                   @NotNull
                                                   @NotNull String buildKey,
                                                   @Nullable
                                                   @Nullable String buildName)
        Specified by:
        validateNewJobForExistingChain in interface PlanValidationServiceXWork1
        Parameters:
        validationAware - - object to add errors to if any are found
        existingChain - - the chain the new job will be added to
        buildKey - - the key for the job
        buildName - - the name for the job.
      • validateNewChainForExistingProject

        public void validateNewChainForExistingProject​(@NotNull
                                                       com.opensymphony.xwork.ValidationAware validationAware,
                                                       String existingProjectKey,
                                                       String chainKey,
                                                       String chainName)
        Description copied from interface: PlanValidationServiceXWork1
        Validate that new chain name and key is unique within the project
        Specified by:
        validateNewChainForExistingProject in interface PlanValidationServiceXWork1
        Parameters:
        validationAware - - object to add errors to if any are found
        existingProjectKey - - the key of an existing project
        chainKey - - the key for the new chain
        chainName - - the name of the new chain
      • validateNewChainForExistingProject

        public void validateNewChainForExistingProject​(@NotNull
                                                       com.opensymphony.xwork.ValidationAware validationAware,
                                                       @NotNull
                                                       @NotNull String existingProjectKey,
                                                       @NotNull
                                                       @NotNull String chainName)
        Description copied from interface: PlanValidationServiceXWork1
        Validate that new chain name (only) is unique within the project
        Specified by:
        validateNewChainForExistingProject in interface PlanValidationServiceXWork1
        Parameters:
        validationAware - - object to add errors to if any are found
        existingProjectKey - - the key of an existing project
        chainName - - the name of the new chain
      • validateNewPlanBranchForMaster

        public void validateNewPlanBranchForMaster​(@NotNull
                                                   com.opensymphony.xwork.ValidationAware validationAware,
                                                   @NotNull
                                                   @NotNull ImmutableChain masterChain,
                                                   @NotNull
                                                   @NotNull String branchName)
        Description copied from interface: PlanValidationServiceXWork1
        Validate that new plan branch name (only) is unique within a set of branches with a common master
        Specified by:
        validateNewPlanBranchForMaster in interface PlanValidationServiceXWork1
        Parameters:
        validationAware - object to add errors to if any are found
        masterChain - the master chain
        branchName - the name of the new chain
      • validateNewProjectDetails

        public void validateNewProjectDetails​(@NotNull
                                              com.opensymphony.xwork.ValidationAware validationAware,
                                              @Nullable
                                              @Nullable String projectName,
                                              @Nullable
                                              @Nullable String projectKey)
        Description copied from interface: PlanValidationServiceXWork1
        Validate that the new project details are valid
        Specified by:
        validateNewProjectDetails in interface PlanValidationServiceXWork1
        Parameters:
        validationAware - - object to add errors to if any are found
        projectName - - name of the project to validate
        projectKey - - key of the project to validate
      • validateNewStageForChain

        public void validateNewStageForChain​(com.opensymphony.xwork.ValidationAware validationAware,
                                             Chain chain,
                                             String stageName)
        Description copied from interface: PlanValidationServiceXWork1
        Validate the the new stage can be added to the given chain
        Specified by:
        validateNewStageForChain in interface PlanValidationServiceXWork1
        Parameters:
        validationAware - - to add any errors to
        chain - - the chain the stage will be added to
        stageName - - the stage to be added
      • validateStageExistsForChain

        public void validateStageExistsForChain​(com.opensymphony.xwork.ValidationAware validationAware,
                                                Chain chain,
                                                String stageName)
        Description copied from interface: PlanValidationServiceXWork1
        Ensures that the stage currently exists for a chain
        Specified by:
        validateStageExistsForChain in interface PlanValidationServiceXWork1
        Parameters:
        validationAware - - to add the errors to
        chain - - the chain the stage should exist in
        stageName - - the stage to check for