package net.sf.myway.trainer;
import net.sf.myway.trainer.bl.TrainerBL;
import net.sf.myway.trainer.bl.impl.TrainerBLImpl;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
public class Plugin implements BundleActivator {
private static BundleContext context;
static BundleContext getContext() {
return context;
}
private static TrainerBL _bl;
/**
* @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
*/
@Override
public void start(BundleContext bundleContext) throws Exception {
Plugin.context = bundleContext;
}
/**
* @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
*/
@Override
public void stop(BundleContext bundleContext) throws Exception {
Plugin.context = null;
}
/**
* @return the bl
*/
public static TrainerBL getBl() {
if (_bl == null) {
_bl = new TrainerBLImpl();
}
return _bl;
}
}