Project

General

Profile

Download (2.83 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.api.service;
12

    
13
import java.util.Collection;
14
import java.util.List;
15
import java.util.Map;
16
import java.util.Set;
17
import java.util.UUID;
18

    
19
import eu.etaxonomy.cdm.api.service.pager.Pager;
20
import eu.etaxonomy.cdm.model.description.IdentificationKey;
21
import eu.etaxonomy.cdm.model.location.NamedArea;
22
import eu.etaxonomy.cdm.model.media.Media;
23
import eu.etaxonomy.cdm.model.media.MediaRepresentation;
24
import eu.etaxonomy.cdm.model.media.MediaRepresentationPart;
25
import eu.etaxonomy.cdm.model.media.Rights;
26
import eu.etaxonomy.cdm.model.taxon.Taxon;
27
import eu.etaxonomy.cdm.persistence.dao.BeanInitializer;
28

    
29
public interface IMediaService extends IAnnotatableService<Media> {
30

    
31
	// FIXME candidate for harmonization?
32
	public abstract Map<UUID, Media> saveMediaAll(Collection<Media> mediaCollection);
33
	
34
	// FIXME candidate for harmonization?
35
	public abstract List<Media> getAllMedia(int limit, int start);
36

    
37
	public abstract List<MediaRepresentation> getAllMediaRepresentations(int limit, int start);
38

    
39
	public abstract List<MediaRepresentationPart> getAllMediaRepresentationParts(int limit, int start);
40
	
41
	/**
42
	 * Return a List of IdentificationKeys, optionally filtered by the parameters passed.
43
	 * 
44
	 * @param taxonomicScope a Set of Taxon instances that define the taxonomic scope of the key (can be null)
45
	 * @param geoScopes a Set of NamedArea instances that define the geospatial scope of the key (can be null)
46
	 * @param pageSize The maximum number of keys returned (can be null for all keys)
47
	 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
48
	 * @param propertyPaths Properties to initialize in the returned entities, following the syntax described in {@link BeanInitializer#initialize(Object, List)}
49
	 * @return a Pager containing IdentificationKey instances
50
	 */
51
	public Pager<IdentificationKey> getIdentificationKeys(Set<Taxon> taxonomicScope, Set<NamedArea> geoScopes, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
52
	
53
	/**
54
	 * Return a Pager of rights belonging to this object
55
	 * 
56
	 * @param t The media object
57
	 * @param pageSize The maximum number of rights returned (can be null for all rights)
58
	 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
59
	 * @param propertyPaths properties to initialize - see {@link BeanInitializer#initialize(Object, List)}
60
	 * @return a Pager of Rights entities
61
	 */
62
    public Pager<Rights> getRights(Media t, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
63
}
(17-17/37)