1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.rendering.macro.include; |
21 |
|
|
22 |
|
import org.xwiki.model.EntityType; |
23 |
|
import org.xwiki.properties.annotation.PropertyDescription; |
24 |
|
|
25 |
|
|
26 |
|
@link |
27 |
|
|
28 |
|
@version |
29 |
|
@since |
30 |
|
|
|
|
| 75% |
Uncovered Elements: 4 (16) |
Complexity: 8 |
Complexity Density: 1 |
|
31 |
|
public class IncludeMacroParameters |
32 |
|
{ |
33 |
|
|
34 |
|
@version |
35 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
36 |
|
public enum Context |
37 |
|
{ |
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
NEW, |
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
CURRENT |
47 |
|
} |
48 |
|
|
49 |
|
|
50 |
|
@see |
51 |
|
|
52 |
|
private String reference; |
53 |
|
|
54 |
|
|
55 |
|
@see |
56 |
|
|
57 |
|
private EntityType type = EntityType.DOCUMENT; |
58 |
|
|
59 |
|
|
60 |
|
|
61 |
|
|
62 |
|
|
63 |
|
private Context context = Context.CURRENT; |
64 |
|
|
65 |
|
|
66 |
|
@see |
67 |
|
|
68 |
|
private String section; |
69 |
|
|
70 |
|
|
71 |
|
@param |
72 |
|
@since |
73 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
74 |
962 |
@PropertyDescription("the reference of the resource to display")... |
75 |
|
public void setReference(String reference) |
76 |
|
{ |
77 |
962 |
this.reference = reference; |
78 |
|
} |
79 |
|
|
80 |
|
|
81 |
|
@return |
82 |
|
@since |
83 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
84 |
1956 |
public String getReference()... |
85 |
|
{ |
86 |
1956 |
return this.reference; |
87 |
|
} |
88 |
|
|
89 |
|
|
90 |
|
@return |
91 |
|
@since |
92 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
93 |
29 |
@PropertyDescription("the type of the reference")... |
94 |
|
public EntityType getType() |
95 |
|
{ |
96 |
29 |
return this.type; |
97 |
|
} |
98 |
|
|
99 |
|
|
100 |
|
@param |
101 |
|
@since |
102 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
103 |
0 |
public void setType(EntityType type)... |
104 |
|
{ |
105 |
0 |
this.type = type; |
106 |
|
} |
107 |
|
|
108 |
|
|
109 |
|
@param |
110 |
|
|
111 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
112 |
4 |
@PropertyDescription("defines whether the included page is executed in its separated execution context"... |
113 |
|
+ " or whether it's executed in the context of the current page") |
114 |
|
public void setContext(Context context) |
115 |
|
{ |
116 |
4 |
this.context = context; |
117 |
|
} |
118 |
|
|
119 |
|
|
120 |
|
@return |
121 |
|
|
122 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
123 |
990 |
public Context getContext()... |
124 |
|
{ |
125 |
990 |
return this.context; |
126 |
|
} |
127 |
|
|
128 |
|
|
129 |
|
@param@link |
130 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
131 |
0 |
@PropertyDescription("an optional id of a section to include in the specified document")... |
132 |
|
public void setSection(String sectionId) |
133 |
|
{ |
134 |
0 |
this.section = sectionId; |
135 |
|
} |
136 |
|
|
137 |
|
|
138 |
|
@return |
139 |
|
|
140 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
141 |
990 |
public String getSection()... |
142 |
|
{ |
143 |
990 |
return this.section; |
144 |
|
} |
145 |
|
} |