package org.gateway.home.tmaestroTeacherService;

import java.util.HashMap;
import java.util.Hashtable;

import org.gateway.home.tmaestroTeacherService.iface.TMaestroTeacherServiceImpl;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;

public class TMaestroTeacherServiceActivator implements BundleActivator {
	
	public TMaestroTeacherServiceImpl tmaestroteacherS;
	
	/*
	 * (non-Javadoc)
	 * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
	 */
	public void start(BundleContext context) throws Exception {
		/*
		 * Registering TMaestroTeacherService
		 */
		tmaestroteacherS = new TMaestroTeacherServiceImpl(context);
		//TODO borrar este println
		System.out.println("Activando el bundle: "+tmaestroteacherS.getClass().getName());
		context.registerService("org.gateway.home.tmaestroTeacherService.iface.TMaestroTeacherServiceImpl",tmaestroteacherS,null);
		/*
		tmaestroteacherS.registerClass("teacherService", "baseClass", new Hashtable<String,String>());
		System.out.println("registrada clase teacherService");
		tmaestroteacherS.registerClass("teacherToolsGroup", "teacherService", new Hashtable<String,String>());
		System.out.println("registrada clase teacherToolsGroup");
		tmaestroteacherS.registerClass("teacherTool", "teacherService", new Hashtable<String,String>());
		System.out.println("registrada clase teacherTool");
		*/
	}

	/*
	 * (non-Javadoc)
	 * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
	 */
	public void stop(BundleContext context) throws Exception {
	}

}
