Java Doc for DefaultFileSystemManager.java in  » Library » Apache-commons-vfs-20070724-src » org » apache » commons » vfs » impl » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Library » Apache commons vfs 20070724 src » org.apache.commons.vfs.impl 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.commons.vfs.impl.DefaultFileSystemManager

All known Subclasses:   org.apache.commons.vfs.impl.StandardFileSystemManager,
DefaultFileSystemManager
public class DefaultFileSystemManager implements FileSystemManager(Code)
A default file system manager implementation.
author:
   Adam Murdoch
version:
   $Revision: 537931 $ $Date: 2006-03-30 21:16:24 +0200 (Do, 30 Mrz
version:
   2006) $

Inner Class :final class VfsStreamHandlerFactory implements URLStreamHandlerFactory



Method Summary
public  void_closeFileSystem(FileSystem filesystem)
    
public  voidaddExtensionMap(String extension, String scheme)
     Adds an filename extension mapping.
public  voidaddMimeTypeMap(String mimeType, String scheme)
     Adds a mime type mapping.
public  voidaddOperationProvider(String scheme, FileOperationProvider operationProvider)
     Adds the specified FileOperationProvider for the specified scheme.
public  voidaddOperationProvider(String[] schemes, FileOperationProvider operationProvider)
    
public  voidaddProvider(String urlScheme, FileProvider provider)
     Registers a file system provider.
public  voidaddProvider(String[] urlSchemes, FileProvider provider)
     Registers a file system provider.
public  booleancanCreateFileSystem(FileObject file)
     Determines if a layered file system can be created for a given file.
public  voidclose()
     Closes all files created by this manager, and cleans up any temporary files.
public  voidcloseFileSystem(FileSystem filesystem)
    
public  FileObjectcreateFileSystem(String scheme, FileObject file)
     Creates a layered file system.
public  FileObjectcreateFileSystem(FileObject file)
     Creates a layered file system.
public  FileObjectcreateVirtualFileSystem(FileObject rootFile)
     Creates a virtual file system.
public  FileObjectcreateVirtualFileSystem(String rootUri)
     Creates an empty virtual file system.
public  voidfreeUnusedResources()
     Free all resources used by unused filesystems created by this manager.
public  FileObjectgetBaseFile()
     Returns the base file used to resolve relative URI.
public  CacheStrategygetCacheStrategy()
    
public  FileContentInfoFactorygetFileContentInfoFactory()
     get the fileContentInfoFactory used to determine the infos of a file content.
public  ClassgetFileObjectDecorator()
    
public  ConstructorgetFileObjectDecoratorConst()
     The constructor associated to the fileObjectDecorator.
public  FileSystemConfigBuildergetFileSystemConfigBuilder(String scheme)
    
public  FilesCachegetFilesCache()
    
protected  LoggetLogger()
     Returns the logger used by this manager.
public  FileOperationProvider[]getOperationProviders(String scheme)
    
Parameters:
  scheme - the scheme for wich we want to get the list af registeredproviders.
public  CollectiongetProviderCapabilities(String scheme)
     Get the capabilities for a given scheme.
public  FileReplicatorgetReplicator()
     Returns the file replicator. The file replicator.
public  String[]getSchemes()
     Get the schemes currently available.
public  TemporaryFileStoregetTemporaryFileStore()
     Returns the temporary file store. The file store.
public  URLStreamHandlerFactorygetURLStreamHandlerFactory()
     Get the URLStreamHandlerFactory.
public  booleanhasProvider(String scheme)
     Returns true if this manager has a provider for a particular scheme.
public  voidinit()
     Initialises this manager.
public  FileObjectresolveFile(String uri)
     Locates a file by URI.
public  FileObjectresolveFile(String uri, FileSystemOptions fileSystemOptions)
    
public  FileObjectresolveFile(File baseFile, String uri)
     Locates a file by URI.
public  FileObjectresolveFile(FileObject baseFile, String uri)
     Resolves a URI, relative to a base file.
public  FileObjectresolveFile(FileObject baseFile, String uri, FileSystemOptions fileSystemOptions)
    
public  FileNameresolveName(FileName root, String path)
     Resolves a name, relative to the file.
public  FileNameresolveName(FileName base, String name, NameScope scope)
     Resolves a name, relative to the root.
public  FileNameresolveURI(String uri)
    
public  voidsetBaseFile(FileObject baseFile)
     Sets the base file to use when resolving relative URI.
public  voidsetBaseFile(File baseFile)
     Sets the base file to use when resolving relative URI.
public  voidsetCacheStrategy(CacheStrategy fileCacheStrategy)
    

Set the cache strategy to use when dealing with file object data.

public  voidsetDefaultProvider(FileProvider provider)
     Sets the default provider.
public  voidsetFileContentInfoFactory(FileContentInfoFactory fileContentInfoFactory)
     set the fileContentInfoFactory used to determine the infos of a file content.
public  voidsetFileObjectDecorator(Class fileObjectDecorator)
    
public  voidsetFilesCache(FilesCache filesCache)
    
public  voidsetLogger(Log log)
     Sets the logger to use.
public  voidsetReplicator(FileReplicator replicator)
     Sets the file replicator to use.
public  voidsetTemporaryFileStore(TemporaryFileStore tempFileStore)
     Sets the temporary file store to use.
public  FileObjecttoFileObject(File file)
     Converts a local file into a FileObject .



Method Detail
_closeFileSystem
public void _closeFileSystem(FileSystem filesystem)(Code)
Closes the given filesystem.
If you use VFS as singleton it is VERY dangerous to call this method



addExtensionMap
public void addExtensionMap(String extension, String scheme)(Code)
Adds an filename extension mapping.
Parameters:
  extension - The file name extension.
Parameters:
  scheme - The scheme to use for files with this extension.



addMimeTypeMap
public void addMimeTypeMap(String mimeType, String scheme)(Code)
Adds a mime type mapping.
Parameters:
  mimeType - The mime type.
Parameters:
  scheme - The scheme to use for files with this mime type.



addOperationProvider
public void addOperationProvider(String scheme, FileOperationProvider operationProvider) throws FileSystemException(Code)
Adds the specified FileOperationProvider for the specified scheme. Several FileOperationProvider's might be registered for the same scheme. For example, for "file" scheme we can register SvnWsOperationProvider and CvsOperationProvider.
Parameters:
  scheme -
Parameters:
  operationProvider -
throws:
  FileSystemException -



addOperationProvider
public void addOperationProvider(String[] schemes, FileOperationProvider operationProvider) throws FileSystemException(Code)

See Also:   FileSystemManager.addOperationProvider(Stringorg.apache.commons.vfs.operations.FileOperationProvider)
Parameters:
  schemes -
Parameters:
  operationProvider -
throws:
  FileSystemException -



addProvider
public void addProvider(String urlScheme, FileProvider provider) throws FileSystemException(Code)
Registers a file system provider. The manager takes care of all lifecycle management. A provider may be registered multiple times.
Parameters:
  urlScheme - The scheme the provider will handle.
Parameters:
  provider - The provider.



addProvider
public void addProvider(String[] urlSchemes, FileProvider provider) throws FileSystemException(Code)
Registers a file system provider. The manager takes care of all lifecycle management. A provider may be registered multiple times.
Parameters:
  urlSchemes - The schemes the provider will handle.
Parameters:
  provider - The provider.



canCreateFileSystem
public boolean canCreateFileSystem(FileObject file) throws FileSystemException(Code)
Determines if a layered file system can be created for a given file.
Parameters:
  file - The file to check for.



close
public void close()(Code)
Closes all files created by this manager, and cleans up any temporary files. Also closes all providers and the replicator.



closeFileSystem
public void closeFileSystem(FileSystem filesystem)(Code)
Closes the given filesystem.
If you use VFS as singleton it is VERY dangerous to call this method



createFileSystem
public FileObject createFileSystem(String scheme, FileObject file) throws FileSystemException(Code)
Creates a layered file system.



createFileSystem
public FileObject createFileSystem(FileObject file) throws FileSystemException(Code)
Creates a layered file system.



createVirtualFileSystem
public FileObject createVirtualFileSystem(FileObject rootFile) throws FileSystemException(Code)
Creates a virtual file system.



createVirtualFileSystem
public FileObject createVirtualFileSystem(String rootUri) throws FileSystemException(Code)
Creates an empty virtual file system.



freeUnusedResources
public void freeUnusedResources()(Code)
Free all resources used by unused filesystems created by this manager.



getBaseFile
public FileObject getBaseFile() throws FileSystemException(Code)
Returns the base file used to resolve relative URI.



getCacheStrategy
public CacheStrategy getCacheStrategy()(Code)
Get the cache strategy used



getFileContentInfoFactory
public FileContentInfoFactory getFileContentInfoFactory()(Code)
get the fileContentInfoFactory used to determine the infos of a file content.



getFileObjectDecorator
public Class getFileObjectDecorator()(Code)
Get the file object decorator used



getFileObjectDecoratorConst
public Constructor getFileObjectDecoratorConst()(Code)
The constructor associated to the fileObjectDecorator. We cache it here for performance reasons.



getFileSystemConfigBuilder
public FileSystemConfigBuilder getFileSystemConfigBuilder(String scheme) throws FileSystemException(Code)
Get the configuration builder for the given scheme
throws:
  FileSystemException - if the given scheme is not konwn



getFilesCache
public FilesCache getFilesCache()(Code)
Returns the filesCache implementation used to cache files



getLogger
protected Log getLogger()(Code)
Returns the logger used by this manager.



getOperationProviders
public FileOperationProvider[] getOperationProviders(String scheme) throws FileSystemException(Code)

Parameters:
  scheme - the scheme for wich we want to get the list af registeredproviders. the registered FileOperationProviders for the specified scheme.If there were no providers registered for the scheme, it returnsnull.
throws:
  FileSystemException -



getProviderCapabilities
public Collection getProviderCapabilities(String scheme) throws FileSystemException(Code)
Get the capabilities for a given scheme.
throws:
  FileSystemException - if the given scheme is not konwn



getReplicator
public FileReplicator getReplicator() throws FileSystemException(Code)
Returns the file replicator. The file replicator. Never returns null.



getSchemes
public String[] getSchemes()(Code)
Get the schemes currently available.



getTemporaryFileStore
public TemporaryFileStore getTemporaryFileStore() throws FileSystemException(Code)
Returns the temporary file store. The file store. Never returns null.



getURLStreamHandlerFactory
public URLStreamHandlerFactory getURLStreamHandlerFactory()(Code)
Get the URLStreamHandlerFactory.



hasProvider
public boolean hasProvider(String scheme)(Code)
Returns true if this manager has a provider for a particular scheme.



init
public void init() throws FileSystemException(Code)
Initialises this manager.



resolveFile
public FileObject resolveFile(String uri) throws FileSystemException(Code)
Locates a file by URI.



resolveFile
public FileObject resolveFile(String uri, FileSystemOptions fileSystemOptions) throws FileSystemException(Code)
Locate a file by URI, use the FileSystemOptions for file-system creation



resolveFile
public FileObject resolveFile(File baseFile, String uri) throws FileSystemException(Code)
Locates a file by URI.



resolveFile
public FileObject resolveFile(FileObject baseFile, String uri) throws FileSystemException(Code)
Resolves a URI, relative to a base file.



resolveFile
public FileObject resolveFile(FileObject baseFile, String uri, FileSystemOptions fileSystemOptions) throws FileSystemException(Code)
Resolves a URI, realtive to a base file with specified FileSystem configuration



resolveName
public FileName resolveName(FileName root, String path) throws FileSystemException(Code)
Resolves a name, relative to the file. If the supplied name is an absolute path, then it is resolved relative to the root of the file system that the file belongs to. If a relative name is supplied, then it is resolved relative to this file name.



resolveName
public FileName resolveName(FileName base, String name, NameScope scope) throws FileSystemException(Code)
Resolves a name, relative to the root.
Parameters:
  base - the base filename
Parameters:
  name - the name
Parameters:
  scope - the NameScope
throws:
  FileSystemException -



resolveURI
public FileName resolveURI(String uri) throws FileSystemException(Code)
resolve the uri to a filename
throws:
  FileSystemException -



setBaseFile
public void setBaseFile(FileObject baseFile) throws FileSystemException(Code)
Sets the base file to use when resolving relative URI.



setBaseFile
public void setBaseFile(File baseFile) throws FileSystemException(Code)
Sets the base file to use when resolving relative URI.



setCacheStrategy
public void setCacheStrategy(CacheStrategy fileCacheStrategy) throws FileSystemException(Code)

Set the cache strategy to use when dealing with file object data. You can set it only once before the FileSystemManager is initialized.

The default is CacheStrategy.ON_RESOLVE


throws:
  FileSystemException - if this is not possible. e.g. it is already set.



setDefaultProvider
public void setDefaultProvider(FileProvider provider) throws FileSystemException(Code)
Sets the default provider. This is the provider that will handle URI with unknown schemes. The manager takes care of all lifecycle management.



setFileContentInfoFactory
public void setFileContentInfoFactory(FileContentInfoFactory fileContentInfoFactory) throws FileSystemException(Code)
set the fileContentInfoFactory used to determine the infos of a file content.



setFileObjectDecorator
public void setFileObjectDecorator(Class fileObjectDecorator) throws FileSystemException(Code)
set a fileObject decorator to be used for ALL returned file objects
Parameters:
  fileObjectDecorator - must be inherted from DecoratedFileObject a has to provide aconstructor with a single FileObject as argument



setFilesCache
public void setFilesCache(FilesCache filesCache) throws FileSystemException(Code)
Sets the filesCache implementation used to cache files



setLogger
public void setLogger(Log log)(Code)
Sets the logger to use.



setReplicator
public void setReplicator(FileReplicator replicator) throws FileSystemException(Code)
Sets the file replicator to use. The manager takes care of all lifecycle management.



setTemporaryFileStore
public void setTemporaryFileStore(TemporaryFileStore tempFileStore) throws FileSystemException(Code)
Sets the temporary file store to use. The manager takes care of all lifecycle management.



toFileObject
public FileObject toFileObject(File file) throws FileSystemException(Code)
Converts a local file into a FileObject .



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.