|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.vfs.impl.PrivilegedFileReplicator
public class PrivilegedFileReplicator
A file replicator that wraps another file replicator, performing the replication as a privileged action.
Nested Class Summary | |
---|---|
private class |
PrivilegedFileReplicator.CloseAction
An action that closes the wrapped replicator. |
private class |
PrivilegedFileReplicator.InitAction
An action that initialises the wrapped replicator. |
private class |
PrivilegedFileReplicator.ReplicateAction
An action that replicates a file using the wrapped replicator. |
Field Summary | |
---|---|
private FileReplicator |
replicator
|
private VfsComponent |
replicatorComponent
|
Constructor Summary | |
---|---|
PrivilegedFileReplicator(FileReplicator replicator)
|
Method Summary | |
---|---|
void |
close()
Closes the replicator. |
void |
init()
Initialises the component. |
java.io.File |
replicateFile(FileObject srcFile,
FileSelector selector)
Creates a local copy of the file, and all its descendents. |
void |
setContext(VfsComponentContext context)
Sets the context for the replicator. |
void |
setLogger(org.apache.commons.logging.Log logger)
Sets the Logger to use for the component. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final FileReplicator replicator
private final VfsComponent replicatorComponent
Constructor Detail |
---|
public PrivilegedFileReplicator(FileReplicator replicator)
Method Detail |
---|
public void setLogger(org.apache.commons.logging.Log logger)
setLogger
in interface VfsComponent
public void setContext(VfsComponentContext context)
setContext
in interface VfsComponent
context
- The context.public void init() throws FileSystemException
init
in interface VfsComponent
FileSystemException
public void close()
close
in interface VfsComponent
public java.io.File replicateFile(FileObject srcFile, FileSelector selector) throws FileSystemException
replicateFile
in interface FileReplicator
srcFile
- The file to copy.selector
- Selects the files to copy.
FileSystemException
- If the source files does not exist, or on error copying.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |