org.apache.commons.vfs.impl
Class DefaultVfsComponentContext

java.lang.Object
  extended by org.apache.commons.vfs.impl.DefaultVfsComponentContext
All Implemented Interfaces:
VfsComponentContext

final class DefaultVfsComponentContext
extends java.lang.Object
implements VfsComponentContext

The default context implementation.

Version:
$Revision: 480428 $ $Date: 2006-11-29 07:15:24 +0100 (Mi, 29 Nov 2006) $
Author:
Adam Murdoch

Field Summary
private  DefaultFileSystemManager manager
           
 
Constructor Summary
DefaultVfsComponentContext(DefaultFileSystemManager manager)
           
 
Method Summary
 FileSystemManager getFileSystemManager()
          Returns the filesystem manager for the current context
 FileReplicator getReplicator()
          Locates a file replicator for the provider to use.
 TemporaryFileStore getTemporaryFileStore()
          Locates a temporary file store for the provider to use.
 FileName parseURI(java.lang.String uri)
           
 FileObject resolveFile(FileObject baseFile, java.lang.String name, FileSystemOptions fileSystemOptions)
          Locate a file by name.
 FileObject resolveFile(java.lang.String name, FileSystemOptions fileSystemOptions)
          Locate a file by name.
 FileObject toFileObject(java.io.File file)
          Returns a FileObject for a local file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

manager

private final DefaultFileSystemManager manager
Constructor Detail

DefaultVfsComponentContext

public DefaultVfsComponentContext(DefaultFileSystemManager manager)
Method Detail

resolveFile

public FileObject resolveFile(FileObject baseFile,
                              java.lang.String name,
                              FileSystemOptions fileSystemOptions)
                       throws FileSystemException
Locate a file by name.

Specified by:
resolveFile in interface VfsComponentContext
Throws:
FileSystemException

resolveFile

public FileObject resolveFile(java.lang.String name,
                              FileSystemOptions fileSystemOptions)
                       throws FileSystemException
Locate a file by name.

Specified by:
resolveFile in interface VfsComponentContext
Throws:
FileSystemException

parseURI

public FileName parseURI(java.lang.String uri)
                  throws FileSystemException
Specified by:
parseURI in interface VfsComponentContext
Throws:
FileSystemException

toFileObject

public FileObject toFileObject(java.io.File file)
                        throws FileSystemException
Returns a FileObject for a local file.

Specified by:
toFileObject in interface VfsComponentContext
Throws:
FileSystemException

getReplicator

public FileReplicator getReplicator()
                             throws FileSystemException
Locates a file replicator for the provider to use.

Specified by:
getReplicator in interface VfsComponentContext
Throws:
FileSystemException

getTemporaryFileStore

public TemporaryFileStore getTemporaryFileStore()
                                         throws FileSystemException
Locates a temporary file store for the provider to use.

Specified by:
getTemporaryFileStore in interface VfsComponentContext
Throws:
FileSystemException

getFileSystemManager

public FileSystemManager getFileSystemManager()
Returns the filesystem manager for the current context

Specified by:
getFileSystemManager in interface VfsComponentContext
Returns:
the filesystem manager