[jboss-cvs] JBossAS SVN: r96262 - projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/vfs.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Nov 11 10:28:38 EST 2009


Author: alesj
Date: 2009-11-11 10:28:38 -0500 (Wed, 11 Nov 2009)
New Revision: 96262

Modified:
   projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/vfs/BundleHandler.java
Log:
The bundle usage is enough.

Modified: projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/vfs/BundleHandler.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/vfs/BundleHandler.java	2009-11-11 15:19:33 UTC (rev 96261)
+++ projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/vfs/BundleHandler.java	2009-11-11 15:28:38 UTC (rev 96262)
@@ -30,12 +30,12 @@
 import java.util.Collections;
 import java.util.List;
 
-import org.jboss.osgi.framework.bundle.OSGiBundleState;
 import org.jboss.virtual.VFSUtils;
 import org.jboss.virtual.VirtualFile;
 import org.jboss.virtual.plugins.context.AbstractVirtualFileHandler;
 import org.jboss.virtual.spi.VFSContext;
 import org.jboss.virtual.spi.VirtualFileHandler;
+import org.osgi.framework.Bundle;
 
 /**
  * Bundle handler.
@@ -48,19 +48,19 @@
    private static final long serialVersionUID = 6650185906199900589L;
    
    private VirtualFile file;
-   private OSGiBundleState bundleState;
+   private Bundle bundle;
    private VirtualFileHandler handler;
 
-   public BundleHandler(VFSContext context, VirtualFile file, OSGiBundleState bundleState) throws IOException
+   public BundleHandler(VFSContext context, VirtualFile file, Bundle bundle) throws IOException
    {
-      this(context, LazyVirtualFileHandler.create(file.getParent()), file, bundleState);
+      this(context, LazyVirtualFileHandler.create(file.getParent()), file, bundle);
    }
 
-   public BundleHandler(VFSContext context, VirtualFileHandler parent, VirtualFile file, OSGiBundleState bundleState) throws IOException
+   public BundleHandler(VFSContext context, VirtualFileHandler parent, VirtualFile file, Bundle bundle) throws IOException
    {
       super(context, parent, file.getName());
       this.file = file;
-      this.bundleState = bundleState;
+      this.bundle = bundle;
    }
 
    protected VirtualFileHandler getHandler() throws IOException
@@ -82,31 +82,31 @@
    protected VirtualFileHandler createChildHandler(VirtualFile child) throws IOException
    {
       if (handler == null)
-         return new BundleHandler(getVFSContext(), child, bundleState);
+         return new BundleHandler(getVFSContext(), child, bundle);
       else
-         return new BundleHandler(getVFSContext(), handler, child, bundleState);
+         return new BundleHandler(getVFSContext(), handler, child, bundle);
    }
 
    public URI toURI() throws URISyntaxException
    {
-      return new URI("bundle", Long.toString(bundleState.getBundleId()), getRelativePath(false), null);
+      return new URI("bundle", Long.toString(bundle.getBundleId()), getRelativePath(false), null);
    }
 
    public long getLastModified() throws IOException
    {
-      return bundleState.getLastModified();
+      return bundle.getLastModified();
    }
 
    public InputStream openStream() throws IOException
    {
-      bundleState.getResource(getRelativePath(false)); // permission check
+      bundle.getResource(getRelativePath(false)); // permission check
       
       return file.openStream();
    }
 
    public List<VirtualFileHandler> getChildren(boolean ignoreErrors) throws IOException
    {
-      bundleState.findEntries(getRelativePath(false), null, false); // permission check
+      bundle.findEntries(getRelativePath(false), null, false); // permission check
 
       List<VirtualFile> children = file.getChildren();
       if (children != null && children.isEmpty() == false)
@@ -124,7 +124,7 @@
    public VirtualFileHandler getChild(String path) throws IOException
    {
       String fullPath = getRelativePath(true) + path; 
-      URL entry = bundleState.getEntry(fullPath); // permission check
+      URL entry = bundle.getEntry(fullPath); // permission check
       if (entry == null)
          return null;
 




More information about the jboss-cvs-commits mailing list