]> git.argeo.org Git - gpl/argeo-slc.git/blob - OsgiExecutionModule.java
1708240e9668b550f435d264a315aa671d3b3db0
[gpl/argeo-slc.git] / OsgiExecutionModule.java
1 package org.argeo.slc.osgi;
2
3 import org.argeo.slc.core.execution.AbstractSpringExecutionModule;
4 import org.osgi.framework.BundleContext;
5 import org.springframework.osgi.context.BundleContextAware;
6
7 public class OsgiExecutionModule extends AbstractSpringExecutionModule implements
8 BundleContextAware {
9 private BundleContext bundleContext;
10
11 public String getName() {
12 return bundleContext.getBundle().getSymbolicName();
13 }
14
15 public String getVersion() {
16 return bundleContext.getBundle().getHeaders().get("Bundle-Version")
17 .toString();
18 }
19
20 public void setBundleContext(BundleContext bundleContext) {
21 this.bundleContext = bundleContext;
22 }
23
24 }