1 |
c2f269f9
|
Andreas Kohlbecker
|
/**
|
2 |
|
|
* Copyright (C) 2007 EDIT
|
3 |
d9f134f9
|
Katja Luther
|
* European Distributed Institute of Taxonomy
|
4 |
c2f269f9
|
Andreas Kohlbecker
|
* http://www.e-taxonomy.eu
|
5 |
d9f134f9
|
Katja Luther
|
*
|
6 |
c2f269f9
|
Andreas Kohlbecker
|
* 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 |
fdf5453b
|
a.babadshanjan
|
package eu.etaxonomy.cdm.api.service;
|
11 |
|
|
|
12 |
|
|
import java.util.List;
|
13 |
d57c0df0
|
ben.clark
|
import java.util.Set;
|
14 |
d9f134f9
|
Katja Luther
|
import java.util.UUID;
|
15 |
fdf5453b
|
a.babadshanjan
|
|
16 |
d9f134f9
|
Katja Luther
|
import eu.etaxonomy.cdm.api.service.config.MediaDeletionConfigurator;
|
17 |
d57c0df0
|
ben.clark
|
import eu.etaxonomy.cdm.api.service.pager.Pager;
|
18 |
0f7d0d42
|
h.fradin
|
import eu.etaxonomy.cdm.model.description.MediaKey;
|
19 |
d57c0df0
|
ben.clark
|
import eu.etaxonomy.cdm.model.location.NamedArea;
|
20 |
fdf5453b
|
a.babadshanjan
|
import eu.etaxonomy.cdm.model.media.Media;
|
21 |
d44277a9
|
ben.clark
|
import eu.etaxonomy.cdm.model.media.Rights;
|
22 |
d57c0df0
|
ben.clark
|
import eu.etaxonomy.cdm.model.taxon.Taxon;
|
23 |
b9cbcc7c
|
Andreas Kohlbecker
|
import eu.etaxonomy.cdm.persistence.dao.initializer.IBeanInitializer;
|
24 |
aba8d6ad
|
ben.clark
|
import eu.etaxonomy.cdm.persistence.query.OrderHint;
|
25 |
fdf5453b
|
a.babadshanjan
|
|
26 |
c4e812bc
|
ben.clark
|
public interface IMediaService extends IIdentifiableEntityService<Media> {
|
27 |
fdf5453b
|
a.babadshanjan
|
|
28 |
d57c0df0
|
ben.clark
|
/**
|
29 |
0f7d0d42
|
h.fradin
|
* Return a List of MediaKeys, optionally filtered by the parameters passed.
|
30 |
d9f134f9
|
Katja Luther
|
*
|
31 |
d57c0df0
|
ben.clark
|
* @param taxonomicScope a Set of Taxon instances that define the taxonomic scope of the key (can be null)
|
32 |
|
|
* @param geoScopes a Set of NamedArea instances that define the geospatial scope of the key (can be null)
|
33 |
|
|
* @param pageSize The maximum number of keys returned (can be null for all keys)
|
34 |
|
|
* @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
|
35 |
dd4c21b7
|
Andreas Kohlbecker
|
* @param propertyPaths Properties to initialize in the returned entities, following the syntax described in {@link IBeanInitializer#initialize(Object, List)}
|
36 |
0f7d0d42
|
h.fradin
|
* @return a Pager containing MediaKey instances
|
37 |
d57c0df0
|
ben.clark
|
*/
|
38 |
0f7d0d42
|
h.fradin
|
public Pager<MediaKey> getMediaKeys(Set<Taxon> taxonomicScope, Set<NamedArea> geoScopes, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
|
39 |
d9f134f9
|
Katja Luther
|
|
40 |
d44277a9
|
ben.clark
|
/**
|
41 |
|
|
* Return a Pager of rights belonging to this object
|
42 |
d9f134f9
|
Katja Luther
|
*
|
43 |
d44277a9
|
ben.clark
|
* @param t The media object
|
44 |
|
|
* @param pageSize The maximum number of rights returned (can be null for all rights)
|
45 |
|
|
* @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
|
46 |
dd4c21b7
|
Andreas Kohlbecker
|
* @param propertyPaths properties to initialize - see {@link IBeanInitializer#initialize(Object, List)}
|
47 |
d44277a9
|
ben.clark
|
* @return a Pager of Rights entities
|
48 |
|
|
*/
|
49 |
d9f134f9
|
Katja Luther
|
@Override
|
50 |
d44277a9
|
ben.clark
|
public Pager<Rights> getRights(Media t, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
|
51 |
d9f134f9
|
Katja Luther
|
|
52 |
aba8d6ad
|
ben.clark
|
/**
|
53 |
|
|
* Returns a Paged List of Media instances where the default field matches the String queryString (as interpreted by the Lucene QueryParser)
|
54 |
d9f134f9
|
Katja Luther
|
*
|
55 |
aba8d6ad
|
ben.clark
|
* @param clazz filter the results by class (or pass null to return all Media instances)
|
56 |
|
|
* @param queryString
|
57 |
|
|
* @param pageSize The maximum number of media returned (can be null for all matching media)
|
58 |
|
|
* @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
|
59 |
|
|
* @param orderHints
|
60 |
|
|
* Supports path like <code>orderHints.propertyNames</code> which
|
61 |
|
|
* include *-to-one properties like createdBy.username or
|
62 |
|
|
* authorTeam.persistentTitleCache
|
63 |
|
|
* @param propertyPaths properties to be initialized
|
64 |
|
|
* @return a Pager Media instances
|
65 |
|
|
* @see <a href="http://lucene.apache.org/java/2_4_0/queryparsersyntax.html">Apache Lucene - Query Parser Syntax</a>
|
66 |
|
|
*/
|
67 |
d9f134f9
|
Katja Luther
|
@Override
|
68 |
|
|
public Pager<Media> search(Class<? extends Media> clazz, String queryString, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);
|
69 |
|
|
|
70 |
|
|
|
71 |
|
|
public DeleteResult delete(UUID mediaUuid, MediaDeletionConfigurator config);
|
72 |
fdf5453b
|
a.babadshanjan
|
}
|