test_class.declarator: validator
test_class.modifier: private
test_class.original_string: private AdvancedPropertiesValidator validator;
test_class.type: AdvancedPropertiesValidator
test_class.var_name: validator
test_class.declarator: propertiesValidator1
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private PropertiesValidator propertiesValidator1;
test_class.type: PropertiesValidator
test_class.var_name: propertiesValidator1
test_class.declarator: propertiesValidator2
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private PropertiesValidator propertiesValidator2;
test_class.type: PropertiesValidator
test_class.var_name: propertiesValidator2
test_class.file: vault-validation/src/test/java/org/apache/jackrabbit/vault/validation/spi/impl/AdvancedPropertiesValidatorTest.java
test_class.identifier: AdvancedPropertiesValidatorTest
test_case.body: @Test
      public void testPropertiesWithInvalidElement()
              throws URISyntaxException, IOException, SAXException, ParserConfigurationException, ConfigurationException {
          try (InputStream input = this.getClass().getResourceAsStream("/invalid-package/META-INF/vault/properties.xml")) {
              Collection<ValidationMessage> messages = validator.validateMetaInfData(input, Paths.get("vault/properties.xml"));
              ValidationExecutorTest.assertViolation(messages,
                      new ValidationMessage(ValidationMessageSeverity.WARN,
                                     AdvancedPropertiesValidator.MESSAGE_INVALID_PROPERTIES_XML,
                              new InvalidPropertiesFormatException("org.xml.sax.SAXParseException; lineNumber: 35; columnNumber: 19; Element type \"someinvalidentry\" must be declared.")));
          }
      }
test_case.class_method_signature: AdvancedPropertiesValidatorTest.testPropertiesWithInvalidElement()
test_case.full_signature: @Test public void testPropertiesWithInvalidElement()
test_case.identifier: testPropertiesWithInvalidElement
test_case.invocations: getResourceAsStream getClass validateMetaInfData get assertViolation
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testPropertiesWithInvalidElement()
focal_class.declarator: MESSAGE_INVALID_PROPERTIES_XML = "Invalid properties.xml"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String MESSAGE_INVALID_PROPERTIES_XML = "Invalid properties.xml";
focal_class.type: String
focal_class.var_name: MESSAGE_INVALID_PROPERTIES_XML
focal_class.declarator: PROPERTIES_XML_PATH = Paths.get(Constants.VAULT_DIR).resolve(Constants.PROPERTIES_XML)
focal_class.modifier: static final
focal_class.original_string: static final Path PROPERTIES_XML_PATH = Paths.get(Constants.VAULT_DIR).resolve(Constants.PROPERTIES_XML);
focal_class.type: Path
focal_class.var_name: PROPERTIES_XML_PATH
focal_class.declarator: propertiesValidators
focal_class.modifier: private final
focal_class.original_string: private final Map<String, PropertiesValidator> propertiesValidators;
focal_class.type: Map<String, PropertiesValidator>
focal_class.var_name: propertiesValidators
focal_class.declarator: severity
focal_class.modifier: private final
focal_class.original_string: private final ValidationMessageSeverity severity;
focal_class.type: ValidationMessageSeverity
focal_class.var_name: severity
focal_class.file: vault-validation/src/main/java/org/apache/jackrabbit/vault/validation/spi/impl/AdvancedPropertiesValidator.java
focal_class.identifier: AdvancedPropertiesValidator
focal_class.interfaces: implements GenericMetaInfDataValidator
focal_class.class_method_signature: AdvancedPropertiesValidator.AdvancedPropertiesValidator(ValidationMessageSeverity severity)
focal_class.full_signature: public  AdvancedPropertiesValidator(ValidationMessageSeverity severity)
focal_class.identifier: AdvancedPropertiesValidator
focal_class.modifiers: public
focal_class.parameters: (ValidationMessageSeverity severity)
focal_class.signature:  AdvancedPropertiesValidator(ValidationMessageSeverity severity)
focal_class.class_method_signature: AdvancedPropertiesValidator.setPropertiesValidators(Map<String, PropertiesValidator> propertiesValidators)
focal_class.full_signature: public void setPropertiesValidators(Map<String, PropertiesValidator> propertiesValidators)
focal_class.identifier: setPropertiesValidators
focal_class.modifiers: public
focal_class.parameters: (Map<String, PropertiesValidator> propertiesValidators)
focal_class.return: void
focal_class.signature: void setPropertiesValidators(Map<String, PropertiesValidator> propertiesValidators)
focal_class.class_method_signature: AdvancedPropertiesValidator.done()
focal_class.full_signature: @Override public Collection<ValidationMessage> done()
focal_class.identifier: done
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Collection<ValidationMessage>
focal_class.signature: Collection<ValidationMessage> done()
focal_class.class_method_signature: AdvancedPropertiesValidator.validateMetaInfData(@NotNull InputStream input, @NotNull Path filePath)
focal_class.full_signature: @Override public Collection<ValidationMessage> validateMetaInfData(@NotNull InputStream input, @NotNull Path filePath)
focal_class.identifier: validateMetaInfData
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull InputStream input, @NotNull Path filePath)
focal_class.return: Collection<ValidationMessage>
focal_class.signature: Collection<ValidationMessage> validateMetaInfData(@NotNull InputStream input, @NotNull Path filePath)
focal_class.class_method_signature: AdvancedPropertiesValidator.shouldValidateMetaInfData(@NotNull Path filePath)
focal_class.full_signature: @Override public boolean shouldValidateMetaInfData(@NotNull Path filePath)
focal_class.identifier: shouldValidateMetaInfData
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull Path filePath)
focal_class.return: boolean
focal_class.signature: boolean shouldValidateMetaInfData(@NotNull Path filePath)
focal_method.body: @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;
      }
focal_method.class_method_signature: AdvancedPropertiesValidator.validateMetaInfData(@NotNull InputStream input, @NotNull Path filePath)
focal_method.full_signature: @Override public Collection<ValidationMessage> validateMetaInfData(@NotNull InputStream input, @NotNull Path filePath)
focal_method.identifier: validateMetaInfData
focal_method.invocations: fromInputStream entrySet add getKey validate getValue addAll wrapMessages getKey add
focal_method.modifiers: @Override public
focal_method.parameters: (@NotNull InputStream input, @NotNull Path filePath)
focal_method.return: Collection<ValidationMessage>
focal_method.signature: Collection<ValidationMessage> validateMetaInfData(@NotNull InputStream input, @NotNull Path filePath)