Package org.apache.commons.vfs2.impl
Class DefaultVfsComponentContext
java.lang.Object
org.apache.commons.vfs2.impl.DefaultVfsComponentContext
- All Implemented Interfaces:
VfsComponentContext
The default context implementation.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the file system manager for the current contextLocates a file replicator for the provider to use.Locates a temporary file store for the provider to use.Parses a URI into a FileName.resolveFile
(String name, FileSystemOptions fileSystemOptions) Locate a file by name.resolveFile
(FileObject baseFile, String name, FileSystemOptions fileSystemOptions) Locate a file by name.toFileObject
(File file) Returns aFileObject
for a local file.
-
Field Details
-
manager
-
-
Constructor Details
-
DefaultVfsComponentContext
-
-
Method Details
-
resolveFile
public FileObject resolveFile(FileObject baseFile, String name, FileSystemOptions fileSystemOptions) throws FileSystemException Locate a file by name.- Specified by:
resolveFile
in interfaceVfsComponentContext
- 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
public FileObject resolveFile(String name, FileSystemOptions fileSystemOptions) throws FileSystemException Locate a file by name.- Specified by:
resolveFile
in interfaceVfsComponentContext
- 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
Description copied from interface:VfsComponentContext
Parses a URI into a FileName.- Specified by:
parseURI
in interfaceVfsComponentContext
- Parameters:
uri
- The URI String.- Returns:
- The FileName.
- Throws:
FileSystemException
- if an error occurs.
-
toFileObject
Returns aFileObject
for a local file.- Specified by:
toFileObject
in interfaceVfsComponentContext
- Parameters:
file
- The File to convert to a FileObject.- Returns:
- the FileObject.
- Throws:
FileSystemException
- if an error occurs.
-
getReplicator
Locates a file replicator for the provider to use.- Specified by:
getReplicator
in interfaceVfsComponentContext
- Returns:
- The FileReplicator.
- Throws:
FileSystemException
- if an error occurs.
-
getTemporaryFileStore
Locates a temporary file store for the provider to use.- Specified by:
getTemporaryFileStore
in interfaceVfsComponentContext
- Returns:
- The TemporaryFileStore.
- Throws:
FileSystemException
- if an error occurs.
-
getFileSystemManager
Returns the file system manager for the current context- Specified by:
getFileSystemManager
in interfaceVfsComponentContext
- Returns:
- the file system manager
-