Class ValidationServiceImpl

    • Field Detail

      • PARTIAL_JOB_KEY_PATTERN

        public static final Pattern PARTIAL_JOB_KEY_PATTERN
    • Constructor Detail

      • ValidationServiceImpl

        public ValidationServiceImpl​(com.opensymphony.xwork2.TextProvider textProvider)
    • Method Detail

      • validateJobKey

        @NotNull
        public @NotNull ErrorCollection validateJobKey​(@NotNull
                                                       @NotNull String fieldName,
                                                       @Nullable
                                                       @Nullable String jobKey,
                                                       ValidationFunction... functions)
        Description copied from interface: ValidationService
        Verify any String that it is a valid job key.
        Specified by:
        validateJobKey in interface ValidationService
        Parameters:
        fieldName - the name of the field to add the errors to.
        jobKey - the actual string to validate.
        functions - additional validation functions to run if all generic rules are satisfied. Functions are run in the order they are provided. If a function adds an error to the error collection, subsequent functions will not be run.
        See Also:
        ValidationFunctionFactory
      • validateChainKey

        @NotNull
        public @NotNull ErrorCollection validateChainKey​(@NotNull
                                                         @NotNull String fieldName,
                                                         @Nullable
                                                         @Nullable String chainKey,
                                                         ValidationFunction... functions)
        Description copied from interface: ValidationService
        Verify any String that it is a valid chain key.
        Specified by:
        validateChainKey in interface ValidationService
        Parameters:
        fieldName - the name of the field to add the errors to.
        chainKey - the actual string to validate.
        functions - additional validation functions to run if all generic rules are satisfied. Functions are run in the order they are provided. If a function adds an error to the error collection, subsequent functions will not be run.
        See Also:
        ValidationFunctionFactory
      • validateProjectKey

        @NotNull
        public @NotNull ErrorCollection validateProjectKey​(@NotNull
                                                           @NotNull String fieldName,
                                                           @Nullable
                                                           @Nullable String projectKey,
                                                           ValidationFunction... functions)
        Description copied from interface: ValidationService
        Verify any String that it is a valid Project key.
        Specified by:
        validateProjectKey in interface ValidationService
        Parameters:
        fieldName - the name of the field to add the errors to
        projectKey - the actual string to validate
        functions - additional validation functions to run if all generic rules are satisfied. Functions are run in the order they are provided. If a function adds an error to the error collection, subsequent functions will not be run.
        See Also:
        ValidationFunctionFactory
      • validateName

        @NotNull
        public @NotNull ErrorCollection validateName​(@NotNull
                                                     @NotNull String fieldName,
                                                     @NotNull
                                                     @NotNull String errorPrefix,
                                                     @Nullable
                                                     @Nullable String name)
        Description copied from interface: ValidationService
        Validate any String against Bamboo's generic rules for names.
        Specified by:
        validateName in interface ValidationService
        Parameters:
        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

        @NotNull
        public @NotNull ErrorCollection validateDescription​(@NotNull
                                                            @NotNull String fieldName,
                                                            @Nullable
                                                            @Nullable String description)
        Description copied from interface: ValidationService
        Validate the description field of any object. All it really does is check length
        Specified by:
        validateDescription in interface ValidationService
        Parameters:
        fieldName - the name of the field to add the errors to
        description - the actual text to validate