@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 |
---|---|
List<ValidationModel> |
getValidationModels(String relativeResourceType)
Retrieves the models responsible for validating the given resourceType.
|
@Nonnull List<ValidationModel> getValidationModels(@Nonnull String relativeResourceType) throws 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).IllegalStateException
- in case a validation model was found but it is invalidCopyright © 2017 The Apache Software Foundation. All rights reserved.