[jboss-cvs] JBossAS SVN: r90530 - in projects/vfs/branches/dml-zip-rework/src: main/java/org/jboss/virtual/plugins/context/file and 3 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jun 23 11:45:07 EDT 2009
Author: david.lloyd at jboss.com
Date: 2009-06-23 11:45:07 -0400 (Tue, 23 Jun 2009)
New Revision: 90530
Added:
projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/virtual/plugins/context/jzip/ZipFileContext.java
Removed:
projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/virtual/plugins/context/jzip/ZipEntryContext.java
projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/virtual/plugins/context/zip/
projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/virtual/spi/zip/
Modified:
projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/virtual/plugins/context/file/FileSystemContext.java
projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/virtual/plugins/context/jzip/ZipFileHandler.java
projects/vfs/branches/dml-zip-rework/src/test/java/org/jboss/test/virtual/test/ZipEntryHandlerUnitTestCase.java
projects/vfs/branches/dml-zip-rework/src/test/java/org/jboss/test/virtual/test/ZipEntryVFSContextUnitTestCase.java
Log:
Yoink x2
Modified: projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/virtual/plugins/context/file/FileSystemContext.java
===================================================================
--- projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/virtual/plugins/context/file/FileSystemContext.java 2009-06-23 15:38:05 UTC (rev 90529)
+++ projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/virtual/plugins/context/file/FileSystemContext.java 2009-06-23 15:45:07 UTC (rev 90530)
@@ -39,7 +39,7 @@
import org.jboss.virtual.plugins.context.AbstractVFSContext;
import org.jboss.virtual.plugins.context.DelegatingHandler;
import org.jboss.virtual.plugins.context.jar.JarUtils;
-import org.jboss.virtual.plugins.context.jzip.ZipEntryContext;
+import org.jboss.virtual.plugins.context.jzip.ZipFileContext;
import org.jboss.virtual.spi.LinkInfo;
import org.jboss.virtual.spi.VFSContextConstraints;
import org.jboss.virtual.spi.VirtualFileHandler;
@@ -47,7 +47,7 @@
/**
* FileSystemContext.
*
- * Jar archives are processed through {@link org.jboss.virtual.plugins.context.jzip.ZipEntryContext}.
+ * Jar archives are processed through {@link org.jboss.virtual.plugins.context.jzip.ZipFileContext}.
*
* Explicit case sensitive path checking can be turned on by adding an option parameter
* <em>?caseSensitive=true<em> to context URL. This may be desired when native filesystem is not
@@ -265,7 +265,7 @@
delegatorUrl = getChildURL(parent, name);
delegatorUrl = setOptionsToURL(delegatorUrl);
- ZipEntryContext ctx = new ZipEntryContext(delegatorUrl, delegator, fileUrl);
+ ZipFileContext ctx = new ZipFileContext(delegatorUrl, delegator, fileUrl);
VirtualFileHandler handler = ctx.getRoot();
delegator.setDelegate(handler);
Deleted: projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/virtual/plugins/context/jzip/ZipEntryContext.java
===================================================================
--- projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/virtual/plugins/context/jzip/ZipEntryContext.java 2009-06-23 15:38:05 UTC (rev 90529)
+++ projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/virtual/plugins/context/jzip/ZipEntryContext.java 2009-06-23 15:45:07 UTC (rev 90530)
@@ -1,55 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, 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.virtual.plugins.context.jzip;
-
-import org.jboss.virtual.plugins.context.AbstractVFSContext;
-import org.jboss.virtual.plugins.context.DelegatingHandler;
-import org.jboss.virtual.spi.VirtualFileHandler;
-
-import java.io.IOException;
-import java.net.URL;
-import java.net.URISyntaxException;
-
-public final class ZipEntryContext extends AbstractVFSContext
-{
-
- public ZipEntryContext(URL url) throws URISyntaxException
- {
- super(url);
- }
-
- public ZipEntryContext(URL delegatorUrl, DelegatingHandler delegator, URL fileUrl) throws URISyntaxException
- {
- super(delegatorUrl);
- }
-
- public String getName()
- {
- return null;
- }
-
- public VirtualFileHandler getRoot() throws IOException
- {
- return null;
- }
-}
Copied: projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/virtual/plugins/context/jzip/ZipFileContext.java (from rev 90528, projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/virtual/plugins/context/jzip/ZipEntryContext.java)
===================================================================
--- projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/virtual/plugins/context/jzip/ZipFileContext.java (rev 0)
+++ projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/virtual/plugins/context/jzip/ZipFileContext.java 2009-06-23 15:45:07 UTC (rev 90530)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, 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.virtual.plugins.context.jzip;
+
+import org.jboss.virtual.plugins.context.AbstractVFSContext;
+import org.jboss.virtual.plugins.context.DelegatingHandler;
+import org.jboss.virtual.spi.VirtualFileHandler;
+import org.jboss.virtual.VFSUtils;
+import org.jboss.virtual.VFS;
+import org.jboss.jzipfile.ZipCatalog;
+
+import java.io.IOException;
+import java.io.File;
+import java.net.URL;
+import java.net.URISyntaxException;
+
+public final class ZipFileContext extends AbstractVFSContext
+{
+
+ private final File zipFile;
+ private final ZipCatalog catalog;
+
+ public ZipFileContext(URL url) throws URISyntaxException
+ {
+ super(url);
+ zipFile = File.createTempFile("jboss-vfs-", ".zip",
+ }
+
+ public ZipFileContext(URL delegatorUrl, DelegatingHandler delegator, URL fileUrl) throws URISyntaxException
+ {
+ super(delegatorUrl);
+ }
+
+ public String getName()
+ {
+ return null;
+ }
+
+ public VirtualFileHandler getRoot() throws IOException
+ {
+ return null;
+ }
+}
Modified: projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/virtual/plugins/context/jzip/ZipFileHandler.java
===================================================================
--- projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/virtual/plugins/context/jzip/ZipFileHandler.java 2009-06-23 15:38:05 UTC (rev 90529)
+++ projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/virtual/plugins/context/jzip/ZipFileHandler.java 2009-06-23 15:45:07 UTC (rev 90530)
@@ -24,6 +24,7 @@
import org.jboss.virtual.plugins.context.AbstractVirtualFileHandler;
import org.jboss.virtual.spi.VirtualFileHandler;
+import org.jboss.virtual.spi.VFSContext;
import org.jboss.jzipfile.ZipEntry;
import org.jboss.jzipfile.Zip;
@@ -39,6 +40,11 @@
private final File zipFile;
private final ZipEntry zipEntry;
+ public ZipFileHandler(VFSContext context, VirtualFileHandler parent, String name)
+ {
+ super(context, parent, name);
+ }
+
public URI toURI() throws URISyntaxException
{
return null;
Modified: projects/vfs/branches/dml-zip-rework/src/test/java/org/jboss/test/virtual/test/ZipEntryHandlerUnitTestCase.java
===================================================================
--- projects/vfs/branches/dml-zip-rework/src/test/java/org/jboss/test/virtual/test/ZipEntryHandlerUnitTestCase.java 2009-06-23 15:38:05 UTC (rev 90529)
+++ projects/vfs/branches/dml-zip-rework/src/test/java/org/jboss/test/virtual/test/ZipEntryHandlerUnitTestCase.java 2009-06-23 15:45:07 UTC (rev 90530)
@@ -30,7 +30,7 @@
import junit.framework.Test;
import org.jboss.virtual.plugins.context.jar.JarUtils;
-import org.jboss.virtual.plugins.context.jzip.ZipEntryContext;
+import org.jboss.virtual.plugins.context.jzip.ZipFileContext;
import org.jboss.virtual.spi.VFSContext;
import org.jboss.virtual.VFS;
import org.jboss.virtual.VirtualFile;
@@ -57,7 +57,7 @@
{
URL url = getRootResource(name);
url = JarUtils.createJarURL(url);
- return new ZipEntryContext(url);
+ return new ZipFileContext(url);
}
/**
Modified: projects/vfs/branches/dml-zip-rework/src/test/java/org/jboss/test/virtual/test/ZipEntryVFSContextUnitTestCase.java
===================================================================
--- projects/vfs/branches/dml-zip-rework/src/test/java/org/jboss/test/virtual/test/ZipEntryVFSContextUnitTestCase.java 2009-06-23 15:38:05 UTC (rev 90529)
+++ projects/vfs/branches/dml-zip-rework/src/test/java/org/jboss/test/virtual/test/ZipEntryVFSContextUnitTestCase.java 2009-06-23 15:45:07 UTC (rev 90530)
@@ -36,7 +36,7 @@
import org.jboss.virtual.VirtualFile;
import org.jboss.virtual.plugins.context.file.FileSystemContext;
import org.jboss.virtual.plugins.context.jar.JarUtils;
-import org.jboss.virtual.plugins.context.jzip.ZipEntryContext;
+import org.jboss.virtual.plugins.context.jzip.ZipFileContext;
import org.jboss.virtual.spi.VFSContext;
import org.jboss.virtual.spi.VirtualFileHandler;
@@ -65,12 +65,12 @@
{
URL url = getResource("/vfs/context/jar/" + name + ".jar");
url = JarUtils.createJarURL(url);
- return new ZipEntryContext(url);
+ return new ZipFileContext(url);
}
protected VFSContext createVSFContext(URL url) throws Exception
{
- return new ZipEntryContext(url);
+ return new ZipFileContext(url);
}
/**
@@ -87,7 +87,7 @@
OutputStream os = new FileOutputStream(tmpJar);
VFSUtils.copyStreamAndClose(is, os);
- VFSContext context = new ZipEntryContext(tmpJar.toURI().toURL());
+ VFSContext context = new ZipFileContext(tmpJar.toURI().toURL());
assertTrue("context.getRoot().exists()", context.getRoot().exists());
boolean isDeleted = context.getRoot().delete(1000);
@@ -189,7 +189,7 @@
// nested root test
url = getResource("/vfs/test/");
- VFSContext zctx = new ZipEntryContext(new URL("vfszip:" + url.getPath() + "/level1.zip/level2.zip/level3.zip"));
+ VFSContext zctx = new ZipFileContext(new URL("vfszip:" + url.getPath() + "/level1.zip/level2.zip/level3.zip"));
VirtualFileHandler handler = zctx.getRoot();
assertEquals("Nested root Real URL", jarURL, handler.getRealURL().toExternalForm());
More information about the jboss-cvs-commits
mailing list