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.ResultWhether the validation succeeded.- Specified by:
isValidin interfaceValidator.Result- Returns:
- true only if validaiton was successful.
-
getErrorMessage
Description copied from interface:Validator.ResultIf validation failed, the reason is found here in plain text.- Specified by:
getErrorMessagein interfaceValidator.Result- Returns:
- the error message if any, or null if validation succeeded.
-
getErrorMessageHtml
Description copied from interface:Validator.ResultIf validation failed, the reason is found here in html.- Specified by:
getErrorMessageHtmlin interfaceValidator.Result- Returns:
- the error message if any, or null if validation succeeded.
-
get
Description copied from interface:Validator.ResultIf valid returns the value in string form.- Specified by:
getin interfaceValidator.Result- Returns:
- the value.
- Throws:
IllegalStateException- if the result is not valid.
-