1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?><templates><template autoinsert="true" context="java" deleted="false" description="Auto List Property template using a ComposingProList" enabled="true" name="auto_list_property_composing"> public ListProp<${type}> ${name}() { |
---|
2 | class ${name} extends AutoListProperty<${type}> { |
---|
3 | |
---|
4 | @Override |
---|
5 | protected ProList<${type}> constructList() { |
---|
6 | return new ComposingProList<${type}>() { |
---|
7 | |
---|
8 | @Override |
---|
9 | protected List<? extends ${type}> computeData() { |
---|
10 | List<${type}> data = new ArrayList<${type}>(); |
---|
11 | |
---|
12 | //TODO fill in the list or create a new one. |
---|
13 | |
---|
14 | return null; |
---|
15 | } |
---|
16 | }; |
---|
17 | } |
---|
18 | } |
---|
19 | return getBean().makeProp(${name}.class); |
---|
20 | }</template><template autoinsert="true" context="java" deleted="false" description="Auto List Property template with a TrackingProList" enabled="true" name="auto_list_property_tracking"> public ListProp<${type}> ${name}() { |
---|
21 | class ${name} extends AutoListProperty<${type}> { |
---|
22 | |
---|
23 | @Override |
---|
24 | protected ProList<${type}> constructList() { |
---|
25 | return new TrackingProList<${type}>() { |
---|
26 | |
---|
27 | @Override |
---|
28 | protected ProList<${type}> computeSource() { |
---|
29 | //TODO return the proper ProList |
---|
30 | return null; |
---|
31 | } |
---|
32 | }; |
---|
33 | } |
---|
34 | } |
---|
35 | return getBean().makeProp(${name}.class); |
---|
36 | }</template><template autoinsert="true" context="java" deleted="false" description="Auto List Property template with a TrackingProList that uses a FilteringProList" enabled="true" name="auto_list_property_tracking_filtering"> public ListProp<${type}> ${name}() { |
---|
37 | class ${name} extends AutoListProperty<${type}> { |
---|
38 | |
---|
39 | @Override |
---|
40 | protected ProList<${type}> constructList() { |
---|
41 | return new TrackingProList<${type}>() { |
---|
42 | |
---|
43 | @Override |
---|
44 | protected ProList<${type}> computeSource() { |
---|
45 | //TODO provide the source ProList. |
---|
46 | return null; |
---|
47 | } |
---|
48 | |
---|
49 | }.filter(new ProListFilter<${type}>() { |
---|
50 | |
---|
51 | @Override |
---|
52 | public boolean accepts(${type} item) { |
---|
53 | //TODO define a rule to accept items |
---|
54 | //from the source list. |
---|
55 | return false; |
---|
56 | } |
---|
57 | |
---|
58 | }); |
---|
59 | } |
---|
60 | } |
---|
61 | return getBean().makeProp(${name}.class); |
---|
62 | }</template><template autoinsert="true" context="java" deleted="false" description="Auto List Property template with a TrackingProList that uses a TranformingProList" enabled="true" name="auto_list_property_tracking_transforming"> public ListProp<${targetType}> ${name}() { |
---|
63 | class ${name} extends AutoListProperty<${targetType}> { |
---|
64 | |
---|
65 | @Override |
---|
66 | protected ProList<${targetType}> constructList() { |
---|
67 | return new TrackingProList<${sourceType}>() { |
---|
68 | @Override |
---|
69 | protected ProList<? extends ${sourceType}> computeSource() { |
---|
70 | //TODO provide the source list |
---|
71 | return null; |
---|
72 | } |
---|
73 | }.transform(new ProListTransformer<${sourceType}, ${targetType}>() { |
---|
74 | @Override |
---|
75 | public ${targetType} translate(${sourceType} source) { |
---|
76 | //TODO implement a single transformation |
---|
77 | //from source to target |
---|
78 | return null; |
---|
79 | } |
---|
80 | }); |
---|
81 | } |
---|
82 | } |
---|
83 | return getBean().makeProp(${name}.class); |
---|
84 | }</template><template autoinsert="true" context="java" deleted="false" description="Value List Property Template" enabled="true" name="value_list_property">public RwListProp<${type}> ${name}() { |
---|
85 | return getBean().makeListProp("${name}", ${type}.class); |
---|
86 | }</template></templates> |
---|