@ProviderType
public interface ValidationModelProvider
ValidationModel
s must implement this interface. Caching of validation models should be implemented in the provider itself,
because the providers are asked potentially multiple times for each ValidationService.getValidationModel(org.apache.sling.api.resource.Resource, boolean)
or
ValidationService.getValidationModel(String, String, boolean)
call.Modifier and Type | Method and Description |
---|---|
java.util.List<ValidationModel> |
getValidationModels(java.lang.String relativeResourceType)
Retrieves the models responsible for validating the given resourceType.
|
@Nonnull java.util.List<ValidationModel> getValidationModels(@Nonnull java.lang.String relativeResourceType) throws java.lang.IllegalStateException
relativeResourceType
- the relative resource (relative to one of the resource resolver's search paths)ValidationModel
s. Never null
, but might be empty collection in case no
model for the given resource type could be found. The order which model gets active is mostly determined by ValidationModel.getApplicablePaths()
(longest path match wins)
but in case there are multiple models having the same applicable path, the order being returned here is considered (i.e. the first one is taken).java.lang.IllegalStateException
- in case a validation model was found but it is invalidCopyright © 2018 The Apache Software Foundation. All rights reserved.