Projects >> IRIS >>4aa561da79006aaeca08a1f32bc2ce9be43933a6

Chunk
Conflicting content
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
<<<<<<< HEAD
 * Loads a CommandController with a set of InteractionCommands from Spring
 * configuration files.
 *
 * The execute method would be typically called after a directory change (for
 * instance, when a user copies a jar file with new InteractionCommands). All
 * jars in the directory are scanned for Spring configuration files matching the
 * pattern "/spring/*-interaction-context.xml". By default, the
 * CommandController with id "commandController", together with the defined
 * InteractionCommand, would be loaded to the top of a provided
 * ChainingCommandController.
=======
 * Loads a CommandController with a set of InteractionCommands from Spring configuration files.
 * 
 * The execute method would be typically called after a directory change (for instance, when a user
 * copies a jar file with new InteractionCommands). All jars in the directory are scanned for Spring configuration
 * files matching the pattern "/spring/*-interaction-context.xml" using the Reflections API. Reflections scans the 
 * classpath, indexes the metadata and allows to query it on runtime. If any Spring configuration files with the 
 * matching pattern are found, the execute method adds a new ClassLoader (with the new jars) to the current context 
 * (the child context is created with a reference to the parent context if this exists). By default, the CommandController 
 * with id "commandController", together with the defined InteractionCommand, would be loaded to the top of a provided
 * ChainingCommandController. 
>>>>>>> 569b525bbea610d2e7ff6a7684f21d28131642b6
 *
 * @author andres
 * @author trojan
Solution content
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Loads a CommandController with a set of InteractionCommands from Spring
 * configuration files.
 *
 * The execute method would be typically called after a directory change (for
 * instance, when a user copies a jar file with new InteractionCommands). All
 * jars in the directory are scanned for Spring configuration files matching the
 * pattern "/spring/*-interaction-context.xml". By default, the
 * CommandController with id "commandController", together with the defined
 * InteractionCommand, would be loaded to the top of a provided
 * ChainingCommandController.
 *
 * @author andres
 * @author trojan
File
SpringBasedLoaderAction.java
Developer's decision
Version 1
Kind of conflict
Comment