[jboss-osgi-commits] JBoss-OSGI SVN: r88566 - in projects/jboss-osgi/trunk: runtime/equinox/src/main/java/org/jboss/osgi/equinox/framework and 5 other directories.

jboss-osgi-commits at lists.jboss.org jboss-osgi-commits at lists.jboss.org
Fri May 8 19:11:24 EDT 2009


Author: thomas.diesler at jboss.com
Date: 2009-05-08 19:11:24 -0400 (Fri, 08 May 2009)
New Revision: 88566

Added:
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/logging/ExportedPackageHelper.java
Removed:
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/framework/ExportedPackageHelper.java
Modified:
   projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java
   projects/jboss-osgi/trunk/runtime/equinox/src/main/java/org/jboss/osgi/equinox/framework/EquinoxIntegration.java
   projects/jboss-osgi/trunk/runtime/felix/src/main/java/org/jboss/osgi/felix/framework/FelixIntegration.java
   projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/java/org/jboss/osgi/knopflerfish/framework/KnopflerfishIntegration.java
   projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties
Log:
Move ExportedPackageHelper to spi.logging

Modified: projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java	2009-05-08 22:53:15 UTC (rev 88565)
+++ projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java	2009-05-08 23:11:24 UTC (rev 88566)
@@ -31,7 +31,7 @@
 import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
 import org.jboss.deployers.structure.spi.DeploymentUnit;
 import org.jboss.osgi.spi.Constants;
-import org.jboss.osgi.spi.framework.ExportedPackageHelper;
+import org.jboss.osgi.spi.logging.ExportedPackageHelper;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleException;

Modified: projects/jboss-osgi/trunk/runtime/equinox/src/main/java/org/jboss/osgi/equinox/framework/EquinoxIntegration.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/equinox/src/main/java/org/jboss/osgi/equinox/framework/EquinoxIntegration.java	2009-05-08 22:53:15 UTC (rev 88565)
+++ projects/jboss-osgi/trunk/runtime/equinox/src/main/java/org/jboss/osgi/equinox/framework/EquinoxIntegration.java	2009-05-08 23:11:24 UTC (rev 88566)
@@ -35,8 +35,8 @@
 import org.eclipse.osgi.framework.internal.core.FrameworkProperties;
 import org.jboss.logging.Logger;
 import org.jboss.osgi.spi.FrameworkException;
-import org.jboss.osgi.spi.framework.ExportedPackageHelper;
 import org.jboss.osgi.spi.framework.OSGiFramework;
+import org.jboss.osgi.spi.logging.ExportedPackageHelper;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleException;

Modified: projects/jboss-osgi/trunk/runtime/felix/src/main/java/org/jboss/osgi/felix/framework/FelixIntegration.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/felix/src/main/java/org/jboss/osgi/felix/framework/FelixIntegration.java	2009-05-08 22:53:15 UTC (rev 88565)
+++ projects/jboss-osgi/trunk/runtime/felix/src/main/java/org/jboss/osgi/felix/framework/FelixIntegration.java	2009-05-08 23:11:24 UTC (rev 88566)
@@ -32,8 +32,8 @@
 import org.apache.felix.framework.Felix;
 import org.jboss.logging.Logger;
 import org.jboss.osgi.spi.FrameworkException;
-import org.jboss.osgi.spi.framework.ExportedPackageHelper;
 import org.jboss.osgi.spi.framework.OSGiFramework;
+import org.jboss.osgi.spi.logging.ExportedPackageHelper;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleException;

Modified: projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/java/org/jboss/osgi/knopflerfish/framework/KnopflerfishIntegration.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/java/org/jboss/osgi/knopflerfish/framework/KnopflerfishIntegration.java	2009-05-08 22:53:15 UTC (rev 88565)
+++ projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/java/org/jboss/osgi/knopflerfish/framework/KnopflerfishIntegration.java	2009-05-08 23:11:24 UTC (rev 88566)
@@ -34,8 +34,8 @@
 
 import org.jboss.logging.Logger;
 import org.jboss.osgi.spi.FrameworkException;
-import org.jboss.osgi.spi.framework.ExportedPackageHelper;
 import org.jboss.osgi.spi.framework.OSGiFramework;
+import org.jboss.osgi.spi.logging.ExportedPackageHelper;
 import org.knopflerfish.framework.Framework;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;

Deleted: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/framework/ExportedPackageHelper.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/framework/ExportedPackageHelper.java	2009-05-08 22:53:15 UTC (rev 88565)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/framework/ExportedPackageHelper.java	2009-05-08 23:11:24 UTC (rev 88566)
@@ -1,81 +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.framework;
-
-//$Id$
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.jboss.logging.Logger;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.packageadmin.ExportedPackage;
-import org.osgi.service.packageadmin.PackageAdmin;
-
-/**
- * A helper the logs the exported packages for a bundle.
- * 
- * @author thomas.diesler at jboss.com
- * @since 24-Apr-2009
- */
-public final class ExportedPackageHelper
-{
-   // Provide logging
-   final Logger log = Logger.getLogger(ExportedPackageHelper.class);
-
-   private PackageAdmin packageAdmin;
-
-   public ExportedPackageHelper(BundleContext context)
-   {
-      ServiceReference sref = context.getServiceReference(PackageAdmin.class.getName());
-      packageAdmin = (PackageAdmin)context.getService(sref);
-   }
-
-   public boolean resolveBundle(Bundle bundle)
-   {
-      return packageAdmin.resolveBundles(new Bundle[] { bundle });
-   }
-
-   public boolean resolveBundles(Bundle[] bundles)
-   {
-      return packageAdmin.resolveBundles(bundles);
-   }
-
-   /*
-    * * Log the list of exported packages
-    */
-   public void logExportedPackages(Bundle bundle)
-   {
-      log.debug("Exported-Packages: " + bundle.getSymbolicName());
-      
-      List<String> packages = new ArrayList<String>();
-      for (ExportedPackage exp : packageAdmin.getExportedPackages(bundle))
-         packages.add("  " + exp.getName() + ";version=" + exp.getVersion());
-      
-      Collections.sort(packages);
-      for (String exp : packages)
-         log.debug(exp);
-   }
-}
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/logging/ExportedPackageHelper.java (from rev 88424, projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/framework/ExportedPackageHelper.java)
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/logging/ExportedPackageHelper.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/logging/ExportedPackageHelper.java	2009-05-08 23:11:24 UTC (rev 88566)
@@ -0,0 +1,81 @@
+/*
+ * 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.logging;
+
+//$Id$
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.jboss.logging.Logger;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.packageadmin.ExportedPackage;
+import org.osgi.service.packageadmin.PackageAdmin;
+
+/**
+ * A helper the logs the exported packages for a bundle.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 24-Apr-2009
+ */
+public final class ExportedPackageHelper
+{
+   // Provide logging
+   final Logger log = Logger.getLogger(ExportedPackageHelper.class);
+
+   private PackageAdmin packageAdmin;
+
+   public ExportedPackageHelper(BundleContext context)
+   {
+      ServiceReference sref = context.getServiceReference(PackageAdmin.class.getName());
+      packageAdmin = (PackageAdmin)context.getService(sref);
+   }
+
+   public boolean resolveBundle(Bundle bundle)
+   {
+      return packageAdmin.resolveBundles(new Bundle[] { bundle });
+   }
+
+   public boolean resolveBundles(Bundle[] bundles)
+   {
+      return packageAdmin.resolveBundles(bundles);
+   }
+
+   /*
+    * * Log the list of exported packages
+    */
+   public void logExportedPackages(Bundle bundle)
+   {
+      log.debug("Exported-Packages: " + bundle.getSymbolicName());
+      
+      List<String> packages = new ArrayList<String>();
+      for (ExportedPackage exp : packageAdmin.getExportedPackages(bundle))
+         packages.add("  " + exp.getName() + ";version=" + exp.getVersion());
+      
+      Collections.sort(packages);
+      for (String exp : packages)
+         log.debug(exp);
+   }
+}
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties	2009-05-08 22:53:15 UTC (rev 88565)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties	2009-05-08 23:11:24 UTC (rev 88566)
@@ -16,7 +16,6 @@
 
 # Extra System Packages
 org.osgi.framework.system.packages.extra=\
-	org.apache.log4j, \
 	org.jboss.logging, \
   	org.jboss.net.protocol, \
   	org.jboss.osgi.spi, \




More information about the jboss-osgi-commits mailing list