com.atlassian.bamboo.validation
Class ValidationServiceImpl
java.lang.Object
com.atlassian.bamboo.validation.ValidationServiceImpl
- All Implemented Interfaces:
- ValidationService
public class ValidationServiceImpl
- extends Object
- implements ValidationService
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FULL_JOB_KEY_PATTERN
public static final Pattern FULL_JOB_KEY_PATTERN
PARTIAL_JOB_KEY_PATTERN
public static final Pattern PARTIAL_JOB_KEY_PATTERN
ILLEGAL_NAME_CHARACTERS
public static final String ILLEGAL_NAME_CHARACTERS
- See Also:
- Constant Field Values
DATABASE_STRING_LIMIT
public static final int DATABASE_STRING_LIMIT
- See Also:
- Constant Field Values
ValidationServiceImpl
public ValidationServiceImpl(com.opensymphony.xwork2.TextProvider textProvider)
validateKey
@NotNull
public ErrorCollection validateKey(@NotNull
String fieldName,
@NotNull
ValidationService.ValidationType type,
@Nullable
String key,
ValidationService.ValidationFunction... functions)
- Description copied from interface:
ValidationService
- Validate any String against Bamboo's generic rules for keys.
- Specified by:
validateKey
in interface ValidationService
- Parameters:
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.
validateName
@NotNull
public ErrorCollection validateName(@NotNull
String fieldName,
@NotNull
String errorPrefix,
@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 toerrorPrefix
- - the prefix to put in front of the standardised error keys. (e.g. "plan", "chain")name
- - the actual string to validate
validateDescription
@NotNull
public ErrorCollection validateDescription(@NotNull
String fieldName,
@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 todescription
- - the actual text to validate
Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.