1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.filter.descriptor; |
21 |
|
|
22 |
|
import java.util.Collection; |
23 |
|
import java.util.Collections; |
24 |
|
import java.util.LinkedHashMap; |
25 |
|
import java.util.Map; |
26 |
|
|
27 |
|
|
28 |
|
@version |
29 |
|
@since |
30 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (11) |
Complexity: 5 |
Complexity Density: 0.83 |
|
31 |
|
public abstract class AbstractFilterStreamDescriptor implements FilterStreamDescriptor |
32 |
|
{ |
33 |
|
|
34 |
|
@see |
35 |
|
|
36 |
|
protected String name; |
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
protected String description; |
42 |
|
|
43 |
|
|
44 |
|
@link |
45 |
|
|
46 |
|
@link |
47 |
|
@link |
48 |
|
|
49 |
|
protected Map<String, FilterStreamPropertyDescriptor<?>> parameterDescriptorMap = |
50 |
|
new LinkedHashMap<String, FilterStreamPropertyDescriptor<?>>(); |
51 |
|
|
52 |
|
|
53 |
|
@param |
54 |
|
@param |
55 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
56 |
905 |
public AbstractFilterStreamDescriptor(String name, String description)... |
57 |
|
{ |
58 |
905 |
this.name = name; |
59 |
905 |
this.description = description; |
60 |
|
} |
61 |
|
|
62 |
|
|
63 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
64 |
40 |
@Override... |
65 |
|
public String getName() |
66 |
|
{ |
67 |
40 |
return this.name; |
68 |
|
} |
69 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
70 |
16 |
@Override... |
71 |
|
public String getDescription() |
72 |
|
{ |
73 |
16 |
return this.description; |
74 |
|
} |
75 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
76 |
36 |
@Override... |
77 |
|
public <T> FilterStreamPropertyDescriptor<T> getPropertyDescriptor(String propertyName) |
78 |
|
{ |
79 |
36 |
return (FilterStreamPropertyDescriptor<T>) this.parameterDescriptorMap.get(propertyName); |
80 |
|
} |
81 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
82 |
48 |
@Override... |
83 |
|
public Collection<FilterStreamPropertyDescriptor<?>> getProperties() |
84 |
|
{ |
85 |
48 |
return Collections.<FilterStreamPropertyDescriptor<?>>unmodifiableCollection(this.parameterDescriptorMap |
86 |
|
.values()); |
87 |
|
} |
88 |
|
} |