com.atlassian.confluence.api.model.validation
Interface ValidationResult

All Known Implementing Classes:
CoreValidationResult, RestValidationResult, SimpleValidationResult

@ExperimentalApi
public interface ValidationResult

Stores the results after an API Service validateX() method is called.


Method Summary
 java.lang.Iterable<ValidationError> getErrors()
           
 boolean isAuthorized()
           
 boolean isValid()
           
 ServiceException throwIfInvalid(java.lang.String msg)
          converts this validation result into an Exception and throws it
 

Method Detail

isAuthorized

boolean isAuthorized()
Returns:
true if the current user is permitted to perform the execution that the validation is for

isValid

boolean isValid()
Returns:
true if there are no errors in this result

getErrors

java.lang.Iterable<ValidationError> getErrors()
Returns:
an iterable of the errors stored in this result

throwIfInvalid

ServiceException throwIfInvalid(java.lang.String msg)
                                throws ServiceException
converts this validation result into an Exception and throws it

Returns:
the exception that will be thrown
Throws:
ServiceException


Copyright © 2003-2014 Atlassian. All Rights Reserved.