Class LocalFileReplicator
- java.lang.Object
-
- lumis.portal.webfilereplication.AbstractFileReplicator
-
- lumis.portal.webfilereplication.LocalFileReplicator
-
- All Implemented Interfaces:
IFileReplicator
public class LocalFileReplicator extends AbstractFileReplicator
File replicator that interacts with a target repository in the local file system.- Since:
- 6.0.0
- Version:
- $Revision: 20784 $ $Date: 2017-11-24 13:25:15 -0200 (Fri, 24 Nov 2017) $
-
-
Constructor Summary
Constructors Constructor Description LocalFileReplicator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete(IFile file)
Removes a file or directory from the replication destination.void
initialize()
Initializes this file replicator.void
write(IFile file)
Writes a file or directory on the replication destination.-
Methods inherited from class lumis.portal.webfilereplication.AbstractFileReplicator
dispose, getWebFileReplication, setWebFileReplication
-
-
-
-
Method Detail
-
initialize
public void initialize() throws FileReplicationException
Description copied from interface:IFileReplicator
Initializes this file replicator.- Specified by:
initialize
in interfaceIFileReplicator
- Overrides:
initialize
in classAbstractFileReplicator
- Throws:
FileReplicationException
- if a problem prevents the file replication to be done.
-
write
public void write(IFile file) throws FileReplicationException
Description copied from interface:IFileReplicator
Writes a file or directory on the replication destination.If the given file
is a directory
, this operation must create the corresponding directory in the destination if it does not already exist.If the given file
is a normal file
, this operation must create the corresponding file in the destination, with the same contents, overwriting the file if it already exists.This operation must create any non-existant parent directories necessary for creating the corresponding directory/file in the destination.
This write operation need not to be completed when this method returns, but it must be completed before the next call to
IFileReplicator.dispose()
returns.- Parameters:
file
- the corresponding file in the portal file system.- Throws:
FileReplicationException
- if a problem prevents the file replication to be done.
-
delete
public void delete(IFile file) throws FileReplicationException
Description copied from interface:IFileReplicator
Removes a file or directory from the replication destination.If the given file is a directory and it is not empty at the destination, this operation should fail throwing FileReplicationException.
If the corresponding file in the destination does not exist, this operation must be a no-op and complete gracefully.
This delete operation does not need to be completed when this method returns, but it must be completed before the next call to
IFileReplicator.dispose()
returns.- Parameters:
file
- the corresponding file in the portal file system.- Throws:
FileReplicationException
- if a problem prevents the file replication to be done.
-
-