]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - runtime/org.argeo.slc.support.equinox/src/main/java/org/argeo/slc/osgi/OsgiBundle.java
Remove eclipse project definitions
[gpl/argeo-slc.git] / runtime / org.argeo.slc.support.equinox / src / main / java / org / argeo / slc / osgi / OsgiBundle.java
index 42663cc6dfcb66ba82846a47ea5db1874fb2f69f..47ca2ea72fba8649cd64109c1df54aa940b342c3 100644 (file)
@@ -1,15 +1,28 @@
 package org.argeo.slc.osgi;
 
 import org.argeo.slc.build.Distribution;
-import org.argeo.slc.deploy.DeployedSystem;
+import org.argeo.slc.core.deploy.ResourceDistribution;
 import org.argeo.slc.deploy.DeploymentData;
+import org.argeo.slc.deploy.Module;
 import org.argeo.slc.deploy.TargetData;
+import org.osgi.framework.Bundle;
 
-public class OsgiBundle implements DeployedSystem {
+public class OsgiBundle implements Module<ResourceDistribution> {
+       private String name;
+       private String version;
+       private Distribution distribution;
+
+       public OsgiBundle() {
+
+       }
+
+       public OsgiBundle(Bundle bundle) {
+               name = bundle.getSymbolicName();
+               version = bundle.getHeaders().get("Bundle-Version").toString();
+       }
 
        public String getDeployedSystemId() {
-               // TODO Auto-generated method stub
-               return null;
+               return name + ":" + version;
        }
 
        public DeploymentData getDeploymentData() {
@@ -18,8 +31,7 @@ public class OsgiBundle implements DeployedSystem {
        }
 
        public Distribution getDistribution() {
-               // TODO Auto-generated method stub
-               return null;
+               return distribution;
        }
 
        public TargetData getTargetData() {
@@ -27,4 +39,24 @@ public class OsgiBundle implements DeployedSystem {
                return null;
        }
 
+       public String getName() {
+               return name;
+       }
+
+       public String getVersion() {
+               return version;
+       }
+
+       public void setName(String name) {
+               this.name = name;
+       }
+
+       public void setVersion(String version) {
+               this.version = version;
+       }
+
+       public void setDistribution(Distribution distribution) {
+               this.distribution = distribution;
+       }
+
 }