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.wc;
13:
14: import java.io.File;
15:
16: /**
17: * The <b>ISVNCommitParameters</b> is the interface for parameters
18: * which set behaviour for a commit operation that touches
19: * still versioned files or dirs that are somehow missing.
20: *
21: * <p>
22: * To bring your commit parameters into usage, simply pass them to
23: * a committer object, for example, to
24: * {@link SVNCommitClient#setCommitParameters(ISVNCommitParameters) SVNCommitClient}.
25: *
26: * @version 1.1.1
27: * @author TMate Software Ltd.
28: * @see DefaultSVNCommitParameters
29: */
30: public interface ISVNCommitParameters {
31: /**
32: * A constant that defines a file/dir missing situation as an
33: * error, commit should fail.
34: */
35: public static final Action ERROR = new Action();
36: /**
37: * A constant that instructs a commit operation to skip a
38: * missing item. So, the item is not committed.
39: */
40: public static final Action SKIP = new Action();
41: /**
42: * A constant that instructs a commit operation to force
43: * a deletion of a missing item. Although the item may be not
44: * scheduled for deletion (only missing in filesystem) it will
45: * be deleted from version control.
46: */
47: public static final Action DELETE = new Action();
48:
49: /**
50: * Returns the action a commit operation should undertake
51: * if there's a missing file under commit scope that is not however
52: * scheduled for deletion.
53: *
54: * @param file a missing file
55: * @return an action that must be one of
56: * the constants defined in the interface
57: */
58: public Action onMissingFile(File file);
59:
60: /**
61: * Returns the action a commit operation should undertake
62: * if there's a missing directory under commit scope that is not
63: * however scheduled for deletion.
64: *
65: * @param file a missing directory
66: * @return an action that must be one of
67: * the constants defined in the interface
68: */
69: public Action onMissingDirectory(File file);
70:
71: /**
72: * @return true if directory should be deleted after commit.
73: */
74: public boolean onDirectoryDeletion(File directory);
75:
76: /**
77: * @return true if file should be deleted after commit.
78: */
79: public boolean onFileDeletion(File file);
80:
81: /**
82: * This class is simply used to define an action a commit
83: * operation should undertake in case of a missing file/directory.
84: *
85: * @version 1.1
86: * @author TMate Software Ltd.
87: */
88: public static class Action {
89: private Action() {
90: }
91: }
92: }
|