|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.api.impl.model.validation.CoreValidationResult
SimpleValidationResult
instead.
@Deprecated public class CoreValidationResult
Adapts Confluence Core ValidationError
s to API ValidationResult
s.
Field Summary | |
---|---|
static CoreValidationResult |
FORBIDDEN
Deprecated. A singleton unauthorized result. |
static CoreValidationResult |
VALID
Deprecated. A singleton valid result. |
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final CoreValidationResult VALID
public static final CoreValidationResult FORBIDDEN
Method Detail |
---|
@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
instead
ValidationError
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 from
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 result
public 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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |