@ExperimentalApi public class RestValidationResult extends Object implements ValidationResult
ValidationResult
.Constructor and Description |
---|
RestValidationResult(ValidationResult that) |
Modifier and Type | Method and Description |
---|---|
Iterable<ValidationError> |
getErrors()
Returns an iterable of the errors (if any) stored in this result.
|
boolean |
isAuthorized()
Checks for authorization status.
|
boolean |
isValid()
Checks for validity.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
convertToServiceException, isNotSuccessful, isSuccessful, throwIfInvalid, throwIfInvalid, throwIfNotSuccessful, throwIfNotSuccessful, throwIfNotValid
public RestValidationResult(ValidationResult that)
public boolean isAuthorized()
ValidationResult
validity check
.isAuthorized
in interface ValidationResult
true
if the current user is permitted to perform the execution that the validation is for, false
otherwise.ValidationResult.isValid()
,
ValidationResult.isSuccessful()
public boolean isValid()
ValidationResult
authorization check
.
By contract implementations MUST return false
if there are errors in this ValidationResult.
Default implementation is usually enough.
isValid
in interface ValidationResult
true
if there are no errors in this result, false
otherwise.ValidationResult.getErrors()
,
ValidationResult.isAuthorized()
,
ValidationResult.isSuccessful()
public Iterable<ValidationError> getErrors()
ValidationResult
ValidationResult.isValid()
returning false
.
Default implementation of ValidationResult.isValid()
is safe for null
values.
Be cautious about returning null
if not using the default implementation for ValidationResult.isValid()
.
getErrors
in interface ValidationResult
ValidationResult.isValid()
,
ValidationError
Copyright © 2003–2018 Atlassian. All rights reserved.