public class ModelValidationImpl extends Object implements org.apache.sling.models.spi.ModelValidation
| Constructor and Description |
|---|
ModelValidationImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
activate(ModelValidationConfiguration configuration) |
<ModelType> |
validate(Object adaptable,
Class<ModelType> modelClass,
boolean required)
Triggers validation for the given model on the given adaptable.
|
protected void activate(ModelValidationConfiguration configuration)
public <ModelType> RuntimeException validate(Object adaptable, Class<ModelType> modelClass, boolean required) throws org.apache.sling.models.factory.ValidationException, org.apache.sling.models.factory.InvalidModelException
validate in interface org.apache.sling.models.spi.ModelValidationadaptable - modelClass - required - ValidationException in case validation could not be performed if validation model could not be performed but
required=true or if the adaptable is neither a Resource nor a SlingHttpServletRequest.
Or a InvalidResourceException in case the given resource (in the adaptable) could not be validated through the ModelValidation.org.apache.sling.models.factory.ValidationExceptionorg.apache.sling.models.factory.InvalidModelExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.