mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-4127 - F86 Provide target log to source repository
implemented with unit test. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21836 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -19,19 +19,75 @@
|
||||
|
||||
package org.alfresco.repo.transfer;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.alfresco.service.cmr.transfer.TransferException;
|
||||
import org.alfresco.service.cmr.transfer.TransferProgress;
|
||||
|
||||
/**
|
||||
* @author brian
|
||||
*
|
||||
*
|
||||
* The transfer progress monitor monitors each transfer
|
||||
* <p>
|
||||
* It contains a status, current position, end position, and a log.
|
||||
* It can also store an exception.
|
||||
*
|
||||
*/
|
||||
public interface TransferProgressMonitor
|
||||
{
|
||||
/**
|
||||
* log a message
|
||||
* @param transferId
|
||||
* @param obj
|
||||
* @throws TransferException
|
||||
*/
|
||||
void log(String transferId, Object obj) throws TransferException;
|
||||
/**
|
||||
* log a message and an exception
|
||||
* @param transferId
|
||||
* @param obj
|
||||
* @param ex
|
||||
* @throws TransferException
|
||||
*/
|
||||
void log(String transferId, Object obj, Throwable ex) throws TransferException;
|
||||
|
||||
/**
|
||||
* update the progress of the specified transfer
|
||||
* @param transferId
|
||||
* @param currPos
|
||||
* @throws TransferException
|
||||
*/
|
||||
void updateProgress(String transferId, int currPos) throws TransferException;
|
||||
|
||||
/**
|
||||
* update the progress of the specified transfer and possibly change the end position.
|
||||
* @param transferId
|
||||
* @param currPos
|
||||
* @param endPos
|
||||
* @throws TransferException
|
||||
*/
|
||||
void updateProgress(String transferId, int currPos, int endPos) throws TransferException;
|
||||
|
||||
/**
|
||||
* update the startus of the transfer
|
||||
* @param transferId
|
||||
* @param status
|
||||
* @throws TransferException
|
||||
*/
|
||||
void updateStatus(String transferId, TransferProgress.Status status) throws TransferException;
|
||||
|
||||
/**
|
||||
* Read the progress of the
|
||||
* @param transferId
|
||||
* @return the progress of the transfer
|
||||
* @throws TransferException
|
||||
*/
|
||||
TransferProgress getProgress(String transferId) throws TransferException;
|
||||
|
||||
/**
|
||||
* After the transfer has completed this method reads the log.
|
||||
* @param transferId
|
||||
* @return the log
|
||||
*/
|
||||
InputStream getLogInputStream(String transferId) throws TransferException;
|
||||
}
|
||||
|
Reference in New Issue
Block a user