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

it.uniroma2.art.coda.standalone.CODAStandaloneFactory Maven / Gradle / Ivy

package it.uniroma2.art.coda.standalone;

import it.uniroma2.art.coda.core.CODACore;
import it.uniroma2.art.coda.standalone.impl.CODAOSGiManger;
import it.uniroma2.art.coda.standalone.impl.StandaloneComponentProvider;

import java.io.File;
import java.util.Properties;

public class CODAStandaloneFactory {
	
	public static final String CODA_EXPORT_PACKAGES_PROPERTY_NAME = "art.coda.osgi.packages";
	
	public static CODACore getInstance(File bundles, File felixCache) throws Exception {
		/*CODAOSGiManger manager = CODAOSGiManger.initialize(felixCache);
		manager.loadComponents(bundles);
		
		return new CODACore(new StandaloneComponentProvider(manager))*/;
		return getInstance(bundles, felixCache, null);
	}
	
	public static CODACore getInstance(File bundles, File felixCache, Properties userConfigProp) throws Exception {
		CODAOSGiManger manager = CODAOSGiManger.initialize(felixCache, userConfigProp);
		manager.loadComponents(bundles);
		
		return new CODACore(new StandaloneComponentProvider(manager));
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy