1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.extension.script.internal.safe; |
21 |
|
|
22 |
|
import javax.inject.Inject; |
23 |
|
|
24 |
|
import org.xwiki.context.Execution; |
25 |
|
import org.xwiki.extension.script.ExtensionManagerScriptService; |
26 |
|
import org.xwiki.script.internal.safe.AbstractSafeObject; |
27 |
|
import org.xwiki.script.internal.safe.ScriptSafeProvider; |
28 |
|
|
29 |
|
|
30 |
|
@link |
31 |
|
|
32 |
|
|
33 |
|
@param |
34 |
|
@version |
35 |
|
@since |
36 |
|
|
|
|
| 60% |
Uncovered Elements: 4 (10) |
Complexity: 4 |
Complexity Density: 0.67 |
|
37 |
|
public abstract class AbstractNoExceptionSafeObject<T> extends AbstractSafeObject<T> |
38 |
|
{ |
39 |
|
|
40 |
|
|
41 |
|
|
42 |
|
@since |
43 |
|
|
44 |
|
protected boolean hasProgrammingRight; |
45 |
|
|
46 |
|
|
47 |
|
|
48 |
|
|
49 |
|
@Inject |
50 |
|
private Execution execution; |
51 |
|
|
52 |
|
|
53 |
|
@param |
54 |
|
@param |
55 |
|
@param |
56 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
57 |
0 |
public AbstractNoExceptionSafeObject(T wrapped, ScriptSafeProvider< ? > safeProvider, Execution execution)... |
58 |
|
{ |
59 |
0 |
this(wrapped, safeProvider, execution, false); |
60 |
|
} |
61 |
|
|
62 |
|
|
63 |
|
@param |
64 |
|
@param |
65 |
|
@param |
66 |
|
@param |
67 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
68 |
1620 |
public AbstractNoExceptionSafeObject(T wrapped, ScriptSafeProvider< ? > safeProvider, Execution execution,... |
69 |
|
boolean hasProgrammingRight) |
70 |
|
{ |
71 |
1620 |
super(wrapped, safeProvider); |
72 |
|
|
73 |
1619 |
this.execution = execution; |
74 |
1619 |
this.hasProgrammingRight = hasProgrammingRight; |
75 |
|
} |
76 |
|
|
77 |
|
|
78 |
|
|
79 |
|
|
80 |
|
@return |
81 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
82 |
0 |
public Exception getLastError()... |
83 |
|
{ |
84 |
0 |
return (Exception) this.execution.getContext().getProperty(ExtensionManagerScriptService.EXTENSIONERROR_KEY); |
85 |
|
} |
86 |
|
|
87 |
|
|
88 |
|
@link |
89 |
|
|
90 |
|
@param |
91 |
|
@see |
92 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
93 |
654 |
protected void setError(Exception e)... |
94 |
|
{ |
95 |
654 |
this.execution.getContext().setProperty(ExtensionManagerScriptService.EXTENSIONERROR_KEY, e); |
96 |
|
} |
97 |
|
} |