diff --git a/src/main/java/org/codetracker/FileTrackerImpl.java b/src/main/java/org/codetracker/FileTrackerImpl.java index a2d1c775d04..94c1b638a45 100644 --- a/src/main/java/org/codetracker/FileTrackerImpl.java +++ b/src/main/java/org/codetracker/FileTrackerImpl.java @@ -1322,7 +1322,7 @@ private boolean matchingPeekMethod(Method rightMethod, BlockTrackerChangeHistory return true; } if(rightMethod.getUmlOperation() instanceof UMLOperation && container instanceof UMLOperation) { - return ((UMLOperation)rightMethod.getUmlOperation()).equalsIgoringTypeParameters((UMLOperation)container); + return ((UMLOperation)rightMethod.getUmlOperation()).equalsIgnoringTypeParameters((UMLOperation)container); } } return false; @@ -1335,7 +1335,7 @@ private boolean matchingPeekMethod(Method rightMethod, CommentTrackerChangeHisto return true; } if(rightMethod.getUmlOperation() instanceof UMLOperation && container instanceof UMLOperation) { - return ((UMLOperation)rightMethod.getUmlOperation()).equalsIgoringTypeParameters((UMLOperation)container); + return ((UMLOperation)rightMethod.getUmlOperation()).equalsIgnoringTypeParameters((UMLOperation)container); } } return false; @@ -1349,7 +1349,7 @@ private boolean matchingPeekMethod(Method rightMethod, AnnotationTrackerChangeHi return true; } if(rightMethod.getUmlOperation() instanceof UMLOperation && container instanceof UMLOperation) { - return ((UMLOperation)rightMethod.getUmlOperation()).equalsIgoringTypeParameters((UMLOperation)container); + return ((UMLOperation)rightMethod.getUmlOperation()).equalsIgnoringTypeParameters((UMLOperation)container); } } return false; diff --git a/src/main/java/org/codetracker/FileTrackerWithLocalFilesImpl.java b/src/main/java/org/codetracker/FileTrackerWithLocalFilesImpl.java index 2192507dd29..90a28a51394 100644 --- a/src/main/java/org/codetracker/FileTrackerWithLocalFilesImpl.java +++ b/src/main/java/org/codetracker/FileTrackerWithLocalFilesImpl.java @@ -1329,7 +1329,7 @@ private boolean matchingPeekMethod(Method rightMethod, BlockTrackerChangeHistory return true; } if(rightMethod.getUmlOperation() instanceof UMLOperation && container instanceof UMLOperation) { - return ((UMLOperation)rightMethod.getUmlOperation()).equalsIgoringTypeParameters((UMLOperation)container); + return ((UMLOperation)rightMethod.getUmlOperation()).equalsIgnoringTypeParameters((UMLOperation)container); } } return false; @@ -1342,7 +1342,7 @@ private boolean matchingPeekMethod(Method rightMethod, CommentTrackerChangeHisto return true; } if(rightMethod.getUmlOperation() instanceof UMLOperation && container instanceof UMLOperation) { - return ((UMLOperation)rightMethod.getUmlOperation()).equalsIgoringTypeParameters((UMLOperation)container); + return ((UMLOperation)rightMethod.getUmlOperation()).equalsIgnoringTypeParameters((UMLOperation)container); } } return false; @@ -1356,7 +1356,7 @@ private boolean matchingPeekMethod(Method rightMethod, AnnotationTrackerChangeHi return true; } if(rightMethod.getUmlOperation() instanceof UMLOperation && container instanceof UMLOperation) { - return ((UMLOperation)rightMethod.getUmlOperation()).equalsIgoringTypeParameters((UMLOperation)container); + return ((UMLOperation)rightMethod.getUmlOperation()).equalsIgnoringTypeParameters((UMLOperation)container); } } return false; diff --git a/src/main/resources/oracle/attribute/test/elasticsearch-IndicesService-indicesFieldDataCache.json b/src/main/resources/oracle/attribute/test/elasticsearch-IndicesService-indicesFieldDataCache.json index 469b80821ec..916c39392ea 100644 --- a/src/main/resources/oracle/attribute/test/elasticsearch-IndicesService-indicesFieldDataCache.json +++ b/src/main/resources/oracle/attribute/test/elasticsearch-IndicesService-indicesFieldDataCache.json @@ -22,56 +22,12 @@ "parentCommitId": "4d0feff2efc358914f2d29634eafdb4dec1e5c0f", "commitId": "4bb5b4100d0687f29d758ce5a329c831c563ebe5", "commitTime": 1455288811, - "changeType": "moved", - "elementFileBefore": "core/src/main/java/org/elasticsearch/index/NodeServicesProvider.java", - "elementNameBefore": "core/src/main/java/org.elasticsearch.index.NodeServicesProvider@(final)(private)indicesFieldDataCache:IndicesFieldDataCache(50)", + "changeType": "introduced", + "elementFileBefore": "core/src/main/java/org/elasticsearch/indices/IndicesService.java", + "elementNameBefore": "core/src/main/java/org.elasticsearch.indices.IndicesService@(final)(private)indicesFieldDataCache:IndicesFieldDataCache(127)", "elementFileAfter": "core/src/main/java/org/elasticsearch/indices/IndicesService.java", "elementNameAfter": "core/src/main/java/org.elasticsearch.indices.IndicesService@(final)(private)indicesFieldDataCache:IndicesFieldDataCache(127)", - "comment": "Move Attribute private indicesFieldDataCache : IndicesFieldDataCache from class org.elasticsearch.index.NodeServicesProvider to private indicesFieldDataCache : IndicesFieldDataCache from class org.elasticsearch.indices.IndicesService" - }, - { - "parentCommitId": "45f7844948d0a639b28fff08ddf1ede5637c0a49", - "commitId": "487af301ea4fc11d635fa9fa993be8b9aa261466", - "commitTime": 1446718691, - "changeType": "type change", - "elementFileBefore": "core/src/main/java/org/elasticsearch/index/IndexServicesProvider.java", - "elementNameBefore": "core/src/main/java/org.elasticsearch.index.IndexServicesProvider@(final)(private)indexFieldDataService:IndexFieldDataService(52)", - "elementFileAfter": "core/src/main/java/org/elasticsearch/index/NodeServicesProvider.java", - "elementNameAfter": "core/src/main/java/org.elasticsearch.index.NodeServicesProvider@(final)(private)indicesFieldDataCache:IndicesFieldDataCache(52)", - "comment": "Change Attribute Type indexFieldDataService : IndexFieldDataService to indicesFieldDataCache : IndicesFieldDataCache in class org.elasticsearch.index.NodeServicesProvider" - }, - { - "parentCommitId": "45f7844948d0a639b28fff08ddf1ede5637c0a49", - "commitId": "487af301ea4fc11d635fa9fa993be8b9aa261466", - "commitTime": 1446718691, - "changeType": "rename", - "elementFileBefore": "core/src/main/java/org/elasticsearch/index/IndexServicesProvider.java", - "elementNameBefore": "core/src/main/java/org.elasticsearch.index.IndexServicesProvider@(final)(private)indexFieldDataService:IndexFieldDataService(52)", - "elementFileAfter": "core/src/main/java/org/elasticsearch/index/NodeServicesProvider.java", - "elementNameAfter": "core/src/main/java/org.elasticsearch.index.NodeServicesProvider@(final)(private)indicesFieldDataCache:IndicesFieldDataCache(52)", - "comment": "Rename Attribute indexFieldDataService : IndexFieldDataService to indicesFieldDataCache : IndicesFieldDataCache in class org.elasticsearch.index.NodeServicesProvider" - }, - { - "parentCommitId": "45f7844948d0a639b28fff08ddf1ede5637c0a49", - "commitId": "487af301ea4fc11d635fa9fa993be8b9aa261466", - "commitTime": 1446718691, - "changeType": "container change", - "elementFileBefore": "core/src/main/java/org/elasticsearch/index/IndexServicesProvider.java", - "elementNameBefore": "core/src/main/java/org.elasticsearch.index.IndexServicesProvider@(final)(private)indexFieldDataService:IndexFieldDataService(52)", - "elementFileAfter": "core/src/main/java/org/elasticsearch/index/NodeServicesProvider.java", - "elementNameAfter": "core/src/main/java/org.elasticsearch.index.NodeServicesProvider@(final)(private)indicesFieldDataCache:IndicesFieldDataCache(52)", - "comment": "Rename Class org.elasticsearch.index.IndexServicesProvider renamed to org.elasticsearch.index.NodeServicesProvider" - }, - { - "parentCommitId": "c5971272ee71a24f17e4958d729588c59266ab05", - "commitId": "a0821355384ec6881bade28dd3d29e1a64bea550", - "commitTime": 1444119596, - "changeType": "introduced", - "elementFileBefore": "core/src/main/java/org/elasticsearch/index/IndexServicesProvider.java", - "elementNameBefore": "core/src/main/java/org.elasticsearch.index.IndexServicesProvider@(final)(private)indexFieldDataService:IndexFieldDataService(57)", - "elementFileAfter": "core/src/main/java/org/elasticsearch/index/IndexServicesProvider.java", - "elementNameAfter": "core/src/main/java/org.elasticsearch.index.IndexServicesProvider@(final)(private)indexFieldDataService:IndexFieldDataService(57)", - "comment": "added with new class" + "comment": "new attribute" } ] } \ No newline at end of file diff --git a/src/test/resources/attribute/test-expected.txt b/src/test/resources/attribute/test-expected.txt index 54d68fffaf9..5beb28a4237 100644 --- a/src/test/resources/attribute/test-expected.txt +++ b/src/test/resources/attribute/test-expected.txt @@ -8,7 +8,7 @@ commons-io-Tailer-listener.json, 2, 0, 0 commons-io-Tailer-reOpen.json, 1, 0, 0 elasticsearch-BulkRequest-requests.json, 12, 0, 0 elasticsearch-ESFileStore-in.json, 3, 0, 0 -elasticsearch-IndicesService-indicesFieldDataCache.json, 6, 0, 0 +elasticsearch-IndicesService-indicesFieldDataCache.json, 2, 0, 0 elasticsearch-IndicesService-indicesQueryCache.json, 2, 0, 0 elasticsearch-NodesFaultDetection-nodesFD.json, 5, 0, 0 elasticsearch-RestRequest-httpRequest.json, 1, 0, 0 diff --git a/src/test/resources/blame/blameTestWithLocalRepo24.txt b/src/test/resources/blame/blameTestWithLocalRepo24.txt index b28044decc5..b0e502577ad 100644 --- a/src/test/resources/blame/blameTestWithLocalRepo24.txt +++ b/src/test/resources/blame/blameTestWithLocalRepo24.txt @@ -1,66 +1,66 @@ -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 1) /* -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 2) * Copyright (C) The Apache Software Foundation. All rights reserved. -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 3) * -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 4) * This software is published under the terms of the Apache Software License -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 5) * version 1.1, a copy of which has been included with this distribution in -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 6) * the LICENSE.txt file. -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 7) */ -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultFileSystemManager.java (adammurdoch 2002-03-09 10:31:31 +0000 8) package org.apache.aut.vfs.impl; - 9) -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 10) import java.util.HashMap; -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 11) import java.util.Map; -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 12) import org.apache.aut.vfs.FileObject; -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 13) import org.apache.aut.vfs.FileSystemException; -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 14) import org.apache.aut.vfs.provider.FileSystem; -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 15) import org.apache.aut.vfs.provider.FileSystemProviderContext; - 16) -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 17) /** -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 18) * A provider context implementation. -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 19) * -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 20) * @author Adam Murdoch -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 21) * @version $Revision$ $Date$ -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 22) */ -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultFileSystemManager.java (adammurdoch 2002-03-09 10:31:31 +0000 23) final class DefaultProviderContext -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultFileSystemManager.java (adammurdoch 2002-03-09 10:31:31 +0000 24) implements FileSystemProviderContext -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultFileSystemManager.java (adammurdoch 2002-03-09 10:31:31 +0000 25) { -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 26) private final DefaultFileSystemManager m_manager; - 27) -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 28) /** -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 29) * The cached file systems. This is a mapping from root URI to -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 30) * FileSystem object. -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 31) */ -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 32) private final Map m_fileSystems = new HashMap(); - 33) -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 34) public DefaultProviderContext( final DefaultFileSystemManager manager ) -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 35) { -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 36) m_manager = manager; -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 37) } - 38) -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 39) /** -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 40) * Locate a file by name. -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 41) */ -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 42) public FileObject resolveFile( final FileObject baseFile, final String name ) -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 43) throws FileSystemException -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 44) { -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 45) return m_manager.resolveFile( baseFile, name ); -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 46) } - 47) -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 48) /** -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 49) * Locates a cached file system by root URI. -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 50) */ -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 51) public FileSystem getFileSystem( final String rootURI ) -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 52) { -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 53) // TODO - need to have a per-fs uri comparator -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 54) return (FileSystem)m_fileSystems.get( rootURI ); -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 55) } - 56) -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 57) /** -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 58) * Registers a file system for caching. -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 59) */ -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 60) public void putFileSystem( final String rootURI, final FileSystem fs ) -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 61) throws FileSystemException -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 62) { -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 63) // TODO - should really check that there's not one already cached -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 64) m_fileSystems.put( rootURI, fs ); -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 65) } -52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultFileSystemManager.java (adammurdoch 2002-03-09 10:31:31 +0000 66) } +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 1) /* +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 2) * Copyright (C) The Apache Software Foundation. All rights reserved. +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 3) * +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 4) * This software is published under the terms of the Apache Software License +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 5) * version 1.1, a copy of which has been included with this distribution in +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 6) * the LICENSE.txt file. +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 7) */ +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 8) package org.apache.aut.vfs.impl; + 9) +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 10) import java.util.HashMap; +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 11) import java.util.Map; +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 12) import org.apache.aut.vfs.FileObject; +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 13) import org.apache.aut.vfs.FileSystemException; +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 14) import org.apache.aut.vfs.provider.FileSystem; +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 15) import org.apache.aut.vfs.provider.FileSystemProviderContext; + 16) +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 17) /** +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 18) * A provider context implementation. +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 19) * +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 20) * @author Adam Murdoch +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 21) * @version $Revision$ $Date$ +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 22) */ +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 23) final class DefaultProviderContext +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 24) implements FileSystemProviderContext +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 25) { +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 26) private final DefaultFileSystemManager m_manager; + 27) +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 28) /** +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 29) * The cached file systems. This is a mapping from root URI to +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 30) * FileSystem object. +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 31) */ +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 32) private final Map m_fileSystems = new HashMap(); + 33) +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 34) public DefaultProviderContext( final DefaultFileSystemManager manager ) +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 35) { +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 36) m_manager = manager; +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 37) } + 38) +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 39) /** +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 40) * Locate a file by name. +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 41) */ +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 42) public FileObject resolveFile( final FileObject baseFile, final String name ) +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 43) throws FileSystemException +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 44) { +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 45) return m_manager.resolveFile( baseFile, name ); +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 46) } + 47) +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 48) /** +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 49) * Locates a cached file system by root URI. +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 50) */ +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 51) public FileSystem getFileSystem( final String rootURI ) +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 52) { +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 53) // TODO - need to have a per-fs uri comparator +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 54) return (FileSystem)m_fileSystems.get( rootURI ); +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 55) } + 56) +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 57) /** +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 58) * Registers a file system for caching. +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 59) */ +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 60) public void putFileSystem( final String rootURI, final FileSystem fs ) +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 61) throws FileSystemException +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 62) { +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 63) // TODO - should really check that there's not one already cached +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 64) m_fileSystems.put( rootURI, fs ); +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 65) } +52926715b proposal/myrmidon/src/java/org/apache/aut/vfs/impl/DefaultProviderContext.java (adammurdoch 2002-03-09 10:31:31 +0000 66) }