+
+ protected SvcLogicStore getStore() throws SvcLogicException {
+ return SvcLogicActivator.getStore();
+ }
+
+ protected SvcLogicAdaptor getAdaptor(String adaptorName) {
+ return SvcLogicAdaptorFactory.getInstance(adaptorName);
+ }
+
+ protected SvcLogicResource getSvcLogicResource(String plugin) {
+ BundleContext bctx = FrameworkUtil.getBundle(this.getClass())
+ .getBundleContext();
+
+ ServiceReference sref = bctx.getServiceReference(plugin);
+ if (sref != null) {
+ SvcLogicResource resourcePlugin = (SvcLogicResource) bctx
+ .getService(sref);
+ return resourcePlugin;
+ }
+ else {
+ LOG.warn("Could not find service reference object for plugin " + plugin);
+ return null;
+ }
+ }
+
+ protected SvcLogicRecorder getSvcLogicRecorder(String plugin) {
+ BundleContext bctx = FrameworkUtil.getBundle(this.getClass())
+ .getBundleContext();
+
+ ServiceReference sref = bctx.getServiceReference(plugin);
+ if (sref != null) {
+ SvcLogicRecorder resourcePlugin = (SvcLogicRecorder) bctx
+ .getService(sref);
+ return resourcePlugin;
+ }
+ else {
+ return null;
+ }
+ }
+
+ protected SvcLogicJavaPlugin getSvcLogicJavaPlugin(String pluginName){
+ BundleContext bctx = FrameworkUtil.getBundle(this.getClass())
+ .getBundleContext();
+
+ ServiceReference sref = bctx.getServiceReference(pluginName);
+
+ if (sref == null) {
+ LOG.warn("Could not find service reference object for plugin " + pluginName);
+ return null;
+ } else {
+ SvcLogicJavaPlugin plugin = (SvcLogicJavaPlugin) bctx
+ .getService(sref);
+ return plugin;
+ }
+ }
+