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 org.tmatesoft.svn.core.SVNException;
15:
16: /**
17: * This is a default implementation for <b>ISVNCommitHandler</b>.
18: *
19: * <p>
20: * Since methods of those <b>SVN</b>*<b>Client</b>
21: * classes that can initiate a commit operation use <b>ISVNCommitHandler</b>
22: * to process user's commit log messages there should be a default implementation. If no
23: * special implementation of <b>ISVNCommitHandler</b> is provided into those
24: * classes then <b>DefaultSVNCommitHandler</b> is the one that is used by default.
25: *
26: * @version 1.1.1
27: * @author TMate Software Ltd.
28: * @see ISVNCommitHandler
29: */
30: public class DefaultSVNCommitHandler implements ISVNCommitHandler {
31: /**
32: * Returns the <code>message</code> itself without any modifications to it
33: * or <code>""</code> if the <code>message</code> is <span class="javakeyword">null</span>.
34: *
35: * <p>
36: * In other words this method does nothing except of replacing <span class="javakeyword">null</span>
37: * for <code>""</code>.
38: *
39: * @param message a user's initial commit log message
40: * @param commitables an array of <b>SVNCommitItem</b> objects
41: * that represent Working Copy items which have local modifications
42: * and so need to be committed to the repository
43: * @return the user's initial commit log message or <code>""</code>
44: * if the message is <span class="javakeyword">null</span>
45: * @throws SVNException
46: */
47: public String getCommitMessage(String message,
48: SVNCommitItem[] commitables) throws SVNException {
49: return message == null ? "" : message;
50: }
51:
52: }
|