mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Ability to cancel replication actions (replication 94)
Cance ability, which feeds down into the transfer service, and feeds it back up to the action tracking service. Also, refactor of the replication service unit tests to do the transactions itself, which is needed to reliably test async actions git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21387 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -70,6 +70,7 @@ import org.alfresco.service.cmr.repository.StoreRef;
|
||||
import org.alfresco.service.cmr.search.ResultSet;
|
||||
import org.alfresco.service.cmr.search.SearchService;
|
||||
import org.alfresco.service.cmr.transfer.TransferCallback;
|
||||
import org.alfresco.service.cmr.transfer.TransferCancelledException;
|
||||
import org.alfresco.service.cmr.transfer.TransferDefinition;
|
||||
import org.alfresco.service.cmr.transfer.TransferEvent;
|
||||
import org.alfresco.service.cmr.transfer.TransferException;
|
||||
@@ -94,7 +95,6 @@ public class TransferServiceImpl implements TransferService
|
||||
private static final String MSG_NO_TARGET = "transfer_service.unable_to_find_transfer_target";
|
||||
private static final String MSG_ERR_TRANSFER_ASYNC = "transfer_service.unable_to_transfer_async";
|
||||
private static final String MSG_TARGET_EXISTS = "transfer_service.target_exists";
|
||||
private static final String MSG_CANCELLED = "transfer_service.cancelled";
|
||||
private static final String MSG_NO_NODES = "transfer_service.no_nodes";
|
||||
|
||||
/**
|
||||
@@ -908,7 +908,7 @@ public class TransferServiceImpl implements TransferService
|
||||
{
|
||||
if(status.cancelMe)
|
||||
{
|
||||
throw new TransferException(MSG_CANCELLED);
|
||||
throw new TransferCancelledException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user