Package com.atlassian.validation
Class Failure
java.lang.Object
com.atlassian.validation.Failure
- All Implemented Interfaces:
Validator.Result
A
Validator.Result
that represents epic validation failure.- Since:
- v4.4
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Failure
Creates failure from a given text message, encoding the text message as a whole into html for the html message.- Parameters:
message
- the failure message in text.
-
Failure
Creates failure from a text message and an html equivalent message.- Parameters:
textError
- the error to be displayed in plain text output (such as logs).htmlError
- the error to be displayed in a browser or html email.
-
-
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.
-