lumis.portal.webfilereplication
Class FTPFileReplicator

Package class diagram package FTPFileReplicator
java.lang.Object
  extended by lumis.portal.webfilereplication.AbstractFileReplicator
      extended by lumis.portal.webfilereplication.FTPFileReplicator
All Implemented Interfaces:
IFileReplicator

public class FTPFileReplicator
extends AbstractFileReplicator

File replication that interacts with a target repository using FTP.

Since:
6.0.0

Constructor Summary
FTPFileReplicator()
          Default constructor.
 
Method Summary
 void delete(PortalFile file)
          Removes a file or directory from the replication destination.
 void dispose()
          Allows the replicator to complete pending operation and free any used resources.
 void initialize()
          Initializes this file replicator.
 void write(PortalFile file)
          Writes a file or directory on the replication destination.
 
Methods inherited from class lumis.portal.webfilereplication.AbstractFileReplicator
getWebFileReplication, setWebFileReplication
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FTPFileReplicator

public FTPFileReplicator()
Default constructor.

Since:
6.0.0
Method Detail

initialize

public void initialize()
                throws FileReplicationException
Description copied from interface: IFileReplicator
Initializes this file replicator.

Specified by:
initialize in interface IFileReplicator
Overrides:
initialize in class AbstractFileReplicator
Throws:
FileReplicationException - if a problem prevents the file replication to be done.

dispose

public void dispose()
             throws FileReplicationException
Description copied from interface: IFileReplicator
Allows the replicator to complete pending operation and free any used resources.

After this method is called, the replicator will not be used anymore, unless it is reinitialized.

Specified by:
dispose in interface IFileReplicator
Overrides:
dispose in class AbstractFileReplicator
Throws:
FileReplicationException - if a problem prevents pending file replications to be done. Even if this exception is thrown, the replicator must free any allocated resource.

write

public void write(PortalFile 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(PortalFile 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 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.


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.