Class ValidationExecutorFactory

java.lang.Object
org.apache.jackrabbit.vault.validation.ValidationExecutorFactory

public final class ValidationExecutorFactory extends Object
Creates ValidationExecutors. Holds a number of ValidatorFactory instances.
  • Constructor Details

    • ValidationExecutorFactory

      public ValidationExecutorFactory(ClassLoader classLoader)
      Creates a new instance with ValidatorFactory instances being created via the ServiceLoader being 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 a ValidationExecutor for the given context.
      Parameters:
      context - the validation context given to the validators
      isSubPackage - true in case this is a subpackage, otherwise false
      enforceSubpackageValidation - true in case all validators should be also applied in any case to the sub package (independent of their ValidatorFactory.shouldValidateSubpackages() return value)
      validatorSettingsById - a map of ValidatorSettings. The key is the validator id. May be null.
      Returns:
      either null or an executor (if at least one validator is registered)