01: /*
02: * ====================================================================
03: * Copyright (c) 2004-2008 TMate Software Ltd. All rights reserved.
04: *
05: * This software is licensed as described in the file COPYING, which
06: * you should have received as part of this distribution. The terms
07: * are also available at http://svnkit.com/license.html
08: * If newer versions of this license are posted there, you may use a
09: * newer version instead, at your option.
10: * ====================================================================
11: */
12: package org.tmatesoft.svn.core.replicator;
13:
14: import org.tmatesoft.svn.core.SVNCancelException;
15: import org.tmatesoft.svn.core.SVNCommitInfo;
16: import org.tmatesoft.svn.core.SVNException;
17: import org.tmatesoft.svn.core.SVNLogEntry;
18:
19: /**
20: * The <b>ISVNReplicationHandler</b> is the interface for the handlers
21: * which are registered to a repository replicator to keep track of the
22: * replicating process.
23: *
24: * @version 1.1.1
25: * @author TMate Software Ltd.
26: * @since 1.1.0
27: */
28: public interface ISVNReplicationHandler {
29:
30: /**
31: * Notifies this handler that the replicator is about to start a next
32: * revision copying operation. Log information taken from the source
33: * repository (from where the copy is performed) for that revision
34: * is provided.
35: *
36: * @param source the notifier
37: * @param logEntry log info about revision changes, author, etc.
38: * @throws SVNException
39: */
40: public void revisionReplicating(SVNRepositoryReplicator source,
41: SVNLogEntry logEntry) throws SVNException;
42:
43: /**
44: * Notifies this handler that the replicator has just finished replicating
45: * the current revision copying operation. Commit information of the new revision
46: * committed to the destination repository is provided.
47: *
48: * @param source the notifier
49: * @param commitInfo commit information
50: * @throws SVNException
51: */
52: public void revisionReplicated(SVNRepositoryReplicator source,
53: SVNCommitInfo commitInfo) throws SVNException;
54:
55: /**
56: * Checks if the replicating operation is cancelled. During each
57: * replicating iteration the replicator simply calls this method. A
58: * handler implementation should decide if the operation must be
59: * interrupted or not, and if for some reason it must be stopped (for example,
60: * a user said it must be cancelled), then the implementor should simply
61: * throw an <b>SVNCancelException</b>. That will terminate the operation.
62: * However it won't roll back all the previously iterations committed
63: * to the destination repository.
64: *
65: * @throws SVNCancelException if the replicating operation is cancelled
66: */
67: public void checkCancelled() throws SVNCancelException;
68: }
|