class AdvancedPropertiesValidator implements GenericMetaInfDataValidator {

    @Override
    public Collection<ValidationMessage> validateMetaInfData(@NotNull InputStream input, @NotNull Path filePath) {
        Collection<ValidationMessage> messages = new LinkedList<>();
        try {
            PackageProperties properties = DefaultPackageProperties.fromInputStream(input);
            // call all registered properties validators
            for (Map.Entry<String, PropertiesValidator> entry : propertiesValidators.entrySet()) {
                messages.add(new ValidationMessage(ValidationMessageSeverity.DEBUG, "Validating with validator " + entry.getKey() + "..."));
                Collection<ValidationMessage> propertiesValidatorMessages = entry.getValue().validate(properties);
                if (propertiesValidatorMessages != null) {
                    messages.addAll(ValidationViolation.wrapMessages(entry.getKey(), propertiesValidatorMessages, null, null, null, 0, 0));
                }
            }
        } catch (InvalidPropertiesFormatException e) {
            messages.add(new ValidationMessage(severity, MESSAGE_INVALID_PROPERTIES_XML, e));
        } catch (IOException e) {
            throw new IllegalStateException("Could not read from input stream " + filePath, e);
        }
        return messages;
    }

    public  AdvancedPropertiesValidator(ValidationMessageSeverity severity);

}