| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 20 |
|
package org.xwiki.component.wiki.internal; |
| 21 |
|
|
| 22 |
|
import java.lang.reflect.Type; |
| 23 |
|
import java.util.ArrayList; |
| 24 |
|
import java.util.HashMap; |
| 25 |
|
import java.util.List; |
| 26 |
|
import java.util.Map; |
| 27 |
|
|
| 28 |
|
import org.xwiki.component.descriptor.ComponentDescriptor; |
| 29 |
|
import org.xwiki.component.wiki.WikiComponent; |
| 30 |
|
import org.xwiki.component.wiki.WikiComponentScope; |
| 31 |
|
import org.xwiki.model.reference.DocumentReference; |
| 32 |
|
import org.xwiki.rendering.block.XDOM; |
| 33 |
|
import org.xwiki.rendering.syntax.Syntax; |
| 34 |
|
|
| 35 |
|
|
| 36 |
|
|
| 37 |
|
|
| 38 |
|
@version |
| 39 |
|
@since |
| 40 |
|
|
| |
|
| 56.2% |
Uncovered Elements: 14 (32) |
Complexity: 14 |
Complexity Density: 0.78 |
|
| 41 |
|
public class DefaultWikiComponent implements WikiComponent |
| 42 |
|
{ |
| 43 |
|
|
| 44 |
|
@see@link |
| 45 |
|
|
| 46 |
|
private DocumentReference documentReference; |
| 47 |
|
|
| 48 |
|
|
| 49 |
|
@see@link |
| 50 |
|
|
| 51 |
|
private DocumentReference authorReference; |
| 52 |
|
|
| 53 |
|
|
| 54 |
|
@see@link |
| 55 |
|
|
| 56 |
|
private Map<String, XDOM> handledMethods = new HashMap<String, XDOM>(); |
| 57 |
|
|
| 58 |
|
|
| 59 |
|
@see@link |
| 60 |
|
|
| 61 |
|
private Type roleType; |
| 62 |
|
|
| 63 |
|
|
| 64 |
|
@see@link |
| 65 |
|
|
| 66 |
|
private String roleHint; |
| 67 |
|
|
| 68 |
|
|
| 69 |
|
@see@link |
| 70 |
|
|
| 71 |
|
private WikiComponentScope scope; |
| 72 |
|
|
| 73 |
|
|
| 74 |
|
@see@link |
| 75 |
|
|
| 76 |
|
private List<Class< ? >> implementedInterfaces = new ArrayList<Class< ? >>(); |
| 77 |
|
|
| 78 |
|
|
| 79 |
|
@see@link |
| 80 |
|
|
| 81 |
|
private Map<String, ComponentDescriptor> dependencies = new HashMap<String, ComponentDescriptor>(); |
| 82 |
|
|
| 83 |
|
|
| 84 |
|
@see@link |
| 85 |
|
|
| 86 |
|
private Syntax syntax; |
| 87 |
|
|
| 88 |
|
|
| 89 |
|
|
| 90 |
|
|
| 91 |
|
@param |
| 92 |
|
@param |
| 93 |
|
@param |
| 94 |
|
@param |
| 95 |
|
@param |
| 96 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
| 97 |
5 |
public DefaultWikiComponent(DocumentReference documentReference, DocumentReference authorReference,... |
| 98 |
|
Type roleType, String roleHint, WikiComponentScope scope) |
| 99 |
|
{ |
| 100 |
5 |
this.documentReference = documentReference; |
| 101 |
5 |
this.authorReference = authorReference; |
| 102 |
5 |
this.roleType = roleType; |
| 103 |
5 |
this.roleHint = roleHint; |
| 104 |
5 |
this.scope = scope; |
| 105 |
|
} |
| 106 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 107 |
0 |
@Override... |
| 108 |
|
public DocumentReference getDocumentReference() |
| 109 |
|
{ |
| 110 |
0 |
return this.documentReference; |
| 111 |
|
} |
| 112 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 113 |
0 |
@Override... |
| 114 |
|
public DocumentReference getAuthorReference() |
| 115 |
|
{ |
| 116 |
0 |
return this.authorReference; |
| 117 |
|
} |
| 118 |
|
|
| 119 |
|
|
| 120 |
|
|
| 121 |
|
|
| 122 |
|
@link |
| 123 |
|
|
| 124 |
|
@return |
| 125 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 126 |
0 |
public Map<String, XDOM> getHandledMethods()... |
| 127 |
|
{ |
| 128 |
0 |
return this.handledMethods; |
| 129 |
|
} |
| 130 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 131 |
1 |
@Override... |
| 132 |
|
public Type getRoleType() |
| 133 |
|
{ |
| 134 |
1 |
return this.roleType; |
| 135 |
|
} |
| 136 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 137 |
0 |
@Override... |
| 138 |
|
public String getRoleHint() |
| 139 |
|
{ |
| 140 |
0 |
return this.roleHint; |
| 141 |
|
} |
| 142 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 143 |
0 |
@Override... |
| 144 |
|
public WikiComponentScope getScope() |
| 145 |
|
{ |
| 146 |
0 |
return this.scope; |
| 147 |
|
} |
| 148 |
|
|
| 149 |
|
|
| 150 |
|
|
| 151 |
|
@link |
| 152 |
|
@link |
| 153 |
|
|
| 154 |
|
@return |
| 155 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 156 |
1 |
public List<Class< ? >> getImplementedInterfaces()... |
| 157 |
|
{ |
| 158 |
1 |
return this.implementedInterfaces; |
| 159 |
|
} |
| 160 |
|
|
| 161 |
|
|
| 162 |
|
@link |
| 163 |
|
|
| 164 |
|
|
| 165 |
|
|
| 166 |
|
@return |
| 167 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 168 |
0 |
public Map<String, ComponentDescriptor> getDependencies()... |
| 169 |
|
{ |
| 170 |
0 |
return this.dependencies; |
| 171 |
|
} |
| 172 |
|
|
| 173 |
|
|
| 174 |
|
@return |
| 175 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 176 |
0 |
public Syntax getSyntax()... |
| 177 |
|
{ |
| 178 |
0 |
return syntax; |
| 179 |
|
} |
| 180 |
|
|
| 181 |
|
|
| 182 |
|
|
| 183 |
|
|
| 184 |
|
@see@link |
| 185 |
|
|
| 186 |
|
@param |
| 187 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 188 |
1 |
public void setHandledMethods(Map<String, XDOM> methods)... |
| 189 |
|
{ |
| 190 |
1 |
this.handledMethods = methods; |
| 191 |
|
} |
| 192 |
|
|
| 193 |
|
|
| 194 |
|
|
| 195 |
|
|
| 196 |
|
@see@link |
| 197 |
|
|
| 198 |
|
@param |
| 199 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 200 |
1 |
public void setImplementedInterfaces(List<Class< ? >> interfaces)... |
| 201 |
|
{ |
| 202 |
1 |
this.implementedInterfaces = interfaces; |
| 203 |
|
} |
| 204 |
|
|
| 205 |
|
|
| 206 |
|
|
| 207 |
|
|
| 208 |
|
@param |
| 209 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 210 |
1 |
public void setDependencies(Map<String, ComponentDescriptor> dependencies)... |
| 211 |
|
{ |
| 212 |
1 |
this.dependencies = dependencies; |
| 213 |
|
} |
| 214 |
|
|
| 215 |
|
|
| 216 |
|
|
| 217 |
|
|
| 218 |
|
@param |
| 219 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 220 |
1 |
public void setSyntax(Syntax syntax)... |
| 221 |
|
{ |
| 222 |
1 |
this.syntax = syntax; |
| 223 |
|
} |
| 224 |
|
} |