Project

General

Profile

Download (1.73 KB) Statistics
| Branch: | Tag: | Revision:
1
// $Id$
2
/**
3
* Copyright (C) 2007 EDIT
4
* European Distributed Institute of Taxonomy 
5
* http://www.e-taxonomy.eu
6
* 
7
* The contents of this file are subject to the Mozilla Public License Version 1.1
8
* See LICENSE.TXT at the top of this package for the full license terms.
9
*/
10

    
11
package eu.etaxonomy.cdm.remote.controller;
12

    
13
import java.io.IOException;
14
import java.util.Arrays;
15
import java.util.List;
16

    
17
import javax.servlet.http.HttpServletRequest;
18
import javax.servlet.http.HttpServletResponse;
19

    
20
import org.springframework.beans.factory.annotation.Autowired;
21
import org.springframework.stereotype.Controller;
22
import org.springframework.web.bind.annotation.RequestMapping;
23
import org.springframework.web.bind.annotation.RequestMethod;
24

    
25
import eu.etaxonomy.cdm.api.service.IMediaService;
26
import eu.etaxonomy.cdm.model.media.Media;
27
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
28

    
29
/**
30
 * TODO write controller documentation
31
 * 
32
 * @author a.kohlbecker
33
 * @date 24.03.2009
34
 */
35

    
36
@Controller
37
@RequestMapping(value = {"/portal/media/*","/portal/media/*/annotation"})
38
public class MediaPortalController extends AnnotatableController<Media, IMediaService>
39
{
40

    
41
	private static final List<String> MEDIA_INIT_STRATEGY = Arrays.asList(new String []{
42
			"$",
43
			"rights.type",
44
			"rights.agent",
45
			"representations.parts",
46
	});
47

    
48
	public MediaPortalController(){
49
		super();
50
		setInitializationStrategy(MEDIA_INIT_STRATEGY);
51
		setUuidParameterPattern("^/portal/media/([^/?#&\\.]+).*");
52
	}
53
	
54
	/* (non-Javadoc)
55
	 * @see eu.etaxonomy.cdm.remote.controller.GenericController#setService(eu.etaxonomy.cdm.api.service.IService)
56
	 */
57
	@Autowired
58
	@Override
59
	public void setService(IMediaService service) {
60
		this.service = service;
61
	}
62

    
63
}
(21-21/36)