|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.validation.Failure
public final class Failure
A Validator.Result
that represents epic validation failure.
Constructor Summary | |
---|---|
Failure(String message)
Creates failure from a given text message, encoding the text message as a whole into html for the html message. |
|
Failure(String textError,
String htmlError)
Creates failure from a text message and an html equivalent message. |
Method Summary | |
---|---|
String |
get()
If valid returns the value in string form. |
String |
getErrorMessage()
If validation failed, the reason is found here in plain text. |
String |
getErrorMessageHtml()
If validation failed, the reason is found here in html. |
boolean |
isValid()
Whether the validation succeeded. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Failure(String message)
message
- the failure message in text.public Failure(String textError, String htmlError)
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 Detail |
---|
public boolean isValid()
Validator.Result
isValid
in interface Validator.Result
public String getErrorMessage()
Validator.Result
getErrorMessage
in interface Validator.Result
public String getErrorMessageHtml()
Validator.Result
getErrorMessageHtml
in interface Validator.Result
public String get() throws IllegalStateException
Validator.Result
get
in interface Validator.Result
IllegalStateException
- if the result is not valid.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |