public final class

Success

extends Object
implements Validator.Result
java.lang.Object
   ↳ com.atlassian.validation.Success

Class Overview

Basic implementation of a successful validation result that takes an instance of the value object to be returned as the valid instance.

Summary

Public Constructors
Success(String value)
Public Methods
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.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.validation.Validator.Result

Public Constructors

public Success (String value)

Public Methods

public String get ()

If valid returns the value in string form.

Returns
  • the value.

public String getErrorMessage ()

If validation failed, the reason is found here in plain text.

Returns
  • the error message if any, or null if validation succeeded.

public String getErrorMessageHtml ()

If validation failed, the reason is found here in html.

Returns
  • the error message if any, or null if validation succeeded.

public boolean isValid ()

Whether the validation succeeded.

Returns
  • true only if validaiton was successful.