[jboss-osgi-commits] JBoss-OSGI SVN: r95020 - in projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi: testing/internal and 1 other directories.

jboss-osgi-commits at lists.jboss.org jboss-osgi-commits at lists.jboss.org
Fri Oct 16 05:37:49 EDT 2009


Author: thomas.diesler at jboss.com
Date: 2009-10-16 05:37:48 -0400 (Fri, 16 Oct 2009)
New Revision: 95020

Added:
   projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/BundleInfo.java
Removed:
   projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/service/DeployerService.java
   projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/service/DeploymentRegistryService.java
   projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/service/DeploymentScannerService.java
   projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/BundleDeployment.java
   projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/BundleDeploymentFactory.java
Modified:
   projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteRuntime.java
Log:
Extract deployment related API to jboss-osgi-deployment

Deleted: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/service/DeployerService.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/service/DeployerService.java	2009-10-16 09:06:06 UTC (rev 95019)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/service/DeployerService.java	2009-10-16 09:37:48 UTC (rev 95020)
@@ -1,75 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.osgi.spi.service;
-
-//$Id$
-
-import java.net.URL;
-
-import javax.management.ObjectName;
-
-import org.jboss.osgi.spi.management.ObjectNameFactory;
-import org.jboss.osgi.spi.util.BundleDeployment;
-import org.osgi.framework.BundleException;
-
-/**
- * A Service that can be used to deploy/undeploy bundles or archives to/from the runtime.
- * 
- * @author thomas.diesler at jboss.com
- * @since 23-Jan-2009
- */
-public interface DeployerService
-{
-   /**
-    * The object name under which this is registered: 'jboss.osgi:service=DeployerService'
-    */
-   ObjectName MBEAN_DEPLOYER_SERVICE = ObjectNameFactory.create("jboss.osgi:service=DeployerService");
-
-   /**
-    * Deploy an array of bundles
-    */
-   void deploy(BundleDeployment[] bundleDeps) throws BundleException;
-
-   /**
-    * Undeploy an array of bundles
-    */
-   void undeploy(BundleDeployment[] bundleDeps) throws BundleException;
-
-   /**
-    * Deploy bundle from URL
-    */
-   void deploy(URL url) throws BundleException;
-
-   /**
-    * Undeploy bundle from URL.
-    * 
-    * Note, due to the dynamic nature of OSGi services it is 
-    * possible that a {@link DeployerService} is asked to undeploy 
-    * a bundle URL which it did not deploy itself.
-    * 
-    * In this case this method should return false, so that  
-    * another {@link DeployerService} can be tried.
-    * 
-    * @return true if this service could undeploy the bundle
-    */
-   boolean undeploy(URL url) throws BundleException;
-}
\ No newline at end of file

Deleted: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/service/DeploymentRegistryService.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/service/DeploymentRegistryService.java	2009-10-16 09:06:06 UTC (rev 95019)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/service/DeploymentRegistryService.java	2009-10-16 09:37:48 UTC (rev 95020)
@@ -1,60 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.osgi.spi.service;
-
-//$Id: DeployerService.java 90894 2009-07-07 11:58:40Z thomas.diesler at jboss.com $
-
-import java.net.URL;
-
-import org.jboss.osgi.spi.util.BundleDeployment;
-import org.osgi.framework.Version;
-
-/**
- * A Service to register/unregister bundle deployments.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2009
- */
-public interface DeploymentRegistryService
-{
-   /**
-    * Create a bundle deployment from the given bundle URL
-    * @return null, if this service does not maintain the bundle deployment
-    */
-   BundleDeployment getBundleDeployment(URL url);
-   
-   /**
-    * Get the bundle deployment for the given bundle symbolicName and version
-    * @return null, if this service does not maintain the bundle deployment
-    */
-   BundleDeployment getBundleDeployment(String symbolicName, Version version);
-
-   /**
-    * Register a bundle deployment
-    */
-   void registerBundleDeployment(BundleDeployment dep);
-   
-   /**
-    * Unregister a bundle deployment
-    */
-   void unregisterBundleDeployment(BundleDeployment dep);
-}
\ No newline at end of file

Deleted: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/service/DeploymentScannerService.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/service/DeploymentScannerService.java	2009-10-16 09:06:06 UTC (rev 95019)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/service/DeploymentScannerService.java	2009-10-16 09:37:48 UTC (rev 95020)
@@ -1,80 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.osgi.spi.service;
-
-//$Id$
-
-import java.net.URL;
-
-import org.jboss.osgi.spi.util.BundleDeployment;
-
-/**
- * A service that scans a directory location for new/removed bundles.
- * 
- * @author thomas.diesler at jboss.com
- * @since 27-May-2009
- */
-public interface DeploymentScannerService
-{
-   /**
-    * The property that names the scan location: org.jboss.osgi.hotdeploy.scandir
-    */
-   String PROPERTY_SCAN_LOCATION = "org.jboss.osgi.hotdeploy.scandir";
-   
-   /**
-    * The property to defines the scan interval: org.jboss.osgi.hotdeploy.interval
-    */
-   String PROPERTY_SCAN_INTERVAL = "org.jboss.osgi.hotdeploy.interval";
-   
-   /**
-    * Get the scan location URL.
-    *  
-    * This is can be specified by setting the {@link #PROPERTY_SCAN_LOCATION} property. 
-    */
-   URL getScanLocation();
-   
-   /**
-    * The number of scans since the service started 
-    */
-   long getScanCount();
-   
-   /**
-    * The number of milliseconds between scans
-    * Defaults to 2000ms 
-    */
-   long getScanInterval();
-   
-   /**
-    * The timestamp of the last change
-    */
-   long getLastChange();
-   
-   /**
-    * Run a directory scan
-    */
-   void scan();
-   
-   /**
-    * Returns the array of bundles currently known to the deployemtn scanner. 
-    */
-   BundleDeployment[] getBundleDeployments();
-}
\ No newline at end of file

Modified: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteRuntime.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteRuntime.java	2009-10-16 09:06:06 UTC (rev 95019)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteRuntime.java	2009-10-16 09:37:48 UTC (rev 95020)
@@ -44,8 +44,7 @@
 import org.jboss.osgi.spi.testing.OSGiRuntime;
 import org.jboss.osgi.spi.testing.OSGiServiceReference;
 import org.jboss.osgi.spi.testing.OSGiTestHelper;
-import org.jboss.osgi.spi.util.BundleDeployment;
-import org.jboss.osgi.spi.util.BundleDeploymentFactory;
+import org.jboss.osgi.spi.util.BundleInfo;
 import org.osgi.framework.BundleException;
 
 /**
@@ -69,12 +68,12 @@
       try
       {
          URL bundleURL = getTestHelper().getTestArchiveURL(location);
-         BundleDeployment bundleDep = BundleDeploymentFactory.createBundleDeployment(bundleURL);
+         BundleInfo bundleInfo = BundleInfo.createBundleInfo(bundleURL);
          
          deployInternal(location, true);
          
-         String symbolicName = bundleDep.getSymbolicName();
-         String version = bundleDep.getVersion().toString();
+         String symbolicName = bundleInfo.getSymbolicName();
+         String version = bundleInfo.getVersion().toString();
          ManagedBundleMBean bundleMBean = getRemoteFramework().getBundle(symbolicName, version);
          RemoteBundle bundle = new RemoteBundle(this, bundleMBean, location);
          return registerBundle(location, bundle);
@@ -125,7 +124,7 @@
       try
       {
          URL archiveURL = getTestHelper().getTestArchiveURL(location);
-         BundleDeploymentFactory.createBundleDeployment(archiveURL);
+         BundleInfo.createBundleInfo(archiveURL);
          return true;
       }
       catch (BundleException ex)

Deleted: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/BundleDeployment.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/BundleDeployment.java	2009-10-16 09:06:06 UTC (rev 95019)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/BundleDeployment.java	2009-10-16 09:37:48 UTC (rev 95020)
@@ -1,154 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.osgi.spi.util;
-
-import java.io.Serializable;
-import java.net.URL;
-
-//$Id$
-
-/**
- * An abstraction of a bundle deployment
- * 
- * @author thomas.diesler at jboss.com
- * @since 27-May-2009
- */
-public class BundleDeployment implements Serializable
-{
-   private static final long serialVersionUID = 1L;
-   
-   private URL location;
-   private String symbolicName;
-   private String version;
-   private int startLevel;
-   private boolean autoStart;
-   private Object metadata;
-
-   public BundleDeployment(URL location, String symbolicName, String version)
-   {
-      if (location == null)
-         throw new IllegalArgumentException("Location cannot be null");
-      if (symbolicName == null)
-         throw new IllegalArgumentException("Symbolic name cannot be null");
-      
-      if (version == null)
-         version = "0.0.0";
-      
-      this.symbolicName = symbolicName;
-      this.location = location;
-      this.version = version;
-   }
-
-   /**
-    * Get the bundle location
-    */
-   public URL getLocation()
-   {
-      return location;
-   }
-
-   /**
-    * Get the bundle symbolic name
-    */
-   public String getSymbolicName()
-   {
-      return symbolicName;
-   }
-
-   /**
-    * Get the bundle version
-    */
-   public String getVersion()
-   {
-      return version;
-   }
-
-   /**
-    * Get the start level associated with this deployment
-    */
-   public int getStartLevel()
-   {
-      return startLevel;
-   }
-
-   /**
-    * Set the start level associated with this deployment
-    */
-   public void setStartLevel(int startLevel)
-   {
-      this.startLevel = startLevel;
-   }
-
-   /**
-    * Get the autostart flag associated with this deployment
-    */
-   public boolean isAutoStart()
-   {
-      return autoStart;
-   }
-
-   /**
-    * Set the autostart flag associated with this deployment
-    */
-   public void setAutoStart(boolean autoStart)
-   {
-      this.autoStart = autoStart;
-   }
-
-   /**
-    * Get extra meta data associated with this deployment
-    */
-   public Object getMetadata()
-   {
-      return metadata;
-   }
-
-   /**
-    * Set extra meta data associated with this deployment
-    */
-   public void setMetadata(Object metadata)
-   {
-      this.metadata = metadata;
-   }
-
-   @Override
-   public boolean equals(Object obj)
-   {
-      if (!(obj instanceof BundleDeployment))
-         return false;
-      
-      BundleDeployment other = (BundleDeployment)obj;
-      return symbolicName.equals(other.symbolicName) && version.equals(other.version);
-   }
-
-   @Override
-   public int hashCode()
-   {
-      return toString().hashCode();
-   }
-
-   @Override
-   public String toString()
-   {
-      return "[" + symbolicName + "-" + version + ",url=" + location + "]";
-   }
-}
\ No newline at end of file

Deleted: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/BundleDeploymentFactory.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/BundleDeploymentFactory.java	2009-10-16 09:06:06 UTC (rev 95019)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/BundleDeploymentFactory.java	2009-10-16 09:37:48 UTC (rev 95020)
@@ -1,102 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.osgi.spi.util;
-
-//$Id: BundleDeployment.java 90925 2009-07-08 10:12:31Z thomas.diesler at jboss.com $
-
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.jar.Attributes;
-import java.util.jar.JarFile;
-import java.util.jar.Manifest;
-
-import org.osgi.framework.BundleException;
-import org.osgi.framework.Constants;
-
-/**
- * A factory for bundle deployments.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2009
- */
-public abstract class BundleDeploymentFactory
-{
-   public static BundleDeployment createBundleDeployment(String location) throws BundleException
-   {
-      // Try location as URL
-      URL url = null;
-      try
-      {
-         url = new URL(location);
-      }
-      catch (MalformedURLException ex)
-      {
-         // ignore
-      }
-
-      // Try location as File
-      if (url == null)
-      {
-         try
-         {
-            File file = new File(location);
-            if (file.exists())
-               url = file.toURI().toURL();
-         }
-         catch (MalformedURLException e)
-         {
-            // ignore
-         }
-      }
-      
-      if (url == null)
-         throw new IllegalArgumentException("Invalid bundle location: " + location);
-
-      return createBundleDeployment(url);
-   }
-
-   public static BundleDeployment createBundleDeployment(URL url) throws BundleException
-   {
-      Manifest manifest;
-      try
-      {
-         JarFile jarFile = new JarFile(url.getPath());
-         manifest = jarFile.getManifest();
-         jarFile.close();
-      }
-      catch (IOException ex)
-      {
-         throw new BundleException("Cannot get manifest from: " + url);
-
-      }
-
-      Attributes attribs = manifest.getMainAttributes();
-      String symbolicName = attribs.getValue(Constants.BUNDLE_SYMBOLICNAME);
-      if (symbolicName == null)
-         throw new BundleException("Cannot obtain Bundle-SymbolicName for: " + url);
-
-      String version = attribs.getValue(Constants.BUNDLE_VERSION);
-      return new BundleDeployment(url, symbolicName, version);
-   }
-}
\ No newline at end of file

Added: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/BundleInfo.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/BundleInfo.java	                        (rev 0)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/BundleInfo.java	2009-10-16 09:37:48 UTC (rev 95020)
@@ -0,0 +1,160 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.spi.util;
+
+//$Id$
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.jar.Attributes;
+import java.util.jar.JarFile;
+import java.util.jar.Manifest;
+
+import org.osgi.framework.BundleException;
+import org.osgi.framework.Constants;
+
+/**
+ * An abstraction of a bundle
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 16-Oct-2009
+ */
+public class BundleInfo
+{
+   private URL location;
+   private Manifest manifest;
+   private String symbolicName;
+   private String version;
+
+   public static BundleInfo createBundleInfo(String location) throws BundleException
+   {
+      // Try location as URL
+      URL url = null;
+      try
+      {
+         url = new URL(location);
+      }
+      catch (MalformedURLException ex)
+      {
+         // ignore
+      }
+
+      // Try location as File
+      if (url == null)
+      {
+         try
+         {
+            File file = new File(location);
+            if (file.exists())
+               url = file.toURI().toURL();
+         }
+         catch (MalformedURLException e)
+         {
+            // ignore
+         }
+      }
+      
+      if (url == null)
+         throw new IllegalArgumentException("Invalid bundle location: " + location);
+
+      return createBundleInfo(url);
+   }
+
+   public static BundleInfo createBundleInfo(URL url) throws BundleException
+   {
+      Manifest manifest;
+      try
+      {
+         JarFile jarFile = new JarFile(url.getPath());
+         manifest = jarFile.getManifest();
+         jarFile.close();
+      }
+      catch (IOException ex)
+      {
+         throw new BundleException("Cannot get manifest from: " + url);
+
+      }
+
+      return new BundleInfo(url, manifest);
+   }
+   
+   private BundleInfo(URL location, Manifest manifest) throws BundleException
+   {
+      if (location == null)
+         throw new IllegalArgumentException("Location cannot be null");
+      if (manifest == null)
+         throw new IllegalArgumentException("Manifest cannot be null");
+      
+      this.manifest = manifest;
+      this.location = location;
+      
+      symbolicName = getManifestHeader(Constants.BUNDLE_SYMBOLICNAME);
+      if (symbolicName == null)
+         throw new BundleException("Cannot obtain Bundle-SymbolicName for: " + location);
+
+      version = getManifestHeader(Constants.BUNDLE_VERSION);
+      if (version == null)
+         version = "0.0.0";
+   }
+   
+   /**
+    * Get the manifest header for the given key.
+    */
+   public String getManifestHeader(String key)
+   {
+      Attributes attribs = manifest.getMainAttributes();
+      String value = attribs.getValue(key);
+      return value;
+   }
+
+   /**
+    * Get the bundle location
+    */
+   public URL getLocation()
+   {
+      return location;
+   }
+
+   /**
+    * Get the bundle symbolic name
+    */
+   public String getSymbolicName()
+   {
+      return symbolicName;
+   }
+
+   /**
+    * Get the bundle version
+    */
+   public String getVersion()
+   {
+      return version;
+   }
+
+   @Override
+   public String toString()
+   {
+      return "[" + symbolicName + "-" + version + ",url=" + location + "]";
+   }
+}
\ No newline at end of file


Property changes on: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/BundleInfo.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF



More information about the jboss-osgi-commits mailing list