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.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.
-