comparison src/org/tmatesoft/hg/core/HgManifestHandler.java @ 427:31a89587eb04

FIXMEs: consistent names, throws for commands and their handlers. Use of checked exceptions in hi-level api
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 29 Mar 2012 17:14:35 +0200
parents
children 6526d8adbc0f
comparison
equal deleted inserted replaced
426:063b0663495a 427:31a89587eb04
1 /*
2 * Copyright (c) 2011-2012 TMate Software Ltd
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 2 of the License.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * For information on how to redistribute this software under
14 * the terms of a license other than GNU General Public License
15 * contact TMate Software at support@hg4j.com
16 */
17 package org.tmatesoft.hg.core;
18
19 import org.tmatesoft.hg.internal.Callback;
20 import org.tmatesoft.hg.util.Path;
21
22 /**
23 * Callback to walk file/directory tree of a revision
24 *
25 * @author Artem Tikhomirov
26 * @author TMate Software Ltd.
27 */
28 @Callback
29 public interface HgManifestHandler {
30 /**
31 * Indicates start of manifest revision. Subsequent {@link #file(HgFileRevision)} and {@link #dir(Path)} come
32 * from the specified manifest revision until {@link #end(Nodeid)} with the matching revision is invoked.
33 *
34 * @param manifestRevision unique identifier of the manifest revision
35 * @throws HgCallbackTargetException wrapper for any exception user code may produce
36 */
37 void begin(Nodeid manifestRevision) throws HgCallbackTargetException;
38
39 /**
40 * If walker is configured to spit out directories, indicates files from specified directories are about to be reported.
41 * Comes prior to any files from this directory and subdirectories
42 *
43 * @param path directory known in the manifest
44 * @throws HgCallbackTargetException wrapper for any exception user code may produce
45 */
46 void dir(Path path) throws HgCallbackTargetException;
47
48 /**
49 * Reports a file revision entry in the manifest
50 *
51 * @param fileRevision description of the file revision
52 * @throws HgCallbackTargetException wrapper for any exception user code may produce
53 */
54 void file(HgFileRevision fileRevision) throws HgCallbackTargetException;
55
56 /**
57 * Indicates all files from the manifest revision have been reported.
58 * Closes {@link #begin(Nodeid)} with the same revision that came before.
59 *
60 * @param manifestRevision unique identifier of the manifest revision
61 * @throws HgCallbackTargetException wrapper for any exception user code may produce
62 */
63 void end(Nodeid manifestRevision) throws HgCallbackTargetException;
64 }