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 java.util.Collection; |
23 |
|
|
24 |
|
import org.xwiki.extension.Extension; |
25 |
|
import org.xwiki.extension.InstalledExtension; |
26 |
|
import org.xwiki.extension.job.plan.ExtensionPlanAction; |
27 |
|
import org.xwiki.script.internal.safe.ScriptSafeProvider; |
28 |
|
import org.xwiki.script.wrap.AbstractWrappingObject; |
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
@version |
34 |
|
@since |
35 |
|
|
|
|
| 0% |
Uncovered Elements: 15 (15) |
Complexity: 7 |
Complexity Density: 0.88 |
|
36 |
|
public class SafeExtensionPlanAction extends AbstractWrappingObject<ExtensionPlanAction> implements ExtensionPlanAction |
37 |
|
{ |
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
private ScriptSafeProvider<Object> safeProvider; |
42 |
|
|
43 |
|
|
44 |
|
@param |
45 |
|
@param |
46 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
47 |
0 |
public SafeExtensionPlanAction(ExtensionPlanAction action, ScriptSafeProvider<Object> safeProvider)... |
48 |
|
{ |
49 |
0 |
super(action); |
50 |
|
|
51 |
0 |
this.safeProvider = safeProvider; |
52 |
|
} |
53 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
54 |
0 |
@Override... |
55 |
|
public Extension getExtension() |
56 |
|
{ |
57 |
0 |
return this.safeProvider.get(getWrapped().getExtension()); |
58 |
|
} |
59 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
60 |
0 |
@Override... |
61 |
|
@Deprecated |
62 |
|
public InstalledExtension getPreviousExtension() |
63 |
|
{ |
64 |
0 |
return this.safeProvider.get(getWrapped().getPreviousExtension()); |
65 |
|
} |
66 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
67 |
0 |
@Override... |
68 |
|
public Collection<InstalledExtension> getPreviousExtensions() |
69 |
|
{ |
70 |
0 |
return this.safeProvider.get(getWrapped().getPreviousExtensions()); |
71 |
|
} |
72 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
73 |
0 |
@Override... |
74 |
|
public Action getAction() |
75 |
|
{ |
76 |
0 |
return getWrapped().getAction(); |
77 |
|
} |
78 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
79 |
0 |
@Override... |
80 |
|
public String getNamespace() |
81 |
|
{ |
82 |
0 |
return getWrapped().getNamespace(); |
83 |
|
} |
84 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
85 |
0 |
@Override... |
86 |
|
public boolean isDependency() |
87 |
|
{ |
88 |
0 |
return getWrapped().isDependency(); |
89 |
|
} |
90 |
|
} |