Package com.atlassian.validation
Class Success
java.lang.Object
com.atlassian.validation.Success
- All Implemented Interfaces:
Validator.Result
Basic implementation of a successful validation result that takes an instance of the value object to be returned as
the valid instance.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Success
-
-
Method Details
-
isValid
public boolean isValid()Description copied from interface:Validator.Result
Whether the validation succeeded.- Specified by:
isValid
in interfaceValidator.Result
- Returns:
- true only if validaiton was successful.
-
getErrorMessage
Description copied from interface:Validator.Result
If validation failed, the reason is found here in plain text.- Specified by:
getErrorMessage
in interfaceValidator.Result
- Returns:
- the error message if any, or null if validation succeeded.
-
getErrorMessageHtml
Description copied from interface:Validator.Result
If validation failed, the reason is found here in html.- Specified by:
getErrorMessageHtml
in interfaceValidator.Result
- Returns:
- the error message if any, or null if validation succeeded.
-
get
Description copied from interface:Validator.Result
If valid returns the value in string form.- Specified by:
get
in interfaceValidator.Result
- Returns:
- the value.
- Throws:
IllegalStateException
- if the result is not valid.
-