1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.job.script; |
21 |
|
|
22 |
|
import javax.inject.Inject; |
23 |
|
import javax.inject.Named; |
24 |
|
import javax.inject.Singleton; |
25 |
|
|
26 |
|
import org.xwiki.component.annotation.Component; |
27 |
|
import org.xwiki.job.event.status.JobProgressManager; |
28 |
|
import org.xwiki.logging.Message; |
29 |
|
import org.xwiki.script.service.ScriptService; |
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
@version |
35 |
|
@since |
36 |
|
|
37 |
|
@Component |
38 |
|
@Singleton |
39 |
|
@Named("progress") |
|
|
| 57.1% |
Uncovered Elements: 6 (14) |
Complexity: 7 |
Complexity Density: 1 |
|
40 |
|
public class ProgressScripService implements ScriptService |
41 |
|
{ |
42 |
|
@Inject |
43 |
|
private JobProgressManager progress; |
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
48 |
0 |
public void pushLevel()... |
49 |
|
{ |
50 |
0 |
this.progress.pushLevelProgress(this); |
51 |
|
} |
52 |
|
|
53 |
|
|
54 |
|
|
55 |
|
|
56 |
|
@param |
57 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
58 |
11196 |
public void pushLevel(int steps)... |
59 |
|
{ |
60 |
11196 |
this.progress.pushLevelProgress(steps, this); |
61 |
|
} |
62 |
|
|
63 |
|
|
64 |
|
|
65 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
66 |
11196 |
public void popLevel()... |
67 |
|
{ |
68 |
11196 |
this.progress.popLevelProgress(this); |
69 |
|
} |
70 |
|
|
71 |
|
|
72 |
|
|
73 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
74 |
0 |
public void startStep()... |
75 |
|
{ |
76 |
0 |
this.progress.startStep(this); |
77 |
|
} |
78 |
|
|
79 |
|
|
80 |
|
|
81 |
|
|
82 |
|
@param |
83 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
84 |
22736 |
public void startStep(String name)... |
85 |
|
{ |
86 |
22737 |
this.progress.startStep(this, name); |
87 |
|
} |
88 |
|
|
89 |
|
|
90 |
|
|
91 |
|
|
92 |
|
@param |
93 |
|
@param |
94 |
|
@param |
95 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
96 |
0 |
public void startStep(String translationKey, String message, Object... arguments)... |
97 |
|
{ |
98 |
0 |
this.progress.startStep(this, new Message(translationKey, message, arguments)); |
99 |
|
} |
100 |
|
|
101 |
|
|
102 |
|
|
103 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
104 |
22737 |
public void endStep()... |
105 |
|
{ |
106 |
22737 |
this.progress.endStep(this); |
107 |
|
} |
108 |
|
} |