Interface GenericMetaInfDataValidator
- All Superinterfaces:
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 Summary
Modifier and TypeMethodDescriptiondefault booleanshouldValidateMetaInfData(@NotNull Path filePath) Deprecated.default booleanshouldValidateMetaInfData(@NotNull Path filePath, @NotNull Path basePath) Called for each file below META-INF.default @Nullable Collection<ValidationMessage>validateMetaInfData(@NotNull InputStream input, @NotNull Path filePath) Deprecated.default @Nullable Collection<ValidationMessage>validateMetaInfData(@NotNull InputStream input, @NotNull Path filePath, @NotNull Path basePath) Called for each file below META-INF.
-
Method Details
-
validateMetaInfData
@Deprecated @Nullable default @Nullable Collection<ValidationMessage> validateMetaInfData(@NotNull @NotNull InputStream input, @NotNull @NotNull Path filePath) throws IOException Deprecated.UsevalidateMetaInfData(InputStream, Path, Path)insteadCalled for each file below META-INF. Only called in caseshouldValidateMetaInfData(Path, Path)returnedtruefor the given path.- Parameters:
input- the input stream of the META-INF file located at filePathfilePath- file path relative to the META-INF directory (i.e. does not start withMETA-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 caseshouldValidateMetaInfData(Path, 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 META-INF directory (i.e. does not start withMETA-INF)basePath- the absolute file path of the META-INF directory (base forfilePath))- Returns:
- a collection of validation messages or
null - Throws:
IOException- in case the input stream could not be accessed
-
shouldValidateMetaInfData
Deprecated.Called for each file below META-INF.- Parameters:
filePath- file path relative to the META-INF directory (i.e. does not start withMETA-INF)- Returns:
truein case the file should be validated, otherwisefalse
-
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 withMETA-INF)basePath- the absolute file path of the META-INF directory (base forfilePath))- Returns:
truein case the file should be validated, otherwisefalse
-
validateMetaInfData(InputStream, Path, Path)instead