Interface GenericMetaInfDataValidator
-
- All Superinterfaces:
Validator
@ProviderType public interface GenericMetaInfDataValidator extends Validator
Low-level validator interface for all files below META-INF (includingvault/filter.xml
andvault/properties.xml
). For validating properties and filter rather use the high-level validatorsPropertiesValidator
orFilterValidator
. For validators only considering the file/folder name useMetaInfPathValidator
instead.
-
-
Method Summary
All Methods Instance Methods Default Methods Deprecated Methods Modifier and Type Method Description default boolean
shouldValidateMetaInfData(@NotNull Path filePath)
Deprecated.default boolean
shouldValidateMetaInfData(@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.UsevalidateMetaInfData(InputStream, Path, Path)
insteaddefault @Nullable Collection<ValidationMessage>
validateMetaInfData(@NotNull InputStream input, @NotNull Path filePath, @NotNull Path basePath)
Called for each file below META-INF.
-
-
-
Method Detail
-
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)
returnedtrue
for 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)
returnedtrue
for 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 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 withMETA-INF
)- Returns:
true
in 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:
true
in case the file should be validated, otherwisefalse
-
-