Revision 42621
Added by Sandro La Bruzzo almost 8 years ago
CleanerInspector.java | ||
---|---|---|
3 | 3 |
import java.util.List; |
4 | 4 |
import java.util.stream.Collectors; |
5 | 5 |
|
6 |
import javax.annotation.Resource; |
|
7 |
|
|
8 |
import org.springframework.stereotype.Controller; |
|
9 |
import org.springframework.ui.Model; |
|
10 |
import org.springframework.web.bind.annotation.RequestMapping; |
|
11 |
import org.springframework.web.bind.annotation.RequestParam; |
|
12 |
|
|
13 | 6 |
import com.google.common.collect.Lists; |
14 |
|
|
15 | 7 |
import eu.dnetlib.data.cleaner.CleaningRule; |
16 | 8 |
import eu.dnetlib.data.cleaner.CleaningRuleFactory; |
17 | 9 |
import eu.dnetlib.enabling.inspector.AbstractInspectorController; |
18 | 10 |
import eu.dnetlib.rmi.data.CleanerException; |
11 |
import org.springframework.beans.factory.annotation.Autowired; |
|
12 |
import org.springframework.stereotype.Controller; |
|
13 |
import org.springframework.ui.Model; |
|
14 |
import org.springframework.web.bind.annotation.RequestMapping; |
|
15 |
import org.springframework.web.bind.annotation.RequestParam; |
|
19 | 16 |
|
20 | 17 |
@Controller |
21 | 18 |
public class CleanerInspector extends AbstractInspectorController { |
22 | 19 |
|
23 |
@Resource
|
|
20 |
@Autowired
|
|
24 | 21 |
private CleaningRuleFactory cleaningRuleFactory; |
25 | 22 |
|
26 |
public static class SelectOption { |
|
27 |
|
|
28 |
private String value; |
|
29 |
private boolean selected; |
|
30 |
|
|
31 |
public SelectOption(final String value, final boolean selected) { |
|
32 |
super(); |
|
33 |
this.value = value; |
|
34 |
this.selected = selected; |
|
35 |
} |
|
36 |
|
|
37 |
public String getValue() { |
|
38 |
return this.value; |
|
39 |
} |
|
40 |
|
|
41 |
public void setValue(final String value) { |
|
42 |
this.value = value; |
|
43 |
} |
|
44 |
|
|
45 |
public boolean isSelected() { |
|
46 |
return this.selected; |
|
47 |
} |
|
48 |
|
|
49 |
public void setSelected(final boolean selected) { |
|
50 |
this.selected = selected; |
|
51 |
} |
|
52 |
} |
|
53 |
|
|
54 | 23 |
@RequestMapping(value = "/inspector/cleaner.do") |
55 | 24 |
public void cleaner(final Model model, |
56 | 25 |
@RequestParam(value = "rule", required = false) final String ruleId, |
... | ... | |
82 | 51 |
.collect(Collectors.toList()); |
83 | 52 |
} |
84 | 53 |
|
54 |
public static class SelectOption { |
|
55 |
|
|
56 |
private String value; |
|
57 |
private boolean selected; |
|
58 |
|
|
59 |
public SelectOption(final String value, final boolean selected) { |
|
60 |
super(); |
|
61 |
this.value = value; |
|
62 |
this.selected = selected; |
|
63 |
} |
|
64 |
|
|
65 |
public String getValue() { |
|
66 |
return this.value; |
|
67 |
} |
|
68 |
|
|
69 |
public void setValue(final String value) { |
|
70 |
this.value = value; |
|
71 |
} |
|
72 |
|
|
73 |
public boolean isSelected() { |
|
74 |
return this.selected; |
|
75 |
} |
|
76 |
|
|
77 |
public void setSelected(final boolean selected) { |
|
78 |
this.selected = selected; |
|
79 |
} |
|
80 |
} |
|
81 |
|
|
85 | 82 |
} |
Also available in: Unified diff
Chnaged Resource to Autowired