org.apache.commons.vfs.provider
Interface VfsComponentContext


public interface VfsComponentContext

Allows VFS components to access the services they need, such as the file replicator. A VFS component is supplied with a context as part of its initialisation.

Version:
$Revision: 804644 $ $Date: 2009-08-16 10:02:15 +0200(dom, 16 ago 2009) $
Author:
Adam Murdoch
See Also:
VfsComponent.setContext(org.apache.commons.vfs.provider.VfsComponentContext)

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(String uri)
          Parse a URI into a FileName.
 FileObject resolveFile(FileObject baseFile, String name, FileSystemOptions fileSystemOptions)
          Locate a file by name.
 FileObject resolveFile(String name, FileSystemOptions fileSystemOptions)
          Locate a file by name.
 FileObject toFileObject(File file)
          Returns a FileObject for a local file.
 

Method Detail

resolveFile

FileObject resolveFile(FileObject baseFile,
                       String name,
                       FileSystemOptions fileSystemOptions)
                       throws FileSystemException
Locate a file by name. See FileSystemManager.resolveFile(FileObject, String) for a description of how this works.

Parameters:
baseFile - The base FileObject.
name - The name of the file to locate.
fileSystemOptions - The FileSystemOptions.
Returns:
The FileObject for the located file.
Throws:
FileSystemException - if an error occurs.

resolveFile

FileObject resolveFile(String name,
                       FileSystemOptions fileSystemOptions)
                       throws FileSystemException
Locate a file by name. See FileSystemManager.resolveFile( String) for a description of how this works.

Parameters:
name - The name of the file to locate.
fileSystemOptions - The FileSystemOptions.
Returns:
The FileObject for the located file.
Throws:
FileSystemException - if an error occurs.

parseURI

FileName parseURI(String uri)
                  throws FileSystemException
Parse a URI into a FileName.

Parameters:
uri - The URI String.
Returns:
The FileName.
Throws:
FileSystemException - if an error occurs.

getReplicator

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

Returns:
The FileReplicator.
Throws:
FileSystemException - if an error occurs.

getTemporaryFileStore

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

Returns:
The TemporaryFileStore.
Throws:
FileSystemException - if an error occurs.

toFileObject

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

Parameters:
file - The File to convert to a FileObject.
Returns:
the FileObject.
Throws:
FileSystemException - if an error occurs.

getFileSystemManager

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

Returns:
the filesystem manager


Copyright © 2002-2011 Apache Software Foundation. All Rights Reserved.