All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openbp.config.modelmgr.ClassPathAndDatabaseModelMgrConfig Maven / Gradle / Ivy

There is a newer version: 0.9.11
Show newest version
package org.openbp.config.modelmgr;

import java.util.ArrayList;

import org.openbp.core.model.modelmgr.ModelMgr;
import org.openbp.core.model.modelmgr.MultiplexModelMgr;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Spring configuration providing database-based and classpath-based model storage.
 * This is the default if you want to store your models in a database (e. g. your own models) or the classpath (e. g. the System model).
 */
@Configuration
public class ClassPathAndDatabaseModelMgrConfig
{
	@Bean
	public ModelMgr modelMgr()
	{
		MultiplexModelMgr mm = new MultiplexModelMgr();
		ArrayList l = new ArrayList(2);
		l.add(new ClassPathModelMgrConfig().modelMgr());
		l.add(new DatabaseModelMgrConfig().modelMgr());
		mm.setManagers(l);
		return mm;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy