Package com.sodius.oslc.client.requests
Class Validations.ValidationResult<T>
java.lang.Object
com.sodius.oslc.client.requests.Validations.ValidationResult<T>
- Type Parameters:
T- the type of resource retrieved during validation.
- Enclosing class:
Validations
The result of a validation, which is either the retrieved resource
or a message explaining the validation error.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the message explaining the validation error.Returns the retrieved resources as a result of the validation.booleanisValid()Determines if validation was successful,in which casegetResult()returns the retrieved resource andgetErrorMessage()isnull.
-
Method Details
-
isValid
public boolean isValid()Determines if validation was successful,in which casegetResult()returns the retrieved resource andgetErrorMessage()isnull.- Returns:
trueif validation is successful,falseotherwise.
-
getErrorMessage
Returns the message explaining the validation error.- Returns:
- the message explaining the validation error,
nullif validation is successful.
-
getResult
Returns the retrieved resources as a result of the validation.- Returns:
- the retrieved resource,
nullif validation is not a success.
-