Package org.apache.commons.vfs.impl
Class PrivilegedFileReplicator
java.lang.Object
org.apache.commons.vfs.impl.PrivilegedFileReplicator
- All Implemented Interfaces:
FileReplicator,VfsComponent
A file replicator that wraps another file replicator, performing
the replication as a privileged action.
- Version:
- $Revision: 480428 $ $Date: 2006-11-29 07:15:24 +0100 (Wed, 29 Nov 2006) $
- Author:
- Adam Murdoch
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the replicator.voidinit()Initialises the component.replicateFile(FileObject srcFile, FileSelector selector) Creates a local copy of the file, and all its descendents.voidsetContext(VfsComponentContext context) Sets the context for the replicator.voidsetLogger(org.apache.commons.logging.Log logger) Sets the Logger to use for the component.
-
Constructor Details
-
PrivilegedFileReplicator
-
-
Method Details
-
setLogger
public void setLogger(org.apache.commons.logging.Log logger) Sets the Logger to use for the component.- Specified by:
setLoggerin interfaceVfsComponent- Parameters:
logger-
-
setContext
Sets the context for the replicator.- Specified by:
setContextin interfaceVfsComponent- Parameters:
context- The context.
-
init
Initialises the component.- Specified by:
initin interfaceVfsComponent- Throws:
FileSystemException
-
close
public void close()Closes the replicator.- Specified by:
closein interfaceVfsComponent
-
replicateFile
Creates a local copy of the file, and all its descendents.- Specified by:
replicateFilein interfaceFileReplicator- Parameters:
srcFile- The file to copy.selector- Selects the files to copy.- Returns:
- The local copy of the source file.
- Throws:
FileSystemException- If the source files does not exist, or on error copying.
-