[jboss-osgi-commits] JBoss-OSGI SVN: r101826 - projects/jboss-osgi/projects/deployers/trunk/vfs30/src/main/java/org/jboss/osgi/deployer.

jboss-osgi-commits at lists.jboss.org jboss-osgi-commits at lists.jboss.org
Thu Mar 4 09:16:12 EST 2010


Author: thomas.diesler at jboss.com
Date: 2010-03-04 09:16:11 -0500 (Thu, 04 Mar 2010)
New Revision: 101826

Modified:
   projects/jboss-osgi/projects/deployers/trunk/vfs30/src/main/java/org/jboss/osgi/deployer/BundleStructureDeployer.java
Log:
Use AbstractVFSArchiveStructureDeployer

Modified: projects/jboss-osgi/projects/deployers/trunk/vfs30/src/main/java/org/jboss/osgi/deployer/BundleStructureDeployer.java
===================================================================
--- projects/jboss-osgi/projects/deployers/trunk/vfs30/src/main/java/org/jboss/osgi/deployer/BundleStructureDeployer.java	2010-03-04 14:14:50 UTC (rev 101825)
+++ projects/jboss-osgi/projects/deployers/trunk/vfs30/src/main/java/org/jboss/osgi/deployer/BundleStructureDeployer.java	2010-03-04 14:16:11 UTC (rev 101826)
@@ -28,7 +28,7 @@
 
 import org.jboss.deployers.spi.DeploymentException;
 import org.jboss.deployers.spi.structure.ContextInfo;
-import org.jboss.deployers.vfs.plugins.structure.AbstractVFSStructureDeployer;
+import org.jboss.deployers.vfs.plugins.structure.AbstractVFSArchiveStructureDeployer;
 import org.jboss.deployers.vfs.spi.structure.StructureContext;
 import org.jboss.vfs.VFSUtils;
 import org.jboss.vfs.VirtualFile;
@@ -40,7 +40,7 @@
  * @author Thomas.Diesler at jboss.com
  * @since 16-Apr-2009
  */
-public class BundleStructureDeployer extends AbstractVFSStructureDeployer
+public class BundleStructureDeployer extends AbstractVFSArchiveStructureDeployer
 {
    /**
     * Sets the default relative order.
@@ -52,18 +52,19 @@
       setRelativeOrder(500);
    }
 
-   /**
-    * Determine the structure of a bundle deployment
-    * 
-    * @param context the structure context
-    * @return true when it recognised the context
-    * @throws DeploymentException for an error
-    */
-   public boolean determineStructure(StructureContext structureContext) throws DeploymentException
+   @Override
+   protected boolean hasValidSuffix(String name)
    {
+      // We only accept bundles packaged as "*.jar"
+      return name.endsWith(".jar");
+   }
+   
+   @Override
+   protected boolean doDetermineStructure(StructureContext structureContext) throws DeploymentException
+   {
       ContextInfo context = null;
       VirtualFile root = structureContext.getRoot();
-
+      
       try
       {
          // This file is not for me, because I'm only interested



More information about the jboss-osgi-commits mailing list