org.springframework.beans.factory.parsing.ImportDefinition Java Examples

The following examples show how to use org.springframework.beans.factory.parsing.ImportDefinition. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ContextDependencyLister.java    From alfresco-repository with GNU Lesser General Public License v3.0 6 votes vote down vote up
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 );
}
 
Example #2
Source File: EventPublicationTests.java    From spring-analysis-note with MIT License 5 votes vote down vote up
@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);
}
 
Example #3
Source File: EventPublicationTests.java    From java-technology-stack with MIT License 5 votes vote down vote up
@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);
}
 
Example #4
Source File: EventPublicationTests.java    From spring4-understanding with Apache License 2.0 5 votes vote down vote up
@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);
}
 
Example #5
Source File: CollectingReaderEventListener.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Override
public void importProcessed(ImportDefinition importDefinition) {
	this.imports.add(importDefinition);
}
 
Example #6
Source File: CollectingReaderEventListener.java    From spring-analysis-note with MIT License 4 votes vote down vote up
public List<ImportDefinition> getImports() {
	return Collections.unmodifiableList(this.imports);
}
 
Example #7
Source File: CollectingReaderEventListener.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Override
public void importProcessed(ImportDefinition importDefinition) {
	this.imports.add(importDefinition);
}
 
Example #8
Source File: CollectingReaderEventListener.java    From java-technology-stack with MIT License 4 votes vote down vote up
public List<ImportDefinition> getImports() {
	return Collections.unmodifiableList(this.imports);
}
 
Example #9
Source File: CollectingReaderEventListener.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Override
public void importProcessed(ImportDefinition importDefinition) {
	this.imports.add(importDefinition);
}
 
Example #10
Source File: LoggingContextLoader.java    From geomajas-project-server with GNU Affero General Public License v3.0 4 votes vote down vote up
@Override
public void importProcessed(ImportDefinition importDefinition) {
	log.info("Processed import [" + importDefinition.getImportedResource() + "]");
}
 
Example #11
Source File: LoggingApplicationContext.java    From geomajas-project-server with GNU Affero General Public License v3.0 4 votes vote down vote up
@Override
public void importProcessed(ImportDefinition importDefinition) {
	log.info("Processed import [" + importDefinition.getImportedResource() + "]");
}