Class HasSchemeValidatorForUri
java.lang.Object
dev.learning.xapi.model.validation.disableable.DisableableValidator<HasScheme,URI>
dev.learning.xapi.model.validation.internal.validators.HasSchemeValidatorForUri
The URI being validated must have a schema.
- Author:
- Thomas Turrell-Croft
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisValidIfEnabled(URI value, jakarta.validation.ConstraintValidatorContext context) Convenient method for implementing the validation logic independently from the disabled/enabled logic.Methods inherited from class dev.learning.xapi.model.validation.disableable.DisableableValidator
isDisabled, isValidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jakarta.validation.ConstraintValidator
initialize
-
Constructor Details
-
HasSchemeValidatorForUri
public HasSchemeValidatorForUri()
-
-
Method Details
-
isValidIfEnabled
Description copied from class:DisableableValidatorConvenient method for implementing the validation logic independently from the disabled/enabled logic.
If some more complex validation logic is needed (eg. some partial validation is needed even if the validator is disabled), then theDisableableValidator.isDisabled()method can be used directly from theConstraintValidator.isValid(Object, ConstraintValidatorContext)method.- Overrides:
isValidIfEnabledin classDisableableValidator<HasScheme,URI> - Parameters:
value- object to validatecontext- context in which the constraint is evaluated- Returns:
falseifvaluedoes not pass the constraint
-