From 2705071ab46e919c65a4ebe889fe26ca74aae887 Mon Sep 17 00:00:00 2001 From: adammurdoch Date: Sun, 3 Feb 2002 00:06:37 +0000 Subject: [PATCH] Move DefaultFileSystemManager to impl package, to get rid of circular package dependency. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271094 13f79535-47bb-0310-9956-ffa450edef68 --- .../{provider => impl}/DefaultFileSystemManager.java | 10 +++++++--- .../java/org/apache/aut/vfs/impl/Resources.properties | 3 +++ .../org/apache/aut/vfs/provider/Resources.properties | 4 ---- .../org/apache/aut/vfs/BasicFileSystemTestBase.java | 2 +- .../org/apache/aut/vfs/BasicFileSystemTestBase.java | 2 +- 5 files changed, 12 insertions(+), 9 deletions(-) rename proposal/myrmidon/src/java/org/apache/aut/vfs/{provider => impl}/DefaultFileSystemManager.java (93%) create mode 100644 proposal/myrmidon/src/java/org/apache/aut/vfs/impl/Resources.properties diff --git a/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/DefaultFileSystemManager.java b/proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultFileSystemManager.java similarity index 93% rename from proposal/myrmidon/src/java/org/apache/aut/vfs/provider/DefaultFileSystemManager.java rename to proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultFileSystemManager.java index 9ba8852fd..63cc0e8e5 100644 --- a/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/DefaultFileSystemManager.java +++ b/proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultFileSystemManager.java @@ -5,7 +5,7 @@ * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ -package org.apache.aut.vfs.provider; +package org.apache.aut.vfs.impl; import java.util.HashMap; import java.util.Iterator; @@ -15,6 +15,10 @@ import org.apache.aut.vfs.FileObject; import org.apache.aut.vfs.FileSystemException; import org.apache.aut.vfs.FileSystemManager; import org.apache.aut.vfs.provider.local.LocalFileSystemProvider; +import org.apache.aut.vfs.provider.FileSystemProvider; +import org.apache.aut.vfs.provider.UriParser; +import org.apache.aut.vfs.provider.FileSystemProviderContext; +import org.apache.aut.vfs.provider.FileSystem; import org.apache.avalon.excalibur.i18n.Resources; import org.apache.avalon.excalibur.i18n.ResourceManager; @@ -190,13 +194,13 @@ public class DefaultFileSystemManager implements FileSystemManager public FileSystem getFileSystem( String rootURI ) { // TODO - need to have a per-fs uri comparator - return (org.apache.aut.vfs.provider.FileSystem)m_fileSystems.get( rootURI ); + return (FileSystem)m_fileSystems.get( rootURI ); } /** * Registers a file system for caching. */ - public void putFileSystem( String rootURI, org.apache.aut.vfs.provider.FileSystem fs ) throws FileSystemException + public void putFileSystem( String rootURI, FileSystem fs ) throws FileSystemException { // TODO - should really check that there's not one already cached m_fileSystems.put( rootURI, fs ); diff --git a/proposal/myrmidon/src/java/org/apache/aut/vfs/impl/Resources.properties b/proposal/myrmidon/src/java/org/apache/aut/vfs/impl/Resources.properties new file mode 100644 index 000000000..f68e24482 --- /dev/null +++ b/proposal/myrmidon/src/java/org/apache/aut/vfs/impl/Resources.properties @@ -0,0 +1,3 @@ +# DefaultFileSystemManager +unknown-scheme.error=Unknown scheme "{0}" in URI "{0}". +find-rel-file.error=Could not find file with URI "{0}" because it is a relative path, and no base URI was provided. diff --git a/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/Resources.properties b/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/Resources.properties index 321c7c799..1d2d95d7b 100644 --- a/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/Resources.properties +++ b/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/Resources.properties @@ -31,10 +31,6 @@ close-outstr.error=Could not close file output stream. # AbstractFileSystemProvider invalid-absolute-uri.error=Invalid absolute URI "{0}". -# DefaultFileSystemManager -unknown-scheme.error=Unknown scheme "{0}" in URI "{0}". -find-rel-file.error=Could not find file with URI "{0}" because it is a relative path, and no base URI was provided. - # UriParser missing-double-slashes.error=Expecting // to follow the scheme in URI "{0}". missing-hostname.error=Hostname missing from URI "{0}". diff --git a/proposal/myrmidon/src/test/org/apache/aut/vfs/BasicFileSystemTestBase.java b/proposal/myrmidon/src/test/org/apache/aut/vfs/BasicFileSystemTestBase.java index d792b3fa6..5516c8fee 100644 --- a/proposal/myrmidon/src/test/org/apache/aut/vfs/BasicFileSystemTestBase.java +++ b/proposal/myrmidon/src/test/org/apache/aut/vfs/BasicFileSystemTestBase.java @@ -17,7 +17,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import junit.framework.TestCase; -import org.apache.aut.vfs.provider.DefaultFileSystemManager; +import org.apache.aut.vfs.impl.DefaultFileSystemManager; /** * File system test cases, which verifies the structure and naming diff --git a/proposal/myrmidon/src/testcases/org/apache/aut/vfs/BasicFileSystemTestBase.java b/proposal/myrmidon/src/testcases/org/apache/aut/vfs/BasicFileSystemTestBase.java index d792b3fa6..5516c8fee 100644 --- a/proposal/myrmidon/src/testcases/org/apache/aut/vfs/BasicFileSystemTestBase.java +++ b/proposal/myrmidon/src/testcases/org/apache/aut/vfs/BasicFileSystemTestBase.java @@ -17,7 +17,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import junit.framework.TestCase; -import org.apache.aut.vfs.provider.DefaultFileSystemManager; +import org.apache.aut.vfs.impl.DefaultFileSystemManager; /** * File system test cases, which verifies the structure and naming