Class RestValidationResult
java.lang.Object
com.atlassian.confluence.rest.v2.api.model.validation.RestValidationResult
- All Implemented Interfaces:
ValidationResult
REST-friendly version of a
ValidationResult
.- Since:
- 9.0
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.atlassian.confluence.api.model.validation.ValidationResult
convertToServiceException, isNotSuccessful, isSuccessful, throwIfInvalid, throwIfInvalid, throwIfNotSuccessful, throwIfNotSuccessful, throwIfNotValid
-
Constructor Details
-
RestValidationResult
-
-
Method Details
-
isAuthorized
public boolean isAuthorized()Description copied from interface:ValidationResult
Checks for authorization status. Does NOT imply thevalidity check
.- Specified by:
isAuthorized
in interfaceValidationResult
- Returns:
true
if the current user is permitted to perform the execution that the validation is for,false
otherwise.- See Also:
-
isAllowedInReadOnlyMode
public boolean isAllowedInReadOnlyMode()Description copied from interface:ValidationResult
Checks for allowedInReadOnlyMode status. Does NOT imply thevalidity check
.- Specified by:
isAllowedInReadOnlyMode
in interfaceValidationResult
- Returns:
true
if the current user is allowed to perform the execution in read-only mode that the validation is for,false
otherwise.- See Also:
-
isValid
public boolean isValid()Description copied from interface:ValidationResult
Checks for validity. Does NOT imply theauthorization check
.By contract implementations MUST return
false
if there are errors in this ValidationResult. Default implementation is usually enough.- Specified by:
isValid
in interfaceValidationResult
- Returns:
true
if there are no errors in this result,false
otherwise.- See Also:
-
getErrors
Description copied from interface:ValidationResult
Returns an iterable of the errors (if any) stored in this result. By contract having any errors here MUST also result inValidationResult.isValid()
returningfalse
.Default implementation of
ValidationResult.isValid()
is safe fornull
values. Be cautious about returningnull
if not using the default implementation forValidationResult.isValid()
.- Specified by:
getErrors
in interfaceValidationResult
- Returns:
- an iterable of the errors stored in this result.
- See Also:
-
toString
-