SimpleValidationResult instead.@Deprecated public class CoreValidationResult extends Object implements ValidationResult
ValidationErrors to API ValidationResults.| Modifier and Type | Field and Description | 
|---|---|
| static CoreValidationResult | FORBIDDENDeprecated.  A singleton unauthorized result. | 
| static CoreValidationResult | VALIDDeprecated.  A singleton valid result. | 
| Modifier and Type | Method and Description | 
|---|---|
| ServiceException | convertToServiceException(String errorMsg)Deprecated.  Converts this validation result into a  ServiceExceptionwithout throwing. | 
| static CoreValidationResult | create(boolean authorized,
      Collection<ValidationError> coreErrors)Deprecated. 
 since 5.7, use  CoreValidationResultFactory#create(boolean, java.util.Collectioninstead. | 
| static CoreValidationResult | create(boolean authorized,
      List<ValidationError> errors)Deprecated. 
 since 5.7, use  SimpleValidationResult.Builderinstead | 
| static CoreValidationResult | create(boolean authorized,
      Message message)Deprecated. 
 since 5.7, use  SimpleValidationResult.Builderinstead. | 
| static ValidationResult | create(Message message,
      com.google.common.base.Function<String,? extends ServiceException> exceptionSupplier)Deprecated. 
 since 5.7, use {@link com.atlassian.confluence.api.model.validation.SimpleValidationResult.Builder instead. | 
| List<ValidationError> | getErrors()Deprecated.  Returns an iterable of the errors (if any) stored in this result. | 
| boolean | isAuthorized()Deprecated.  Checks for authorization status. | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisNotSuccessful, isSuccessful, isValid, throwIfInvalid, throwIfInvalid, throwIfNotSuccessful, throwIfNotSuccessful, throwIfNotValidpublic static final CoreValidationResult VALID
public static final CoreValidationResult FORBIDDEN
@Deprecated public static CoreValidationResult create(boolean authorized, Collection<ValidationError> coreErrors)
CoreValidationResultFactory#create(boolean, java.util.Collection)  instead.ValidationErrors.authorized - boolean value to identify is user is authorized to perform an actioncoreErrors - core errors to adapt into API validation results@Deprecated public static CoreValidationResult create(boolean authorized, List<ValidationError> errors)
SimpleValidationResult.Builder insteadValidationErrors.authorized - boolean value to identify is user is authorized to perform an actionerrors - API errors to transform into API validation results@Deprecated public static CoreValidationResult create(boolean authorized, Message message)
SimpleValidationResult.Builder instead.Message.authorized - boolean value to identify is user is authorized to perform an actionmessage - error message to create an API validation result from@Deprecated public static ValidationResult create(Message message, com.google.common.base.Function<String,? extends ServiceException> exceptionSupplier)
Message.message - error message to create an API validation result from, to be used in the exception being thrownexceptionSupplier - provides an exception to be thrown for a specific type of invalid resultpublic boolean isAuthorized()
ValidationResultvalidity check.isAuthorized in interface ValidationResulttrue if the current user is permitted to perform the execution that the validation is for, false otherwise.ValidationResult.isValid(), 
ValidationResult.isSuccessful()public List<ValidationError> getErrors()
ValidationResultValidationResult.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 ValidationResultValidationResult.isValid(), 
ValidationErrorpublic ServiceException convertToServiceException(String errorMsg)
ValidationResultServiceException without throwing.
 Implementations of this method should reasonably analyze the internals of this ValidationResult
 and return appropriate subclass of ServiceException which is most suitable for the case.
 
 This method is used internally in the default implementations of ValidationResult.throwIfNotSuccessful() and ValidationResult.throwIfNotSuccessful(String)
convertToServiceException in interface ValidationResulterrorMsg - message to put in the Exception returnedServiceException subclass.ValidationResult.throwIfNotSuccessful(), 
ValidationResult.throwIfNotSuccessful(String)Copyright © 2003–2017 Atlassian. All rights reserved.