com.atlassian.confluence.rest.api.model.validation
Class RestValidationResult
java.lang.Object
com.atlassian.confluence.rest.api.model.validation.RestValidationResult
- All Implemented Interfaces:
- ValidationResult
@ExperimentalApi
public class RestValidationResult
- extends Object
- implements ValidationResult
REST-friendly version of a ValidationResult.
- Since:
- 5.6
RestValidationResult
public RestValidationResult(ValidationResult that)
isAuthorized
public boolean isAuthorized()
- Specified by:
isAuthorized in interface ValidationResult
- Returns:
- true if the current user is permitted to perform the execution that the validation is for
isValid
public boolean isValid()
- Specified by:
isValid in interface ValidationResult
- Returns:
- true if there are no errors in this result
getErrors
public Iterable<ValidationError> getErrors()
- Specified by:
getErrors in interface ValidationResult
- Returns:
- an iterable of the errors stored in this result
throwIfInvalid
public ServiceException throwIfInvalid(String msg)
throws ServiceException
- Description copied from interface:
ValidationResult
- converts this validation result into an Exception and throws it
- Specified by:
throwIfInvalid in interface ValidationResult
- Returns:
- the exception that will be thrown
- Throws:
ServiceException
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2003–2015 Atlassian. All rights reserved.