package org.arefgard.flow.integration.spring;

import org.arefgard.flow.integration.DIContainer;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;

public class DIContainerSpring implements DIContainer {
	
	private BeanFactory factory = null;
	
	public DIContainerSpring(String path) {
		ClassPathResource resource = new ClassPathResource(path);
		factory = new XmlBeanFactory(resource);
	}
	public Object get(String type) {
		return factory.getBean(type);
	}

}
