fix #8458: remove unused parameter
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / service / IMediaService.java
index 067367097c94b3b63cfa7bea78287c31309c0e65..40b7de9d986af361a6304aea494f5674ec92eb75 100644 (file)
@@ -1,25 +1,72 @@
+/**\r
+ * Copyright (C) 2007 EDIT\r
+ * European Distributed Institute of Taxonomy\r
+ * http://www.e-taxonomy.eu\r
+ *\r
+ * The contents of this file are subject to the Mozilla Public License Version 1.1\r
+ * See LICENSE.TXT at the top of this package for the full license terms.\r
+ */\r
+\r
 package eu.etaxonomy.cdm.api.service;\r
 \r
-import java.util.Collection;\r
 import java.util.List;\r
-import java.util.Map;\r
+import java.util.Set;\r
 import java.util.UUID;\r
 \r
-import eu.etaxonomy.cdm.model.common.VersionableEntity;\r
+import eu.etaxonomy.cdm.api.service.config.MediaDeletionConfigurator;\r
+import eu.etaxonomy.cdm.api.service.pager.Pager;\r
+import eu.etaxonomy.cdm.model.description.MediaKey;\r
+import eu.etaxonomy.cdm.model.location.NamedArea;\r
 import eu.etaxonomy.cdm.model.media.Media;\r
-import eu.etaxonomy.cdm.model.media.MediaRepresentation;\r
-import eu.etaxonomy.cdm.model.media.MediaRepresentationPart;\r
+import eu.etaxonomy.cdm.model.media.Rights;\r
+import eu.etaxonomy.cdm.model.taxon.Taxon;\r
+import eu.etaxonomy.cdm.persistence.dao.initializer.IBeanInitializer;\r
+import eu.etaxonomy.cdm.persistence.query.OrderHint;\r
+\r
+public interface IMediaService extends IIdentifiableEntityService<Media> {\r
+\r
+       /**\r
+        * Return a List of MediaKeys, optionally filtered by the parameters passed.\r
+        *\r
+        * @param taxonomicScope a Set of Taxon instances that define the taxonomic scope of the key (can be null)\r
+        * @param geoScopes a Set of NamedArea instances that define the geospatial scope of the key (can be null)\r
+        * @param pageSize The maximum number of keys returned (can be null for all keys)\r
+        * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)\r
+        * @param propertyPaths Properties to initialize in the returned entities, following the syntax described in {@link IBeanInitializer#initialize(Object, List)}\r
+        * @return a Pager containing MediaKey instances\r
+        */\r
+       public Pager<MediaKey> getMediaKeys(Set<Taxon> taxonomicScope, Set<NamedArea> geoScopes, Integer pageSize, Integer pageNumber, List<String> propertyPaths);\r
 \r
-public interface IMediaService<T extends VersionableEntity> extends IService<T> {\r
-//public interface IAgentService<T extends Agent> extends IIdentifiableEntityService<T> {\r
-//     public abstract Map<UUID, T> saveAgentAll(Collection<T> agentCollection);\r
-//     public abstract List<? extends Agent> getAllAgents(int limit, int start);\r
+       /**\r
+        * Return a Pager of rights belonging to this object\r
+        *\r
+        * @param t The media object\r
+        * @param pageSize The maximum number of rights returned (can be null for all rights)\r
+        * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)\r
+        * @param propertyPaths properties to initialize - see {@link IBeanInitializer#initialize(Object, List)}\r
+        * @return a Pager of Rights entities\r
+        */\r
+    @Override\r
+    public Pager<Rights> getRights(Media t, Integer pageSize, Integer pageNumber, List<String> propertyPaths);\r
 \r
-       public abstract Map<UUID, T> saveMediaAll(Collection<T> mediaCollection);\r
-       \r
-       public abstract List<Media> getAllMedia(int limit, int start);\r
+    /**\r
+        * Returns a Paged List of Media instances where the default field matches the String queryString (as interpreted by the Lucene QueryParser)\r
+        *\r
+        * @param clazz filter the results by class (or pass null to return all Media instances)\r
+        * @param queryString\r
+        * @param pageSize The maximum number of media returned (can be null for all matching media)\r
+        * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)\r
+        * @param orderHints\r
+        *            Supports path like <code>orderHints.propertyNames</code> which\r
+        *            include *-to-one properties like createdBy.username or\r
+        *            authorTeam.persistentTitleCache\r
+        * @param propertyPaths properties to be initialized\r
+        * @return a Pager Media instances\r
+        * @see <a href="http://lucene.apache.org/java/2_4_0/queryparsersyntax.html">Apache Lucene - Query Parser Syntax</a>\r
+        */\r
+       @Override\r
+    public Pager<Media> search(Class<? extends Media> clazz, String queryString, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);\r
 \r
-       public abstract List<MediaRepresentation> getAllMediaRepresentations(int limit, int start);\r
 \r
-       public abstract List<MediaRepresentationPart> getAllMediaRepresentationParts(int limit, int start);\r
+       public DeleteResult delete(UUID mediaUuid, MediaDeletionConfigurator config);\r
 }\r