Project

General

Profile

« Previous | Next » 

Revision de134b7c

Added by Andreas Müller about 2 years ago

ref #9947 make DescriptionElementController inherit from BaseController

View differences:

cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/DescriptionElementController.java
39 39
import eu.etaxonomy.cdm.remote.editor.NamedAreaLevelPropertyEditor;
40 40
import eu.etaxonomy.cdm.remote.editor.TermBaseListPropertyEditor;
41 41
import eu.etaxonomy.cdm.remote.editor.UUIDListPropertyEditor;
42
import eu.etaxonomy.cdm.remote.editor.UUIDPropertyEditor;
43 42
import eu.etaxonomy.cdm.remote.editor.UuidList;
44 43
import io.swagger.annotations.Api;
45 44

  
......
52 51
@Controller
53 52
@Api("descriptionElement")
54 53
@RequestMapping(value = {"/descriptionElement/{uuid}", "/descriptionElement/{uuid_list}"})
55
public class DescriptionElementController {
54
public class DescriptionElementController
55
        extends BaseController<DescriptionElementBase, IDescriptionElementService>{
56 56

  
57 57
    private static final List<String> STATE_INIT_STRATEGY = Arrays.asList( new String[]{
58 58
            "states.state.representations",
......
67 67

  
68 68
    private IDescriptionElementService service;
69 69

  
70
    @Override
70 71
    @InitBinder
71 72
    public void initBinder(WebDataBinder binder) {
72
        binder.registerCustomEditor(UUID.class, new UUIDPropertyEditor());
73
        super.initBinder(binder);
73 74
        binder.registerCustomEditor(UuidList.class, new UUIDListPropertyEditor());
74 75
        binder.registerCustomEditor(NamedAreaLevel.class, new NamedAreaLevelPropertyEditor());
75 76
        binder.registerCustomEditor(DefinedTermBaseList.class, new TermBaseListPropertyEditor<MarkerType>(termService));
76 77
    }
77 78

  
79
    @Override
78 80
    @Autowired
79 81
    public void setService(IDescriptionElementService service) {
80 82
        this.service = service;
81 83
    }
82 84

  
83
    protected List<String> getInitializationStrategy() {
84
        return AbstractController.DEFAULT_INIT_STRATEGY;
85
    }
86

  
87 85
//    @RequestMapping(method = RequestMethod.GET) // mapped as absolute path, see CdmAntPathMatcher
88 86
//    public ModelAndView doGetDescriptionElement(
89 87
//            @PathVariable("uuid") UUID uuid,

Also available in: Unified diff