public interface ValidationService
| Modifier and Type | Interface and Description |
|---|---|
static interface |
ValidationService.ValidationFunction
Function to call once the object is locked.
|
static class |
ValidationService.ValidationType |
| Modifier and Type | Field and Description |
|---|---|
static String |
FULL_JOB_KEY_REGEXP
Regular expression matching a full job key.
|
static String |
PARTIAL_JOB_KEY_REGEXP
Regular expression matching a partial job key.
|
| Modifier and Type | Method and Description |
|---|---|
ErrorCollection |
validateDescription(String fieldName,
String description)
Validate the description field of any object.
|
ErrorCollection |
validateKey(String fieldName,
ValidationService.ValidationType type,
String key,
ValidationService.ValidationFunction... functions)
Validate any String against Bamboo's generic rules for keys.
|
ErrorCollection |
validateName(String fieldName,
String errorPrefix,
String name)
Validate any String against Bamboo's generic rules for names.
|
static final String FULL_JOB_KEY_REGEXP
static final String PARTIAL_JOB_KEY_REGEXP
@NotNull ErrorCollection validateKey(@NotNull String fieldName, @NotNull ValidationService.ValidationType type, @Nullable String key, ValidationService.ValidationFunction... functions)
fieldName - - the name of the field to add the errors to.type - - the ValidationService.ValidationType the key pertains to.key - - 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.@NotNull ErrorCollection validateName(@NotNull String fieldName, @NotNull String errorPrefix, @Nullable String name)
fieldName - - 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 validate@NotNull ErrorCollection validateDescription(@NotNull String fieldName, @Nullable String description)
fieldName - - the name of the field to add the errors todescription - - the actual text to validateCopyright © 2016 Atlassian Software Systems Pty Ltd. All rights reserved.