Clover Coverage Report
Coverage timestamp: Fri May 24 2013 13:47:27 UTC
0   134   0   -
0   22   -   0
0     -  
1    
 
  InternalServiceCall       Line # 29 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.module;
17   
18    import org.qedeq.base.io.Parameters;
19    import org.qedeq.kernel.bo.common.ServiceCall;
20    import org.qedeq.kernel.bo.common.ServiceResult;
21    import org.qedeq.kernel.se.common.ServiceCompleteness;
22   
23   
24    /**
25    * Information for a service call. Occurs during execution of a {@link ServiceProcess}.
26    *
27    * @author Michael Meyling
28    */
 
29    public interface InternalServiceCall extends ServiceCall {
30   
31    /**
32    * Get QEDEQ module we work on.
33    *
34    * @return QEDEQ module.
35    */
36    public KernelQedeqBo getKernelQedeq();
37   
38    /**
39    * Get global config parameters for service call.
40    *
41    * @return Service parameter.
42    */
43    public Parameters getConfigParameters();
44   
45    /**
46    * Get call specific parameters for service call.
47    *
48    * @return Service parameter.
49    */
50    public Parameters getParameters();
51   
52    /**
53    * Set percentage of currently running plugin execution.
54    *
55    * @param percentage Number between 0 and 100.
56    */
57    public void setExecutionPercentage(double percentage);
58   
59    /**
60    * Set someone who answers completeness questions.
61    *
62    * @param completeness An answer for completeness questions. Might be <code>null</code>.
63    */
64    public void setServiceCompleteness(ServiceCompleteness completeness);
65   
66    /**
67    * Set description of currently taken action.
68    *
69    * @param action We are doing this currently.
70    */
71    public void setAction(String action);
72   
73    /**
74    * Return service process the call was initiated.
75    *
76    * @return Service process for this call.
77    */
78    public InternalServiceProcess getInternalServiceProcess();
79   
80    /**
81    * Signal an execution pause.
82    */
83    public void pause();
84   
85    /**
86    * Signal execution resume.
87    */
88    public void resume();
89   
90    /**
91    * Set generic success result for call and stop.
92    * Can only be done if call is still running.
93    */
94    public void finish();
95   
96    /**
97    * Set generic failure result for call and stop.
98    * Can only be done if call is still running.
99    *
100    * @param errorMessage Reason for finishing with error.
101    */
102    public void finish(final String errorMessage);
103   
104    /**
105    * Set result state for call and stop.
106    * Can only be done if call is still running.
107    *
108    * @param result Service result.
109    */
110    public void finish(ServiceResult result);
111   
112    /**
113    * Set result state for call and stop.
114    * Can only be done if call is still running.
115    *
116    * @param result Must include reason for halting.
117    */
118    public void halt(ServiceResult result);
119   
120    /**
121    * Set generic failure result for call and stop.
122    * Can only be done if call is still running.
123    *
124    * @param errorMessage Reason for halting.
125    */
126    public void halt(final String errorMessage);
127   
128    /**
129    * Set failure state for call and stop.
130    * Can only be done if call is still running.
131    */
132    public void interrupt();
133   
134    }