public void importProcessed(ImportDefinition paramImportDefinition) { String context = paramImportDefinition.getImportedResource(); if(context.startsWith("classpath:")) { context = context.substring(10); if(pathToSlash == null) { URL c = ContextDependencyLister.class.getClassLoader().getResource(context); uriToSlash = c.toString().replace(context, ""); pathToSlash = c.getPath().replace(context, ""); } } if(context.startsWith("classpath*:")) { context = context.substring(11); } // Store if(! usedContextFiles.contains(context)) { usedContextFiles.add( context ); } importedContextFiles.add( context ); }
@Test public void importEventReceived() throws Exception { List imports = this.eventListener.getImports(); assertEquals(1, imports.size()); ImportDefinition importDefinition = (ImportDefinition) imports.get(0); assertEquals("beanEventsImported.xml", importDefinition.getImportedResource()); assertTrue(importDefinition.getSource() instanceof Element); }
public void testImportEventReceived() throws Exception { List imports = this.eventListener.getImports(); assertEquals(1, imports.size()); ImportDefinition importDefinition = (ImportDefinition) imports.get(0); assertEquals("beanEventsImported.xml", importDefinition.getImportedResource()); assertTrue(importDefinition.getSource() instanceof Element); }
@Override public void importProcessed(ImportDefinition importDefinition) { this.imports.add(importDefinition); }
@Override public void importProcessed(ImportDefinition importDefinition) { log.info("Processed import [" + importDefinition.getImportedResource() + "]"); }