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.io;
13:
14: import org.tmatesoft.svn.core.SVNErrorMessage;
15: import org.tmatesoft.svn.core.SVNException;
16: import org.tmatesoft.svn.core.SVNLock;
17:
18: /**
19: * The <b>ISVNLockHandler</b> interface is used to provide some extra
20: * processing of locked/unlocked paths.
21: *
22: * @version 1.1.1
23: * @author TMate Software Ltd.
24: * @see SVNRepository#lock(Map, String, boolean, ISVNLockHandler)
25: * @see SVNRepository#unlock(Map, boolean, ISVNLockHandler)
26: */
27: public interface ISVNLockHandler {
28: /**
29: * Handles the path locked.
30: *
31: * @param path a file path relative to the repository
32: * root directory
33: * @param lock the lock set on this <code>path</code>
34: * @param error if not <span class="javakeyword">null</code> then
35: * it's an error message object for an error occurred
36: * while trying to lock an entry, in this case
37: * <code>lock</code> may be <span class="javakeyword">null</code>
38: * @throws SVNException
39: */
40: public void handleLock(String path, SVNLock lock,
41: SVNErrorMessage error) throws SVNException;
42:
43: /**
44: * Handles the path unlocked.
45: *
46: * @param path a file path relative to the repository
47: * root directory
48: * @param lock the lock released from this <code>path</code>
49: * @param error if not <span class="javakeyword">null</code> then
50: * it's an exception occurred while trying to unlock
51: * the <code>path</code>, in this case <code>lock</code>
52: * may be <span class="javakeyword">null</code>
53: * @throws SVNException
54: */
55: public void handleUnlock(String path, SVNLock lock,
56: SVNErrorMessage error) throws SVNException;
57: }
|