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 useDocumentViewXmlValidator. For validators only considering file/folder name or node name useJcrPathValidatororNodePathValidatorinstead.
-
-
Method Summary
All Methods Instance Methods Default Methods Deprecated Methods Modifier and Type Method Description default booleanshouldValidateJcrData(@NotNull Path filePath)Deprecated.default booleanshouldValidateJcrData(@NotNull Path filePath, @NotNull Path basePath)Called for each file below jcr_root.default @Nullable Collection<ValidationMessage>validateJcrData(@NotNull InputStream input, @NotNull Path filePath, @NotNull Path basePath, @NotNull Map<String,Integer> nodePathsAndLineNumbers)Called for each file below jcr_root.default @Nullable Collection<ValidationMessage>validateJcrData(@NotNull InputStream input, @NotNull Path filePath, @NotNull Map<String,Integer> nodePathsAndLineNumbers)Deprecated.UsevalidateJcrData(InputStream, Path, Path, Map)instead.
-
-
-
Method Detail
-
validateJcrData
@Deprecated @Nullable default @Nullable Collection<ValidationMessage> validateJcrData(@NotNull @NotNull InputStream input, @NotNull @NotNull Path filePath, @NotNull @NotNull Map<String,Integer> nodePathsAndLineNumbers) throws IOException
Deprecated.UsevalidateJcrData(InputStream, Path, Path, Map)instead.Called for each file below jcr_root. Only called in caseshouldValidateJcrData(Path)returnedtruefor the given path.- Parameters:
input- the input stream of the file which ends up below jcr_root in the package located at filePathfilePath- file path relative to the jcr_root directory (i.e. does not start withjcr_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 caseshouldValidateJcrData(Path)returnedtruefor the given path.- Parameters:
input- the input stream of the file which ends up below jcr_root in the package located at filePathfilePath- file path relative to the jcr_root directory (i.e. does not start withjcr_root)basePath- the absolute file path of jcr_root (base forfilePath))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 isDocumentViewParserValidator)- 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 withjcr_root)- Returns:
truein case the file should be validated, otherwisefalse
-
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 withjcr_root)basePath- the absolute file path of jcr_root (base forfilePath))- Returns:
truein case the file should be validated, otherwisefalse
-
-