Class ValidationExecutorFactory
java.lang.Object
org.apache.jackrabbit.vault.validation.ValidationExecutorFactory
Creates
ValidationExecutors. Holds a number of ValidatorFactory instances.-
Constructor Summary
ConstructorsConstructorDescriptionValidationExecutorFactory(ClassLoader classLoader) Creates a new instance withValidatorFactoryinstances being created via theServiceLoaderbeing used with the given classloader. -
Method Summary
Modifier and TypeMethodDescription@Nullable ValidationExecutorcreateValidationExecutor(@NotNull ValidationContext context, boolean isSubPackage, boolean enforceSubpackageValidation, Map<String, ? extends ValidatorSettings> validatorSettingsById) Creates aValidationExecutorfor the given context.
-
Constructor Details
-
ValidationExecutorFactory
Creates a new instance withValidatorFactoryinstances being created via theServiceLoaderbeing used with the given classloader.- Parameters:
classLoader- the class loader to be used with the service loader
-
-
Method Details
-
createValidationExecutor
@Nullable public @Nullable ValidationExecutor createValidationExecutor(@NotNull @NotNull ValidationContext context, boolean isSubPackage, boolean enforceSubpackageValidation, Map<String, ? extends ValidatorSettings> validatorSettingsById) Creates aValidationExecutorfor the given context.- Parameters:
context- the validation context given to the validatorsisSubPackage-truein case this is a subpackage, otherwisefalseenforceSubpackageValidation-truein case all validators should be also applied in any case to the sub package (independent of theirValidatorFactory.shouldValidateSubpackages()return value)validatorSettingsById- a map ofValidatorSettings. The key is the validator id. May benull.- Returns:
- either
nullor an executor (if at least one validator is registered)
-