Interface GenericJcrDataValidator

All Superinterfaces:
Validator

@ProviderType public interface GenericJcrDataValidator extends Validator
Low-level validator interface for all files below jcr_root. For Document View XML files rather use DocumentViewXmlValidator. For validators only considering file/folder name or node name use JcrPathValidator or NodePathValidator instead.
  • Method Details

    • validateJcrData

      @Deprecated @Nullable default @Nullable Collection<ValidationMessage> validateJcrData(@NotNull @NotNull InputStream input, @NotNull @NotNull Path filePath, @NotNull @NotNull Map<String,Integer> nodePathsAndLineNumbers) throws IOException
      Called for each file below jcr_root. Only called in case shouldValidateJcrData(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 jcr_root directory (i.e. does not start with jcr_root)
      nodePathsAndLineNumbers - a map which should be filled with all node path and their according line numbers if nodes are detected in the given input.
      Returns:
      a collection of validation messages or null
      Throws:
      IOException - in case the input stream could not be accessed
    • validateJcrData

      @Nullable default @Nullable Collection<ValidationMessage> validateJcrData(@NotNull @NotNull InputStream input, @NotNull @NotNull Path filePath, @NotNull @NotNull Path basePath, @NotNull @NotNull Map<String,Integer> nodePathsAndLineNumbers) throws IOException
      Called for each file below jcr_root. Only called in case shouldValidateJcrData(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 jcr_root directory (i.e. does not start with jcr_root)
      basePath - the absolute file path of jcr_root (base for filePath))
      nodePathsAndLineNumbers - a map with all found node paths and their according line numbers (for the current input stream). Must only be modified in case the given file is a docview xml and the implementation is DocumentViewParserValidator)
      Returns:
      a collection of validation messages or null
      Throws:
      IOException - in case the input stream could not be accessed
    • shouldValidateJcrData

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

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