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.ArrayList; |
23 |
|
import java.util.Collection; |
24 |
|
import java.util.Collections; |
25 |
|
|
26 |
|
import org.xwiki.extension.job.plan.ExtensionPlanAction; |
27 |
|
import org.xwiki.extension.job.plan.ExtensionPlanNode; |
28 |
|
import org.xwiki.extension.version.VersionConstraint; |
29 |
|
import org.xwiki.script.internal.safe.AbstractSafeObject; |
30 |
|
import org.xwiki.script.internal.safe.ScriptSafeProvider; |
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
@version |
36 |
|
@since |
37 |
|
|
|
|
| 0% |
Uncovered Elements: 19 (19) |
Complexity: 6 |
Complexity Density: 0.55 |
|
38 |
|
public class SafeExtensionPlanNode extends AbstractSafeObject<ExtensionPlanNode> implements ExtensionPlanNode |
39 |
|
{ |
40 |
|
|
41 |
|
@see |
42 |
|
|
43 |
|
private Collection<ExtensionPlanNode> wrappedChildren; |
44 |
|
|
45 |
|
|
46 |
|
@param |
47 |
|
@param |
48 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
49 |
0 |
public SafeExtensionPlanNode(ExtensionPlanNode node, ScriptSafeProvider< ? > safeProvider)... |
50 |
|
{ |
51 |
0 |
super(node, safeProvider); |
52 |
|
} |
53 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
54 |
0 |
@Override... |
55 |
|
public ExtensionPlanAction getAction() |
56 |
|
{ |
57 |
0 |
return new SafeExtensionPlanAction(getWrapped().getAction(), this.safeProvider); |
58 |
|
} |
59 |
|
|
|
|
| 0% |
Uncovered Elements: 12 (12) |
Complexity: 3 |
Complexity Density: 0.38 |
|
60 |
0 |
@Override... |
61 |
|
public Collection<ExtensionPlanNode> getChildren() |
62 |
|
{ |
63 |
0 |
if (this.wrappedChildren == null) { |
64 |
0 |
Collection<ExtensionPlanNode> nodes = getWrapped().getChildren(); |
65 |
0 |
if (nodes.isEmpty()) { |
66 |
0 |
this.wrappedChildren = Collections.emptyList(); |
67 |
|
} else { |
68 |
0 |
this.wrappedChildren = new ArrayList<ExtensionPlanNode>(nodes.size()); |
69 |
0 |
for (ExtensionPlanNode node : nodes) { |
70 |
0 |
this.wrappedChildren.add(new SafeExtensionPlanNode(node, this.safeProvider)); |
71 |
|
} |
72 |
|
} |
73 |
|
} |
74 |
|
|
75 |
0 |
return this.wrappedChildren; |
76 |
|
} |
77 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
78 |
0 |
@Override... |
79 |
|
public VersionConstraint getInitialVersionConstraint() |
80 |
|
{ |
81 |
0 |
return getWrapped().getInitialVersionConstraint(); |
82 |
|
} |
83 |
|
} |