|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ServiceResult | Line # 25 | 0 | 0 | - |
-1.0
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
No Tests | |||
1 | /* This file is part of the project "Hilbert II" - http://www.qedeq.org | |
2 | * | |
3 | * Copyright 2000-2013, Michael Meyling <mime@qedeq.org>. | |
4 | * | |
5 | * "Hilbert II" is free software; you can redistribute | |
6 | * it and/or modify it under the terms of the GNU General Public | |
7 | * License as published by the Free Software Foundation; either | |
8 | * version 2 of the License, or (at your option) any later version. | |
9 | * | |
10 | * This program is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | * GNU General Public License for more details. | |
14 | */ | |
15 | ||
16 | package org.qedeq.kernel.bo.common; | |
17 | ||
18 | ||
19 | ||
20 | /** | |
21 | * Execution result of a {@link ServiceCall}. | |
22 | * | |
23 | * @author Michael Meyling | |
24 | */ | |
25 | public interface ServiceResult { | |
26 | ||
27 | /** | |
28 | * Was the call interrupted by user interaction? | |
29 | * | |
30 | * @return Call was interrupted by a user. | |
31 | */ | |
32 | public boolean wasInterrupted(); | |
33 | ||
34 | /** | |
35 | * Did the call finish without errors and warnings? (And was not interrupted by a user.) | |
36 | * | |
37 | * @return Call finished successfully. | |
38 | */ | |
39 | public boolean isOk(); | |
40 | ||
41 | /** | |
42 | * Did the service call finish with warnings? | |
43 | * | |
44 | * @return Occurred warnings? | |
45 | */ | |
46 | public boolean hasWarnings(); | |
47 | ||
48 | /** | |
49 | * Did the service call finish with errors? | |
50 | * | |
51 | * @return Occurred errors? | |
52 | */ | |
53 | public boolean hasErrors(); | |
54 | ||
55 | /** | |
56 | * Error (and perhaps warning) messages for service call. Never <code>null</code>. | |
57 | * Should be of zero length if call {@link #isOk()}. | |
58 | * | |
59 | * @return Error messages. | |
60 | */ | |
61 | public String getErrorMessage(); | |
62 | ||
63 | /** | |
64 | * Result of service execution. | |
65 | * | |
66 | * @return Result. Might be <code>null</code>. | |
67 | */ | |
68 | public Object getExecutionResult(); | |
69 | ||
70 | } |
|