001package org.dllearner.configuration.spring;
002
003import org.dllearner.configuration.IConfiguration;
004import org.springframework.context.ApplicationContext;
005import org.springframework.core.io.Resource;
006
007import java.io.IOException;
008import java.util.List;
009
010/**
011 * Created by IntelliJ IDEA.
012 * User: Chris
013 * Date: 8/23/11
014 * Time: 4:57 AM
015 * Interface for building an application context for use with DL-Learner interfaces.
016 */
017public interface ApplicationContextBuilder {
018
019    /**
020     * Create an application context for use with the DL-Learner CLI interface.
021     * <p/>
022     * Note: In case of multiple spring config file locations, later bean definitions will override ones defined in earlier loaded files. This can be leveraged to deliberately override certain bean definitions via an extra XML file.
023     *
024     * @param configuration                The DL-Learner Configuration object.
025     * @param springConfigurationLocations An ordered list of Spring Configuration Files - beans in later files can override beans in earlier files.
026     * @return An Application Context
027     * @throws IOException If there's a problem reading any of the files.
028     */
029    ApplicationContext buildApplicationContext(IConfiguration configuration, List<Resource> springConfigurationLocations) throws IOException;
030
031}