1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package com.xpn.xwiki.objects.meta; |
21 |
|
|
22 |
|
import javax.inject.Named; |
23 |
|
import javax.inject.Singleton; |
24 |
|
|
25 |
|
import org.xwiki.component.annotation.Component; |
26 |
|
|
27 |
|
import com.xpn.xwiki.objects.classes.ComputedFieldClass; |
28 |
|
import com.xpn.xwiki.objects.classes.PropertyClassInterface; |
29 |
|
import com.xpn.xwiki.objects.classes.TextAreaClass; |
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
@version |
36 |
|
@since |
37 |
|
|
38 |
|
@Component |
39 |
|
@Named("ComputedField") |
40 |
|
@Singleton |
|
|
| 100% |
Uncovered Elements: 0 (12) |
Complexity: 2 |
Complexity Density: 0.2 |
|
41 |
|
public class ComputedFieldMetaClass extends PropertyMetaClass |
42 |
|
{ |
43 |
|
|
44 |
|
|
45 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (9) |
Complexity: 1 |
Complexity Density: 0.11 |
|
46 |
7 |
public ComputedFieldMetaClass()... |
47 |
|
{ |
48 |
7 |
setPrettyName("Computed Field"); |
49 |
7 |
setName(getClass().getAnnotation(Named.class).value()); |
50 |
|
|
51 |
7 |
TextAreaClass scriptClass = new TextAreaClass(this); |
52 |
7 |
scriptClass.setName("script"); |
53 |
7 |
scriptClass.setPrettyName("Script"); |
54 |
7 |
scriptClass.setEditor("Text"); |
55 |
7 |
scriptClass.setSize(80); |
56 |
7 |
scriptClass.setRows(5); |
57 |
7 |
safeput(scriptClass.getName(), scriptClass); |
58 |
|
} |
59 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
60 |
6 |
@Override... |
61 |
|
public PropertyClassInterface getInstance() |
62 |
|
{ |
63 |
6 |
return new ComputedFieldClass(); |
64 |
|
} |
65 |
|
} |