Interface GenericMetaInfDataValidator

All Superinterfaces:
Validator

@ProviderType public interface GenericMetaInfDataValidator extends Validator
Low-level validator interface for all files below META-INF (including vault/filter.xml and vault/properties.xml). For validating properties and filter rather use the high-level validators PropertiesValidator or FilterValidator. For validators only considering the file/folder name use MetaInfPathValidator instead.
  • Method Details

    • validateMetaInfData

      @Deprecated @Nullable default @Nullable Collection<ValidationMessage> validateMetaInfData(@NotNull @NotNull InputStream input, @NotNull @NotNull Path filePath) throws IOException
      Called for each file below META-INF. Only called in case shouldValidateMetaInfData(Path, Path) returned true for the given path.
      Parameters:
      input - the input stream of the META-INF file located at filePath
      filePath - file path relative to the META-INF directory (i.e. does not start with META-INF)
      Returns:
      a collection of validation messages or null
      Throws:
      IOException - in case the input stream could not be accessed
    • validateMetaInfData

      @Nullable default @Nullable Collection<ValidationMessage> validateMetaInfData(@NotNull @NotNull InputStream input, @NotNull @NotNull Path filePath, @NotNull @NotNull Path basePath) throws IOException
      Called for each file below META-INF. Only called in case shouldValidateMetaInfData(Path, Path) returned true for the given path.
      Parameters:
      input - the input stream of the file which ends up below jcr_root in the package located at filePath
      filePath - file path relative to the META-INF directory (i.e. does not start with META-INF)
      basePath - the absolute file path of the META-INF directory (base for filePath))
      Returns:
      a collection of validation messages or null
      Throws:
      IOException - in case the input stream could not be accessed
    • shouldValidateMetaInfData

      @Deprecated default boolean shouldValidateMetaInfData(@NotNull @NotNull Path filePath)
      Deprecated.
      Called for each file below META-INF.
      Parameters:
      filePath - file path relative to the META-INF directory (i.e. does not start with META-INF)
      Returns:
      true in case the file should be validated, otherwise false
    • shouldValidateMetaInfData

      default boolean shouldValidateMetaInfData(@NotNull @NotNull Path filePath, @NotNull @NotNull Path basePath)
      Called for each file below META-INF.
      Parameters:
      filePath - file path relative to the META-INF directory (i.e. does not start with META-INF)
      basePath - the absolute file path of the META-INF directory (base for filePath))
      Returns:
      true in case the file should be validated, otherwise false