9d8f65a254f7cc115ddae4372ee3eea4880db1ce
[cdmlib.git] / cdmlib-remote / src / main / java / eu / etaxonomy / cdm / remote / controller / MediaPortalController.java
1 /**
2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
8 */
9
10 package eu.etaxonomy.cdm.remote.controller;
11
12 import java.util.Arrays;
13
14 import org.springframework.beans.factory.annotation.Autowired;
15 import org.springframework.stereotype.Controller;
16 import org.springframework.web.bind.annotation.RequestMapping;
17
18 import eu.etaxonomy.cdm.api.service.IMediaService;
19 import eu.etaxonomy.cdm.persistence.dao.initializer.EntityInitStrategy;
20 import io.swagger.annotations.Api;
21
22 /**
23 * TODO write controller documentation
24 *
25 * @author a.kohlbecker
26 * @since 24.03.2009
27 */
28
29 @Controller
30 @Api("portal_media")
31 @RequestMapping(value = {"/portal/media/{uuid}"})
32 public class MediaPortalController extends MediaController
33 {
34
35 public static final EntityInitStrategy MEDIA_INIT_STRATEGY = new EntityInitStrategy(Arrays.asList(new String []{
36 "$",
37 "identifiers",
38 "rights.type",
39 "rights.agent",
40 "credits.agent",
41 "representations.parts",
42 "allDescriptions",
43 "sources.citation.authorship",
44 "sources.links",
45 "sources.annotations",
46 "sources.markers"
47 }));
48
49 public MediaPortalController(){
50 super();
51 setInitializationStrategy(MEDIA_INIT_STRATEGY.getPropertyPaths());
52 }
53
54 @Autowired
55 @Override
56 public void setService(IMediaService service) {
57 this.service = service;
58 }
59
60 }