+ c.add(createServiceDependency()
+ .setService(IPluginOutConnectionService.class)
+ .setCallbacks("setIPluginOutConnectionService",
+ "unsetIPluginOutConnectionService")
+ .setRequired(true));
+ }
+
+ if (imp.equals(InventoryService.class)) {
+ // export the service
+ Dictionary<String, Object> props = new Hashtable<String, Object>();
+ props.put("scope", "Global");
+
+ c.setInterface(
+ new String[] { IPluginInInventoryService.class.getName(),
+ IInventoryShimInternalListener.class.getName(),
+ IInventoryProvider.class.getName() }, props);
+
+ // Now lets add a service dependency to make sure the
+ // provider of service exists
+ c.add(createServiceDependency()
+ .setService(IController.class, "(name=Controller)")
+ .setCallbacks("setController", "unsetController")
+ .setRequired(true));
+ c.add(createServiceDependency()
+ .setService(IPluginOutInventoryService.class, "(scope=Global)")
+ .setCallbacks("setPluginOutInventoryServices",
+ "unsetPluginOutInventoryServices")
+ .setRequired(true));