private void processImports(final Document document) { final NodeList importsList = document.getElementsByTagName(TAG_IMPORT); LOG.debug("number of imports: {}", importsList.getLength()); for (int i = 0; i < importsList.getLength(); i++) { final Element element = (Element) importsList.item(i); final String name = element.getTextContent(); LOG.debug("processing import: {}", name); Validate.notNull(locatorFactory, "The Locator cannot be null!"); if (processedImports.contains(name)) { final String message = "Recursive import detected: " + name; LOG.error(message); throw new RecursiveGroupDefinitionException(message); } processedImports.add(name); model.merge(createImportedModel(name)); } }
private void processImports(final Document document) { final NodeList importsList = document.getElementsByTagName(TAG_IMPORT); LOG.debug("number of imports: {}", importsList.getLength()); for (int i = 0; i < importsList.getLength(); i++) { final Element element = (Element) importsList.item(i); final String name = element.getTextContent(); LOG.debug("processing import: {}", name); notNull(locatorFactory, "The Locator cannot be null!"); if (processedImports.contains(name)) { final String message = "Recursive import detected: " + name; LOG.error(message); throw new RecursiveGroupDefinitionException(message); } processedImports.add(name); model.merge(createImportedModel(name)); } }
protected void processImports(final Document document) { final NodeList importsList = document.getElementsByTagName(TAG_IMPORT); LOG.debug("number of imports: {}", importsList.getLength()); for (int i = 0; i < importsList.getLength(); i++) { final Element element = (Element) importsList.item(i); final String name = element.getTextContent(); LOG.debug("processing import: {}", name); Validate.notNull(locatorFactory, "The Locator cannot be null!"); if (processedImports.contains(name)) { final String message = "Recursive import detected: " + name; LOG.error(message); throw new RecursiveGroupDefinitionException(message); } processedImports.add(name); model.merge(createImportedModel(name)); } }
@Override protected void processImports(Document document) { final NodeList importsList = document.getElementsByTagName(TAG_IMPORT); LOG.debug("number of imports: {}", importsList.getLength()); for (int i = 0; i < importsList.getLength(); i++) { final Element element = (Element) importsList.item(i); final String name = element.getTextContent(); LOG.debug("processing import: {}", name); Validate.notNull(locatorFactory, "The Locator cannot be null!"); // recherche de tous les imports a faire s'il y a des * List<String> imports = findAll(name); for (String importName : imports) { if (processedImports.contains(importName)) { final String message = "Recursive import detected: " + importName; LOG.error(message); throw new RecursiveGroupDefinitionException(message); } processedImports.add(importName); model.merge(createImportedModel(importName)); } } }