Files
alfresco-community-repo/source/java/org/alfresco/repo/transfer/TransferTransmitter.java
Raluca Munteanu 86dc6f3402 Merged 5.1.1 (5.1.1) to 5.1.N (5.1.2)
125484 slanglois: MNT-16155 Update source headers - remove old Copyrights from Java and JSP dource files


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.1.N/root@125603 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2016-04-20 10:21:07 +00:00

91 lines
3.1 KiB
Java

package org.alfresco.repo.transfer;
import java.io.File;
import java.io.OutputStream;
import java.util.Set;
import org.alfresco.service.cmr.repository.ContentData;
import org.alfresco.service.cmr.transfer.TransferException;
import org.alfresco.service.cmr.transfer.TransferProgress;
import org.alfresco.service.cmr.transfer.TransferTarget;
import org.alfresco.service.cmr.transfer.TransferVersion;
/**
* @author brian
*
*/
public interface TransferTransmitter
{
/**
* Verify that the target is available
* @param target TransferTarget
* @throws TransferException
*/
void verifyTarget(TransferTarget target) throws TransferException;
/**
* Begin a transfer, the transfer object returned will be used by subsequent
* calls to the transfer service.
*
* @param target definition of where to transfer to.
* @param fromRepositoryId the repositoryID of the sending system
* @param fromVersion the version of the repository sending
* @return the transfer object or null if the target cannot be locked.
* @throws TransferException
*/
Transfer begin(TransferTarget target, String fromRepositoryId, TransferVersion fromVersion) throws TransferException;
/**
* @param manifest the transfer manifest file
* @param transfer the transfer object returned by an earlier call to begin
* @param results - where to write the results, probably a temporary file the output steam should be
* open and will be closed before the method returns.
* @throws TransferException
*/
void sendManifest(Transfer transfer, File manifest, OutputStream results) throws TransferException;
/**
* Send the content of the specified urls
*
* @param transfer the transfer object returned by an earlier call to begin
* @param data the content to send
* @throws TransferException
*/
void sendContent(Transfer transfer, Set<ContentData> data);
/**
*
* @param transfer the transfer object returned by an earlier call to begin
* @throws TransferException
*/
void prepare(Transfer transfer) throws TransferException;
/**
* @param transfer the transfer object returned by an earlier call to begin
* @throws TransferException
*/
void commit(Transfer transfer) throws TransferException;
/**
* Abort the transfer
* @param transfer the transfer object returned by an earlier call to begin
* @throws TransferException
*/
void abort(Transfer transfer) throws TransferException;
/**
* Get the status of an in process transfer
*/
TransferProgress getStatus(Transfer transfer) throws TransferException;
/**
* Get the destination side transfer report from the destination and write it to the specified output stream.
* <p>
* The result stream will be closed.
* @param transfer the transfer object returned by an earlier call to begin
* @param results - where to write the contents of the transfer report.
*/
void getTransferReport(Transfer transfer, OutputStream results);
}