SimpleValidationResult
instead.@Deprecated public class CoreValidationResult extends Object implements ValidationResult
ValidationError
s to API ValidationResult
s.Modifier and Type | Field and Description |
---|---|
static CoreValidationResult |
FORBIDDEN
Deprecated.
A singleton unauthorized result.
|
static CoreValidationResult |
VALID
Deprecated.
A singleton valid result.
|
Modifier and Type | Method and Description |
---|---|
ServiceException |
convertToServiceException(String errorMsg)
Deprecated.
|
static CoreValidationResult |
create(boolean authorized,
Collection<ValidationError> coreErrors)
Deprecated.
since 5.7, use
CoreValidationResultFactory#create(boolean, java.util.Collection instead. |
static CoreValidationResult |
create(boolean authorized,
List<ValidationError> errors)
Deprecated.
since 5.7, use
SimpleValidationResult.Builder instead |
static CoreValidationResult |
create(boolean authorized,
Message message)
Deprecated.
since 5.7, use
SimpleValidationResult.Builder instead. |
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.
|
boolean |
isAuthorized()
Deprecated.
|
boolean |
isValid()
Deprecated.
|
ServiceException |
throwIfInvalid(String msg)
Deprecated.
converts this validation result into an Exception and throws it
|
public 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.ValidationError
s.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
insteadValidationError
s.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 frompublic 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()
isAuthorized
in interface ValidationResult
public boolean isValid()
isValid
in interface ValidationResult
public List<ValidationError> getErrors()
getErrors
in interface ValidationResult
public ServiceException throwIfInvalid(String msg) throws ServiceException
ValidationResult
throwIfInvalid
in interface ValidationResult
ServiceException
public ServiceException convertToServiceException(String errorMsg)
Copyright © 2003–2015 Atlassian. All rights reserved.