newest changes for INameService.delete
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / service / IDescriptionService.java
index 3a5771effb5a8a67368dbb4f8a2da69143523d7e..aee1ee08e25a767cbd399b39c7d03eb139937d5c 100644 (file)
@@ -248,7 +248,7 @@ public interface IDescriptionService extends IIdentifiableEntityService<Descript
      */
     public Pager<Media> getMedia(DescriptionElementBase descriptionElement, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
     
-    public List<DescriptionElementBase> getDescriptionElementsForTaxon(Taxon taxon, Set<Feature> features, Class<? extends DescriptionElementBase> type, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
+    public <T extends DescriptionElementBase> List<T>  getDescriptionElementsForTaxon(Taxon taxon, Set<Feature> features, Class<? extends T> type, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
 
        public DistributionTree getOrderedDistributions(Set<TaxonDescription> taxonDescriptions, Set<NamedAreaLevel> levels, List<String> propertyPaths);
 
@@ -266,10 +266,22 @@ public interface IDescriptionService extends IIdentifiableEntityService<Descript
 
        /**
         * Preliminary method to test whether a description contains structured data. 
-        * @deprecated The means of determining this fact may change soon, so this method is annotated a beeing deprecated.
+        * @deprecated The means of determining this fact may change soon, so this method is
+                                       annotated as being deprecated.
         * @param description
         * @return
         */
        @Deprecated
        public boolean hasStructuredData(DescriptionBase<?> description);
+       
+       /**
+        * Add the collection of {@link DescriptionElementBase description elements} to the <code>targetDescription</code>.
+        * Remove the description elements from the description they are currently associated with. 
+        * 
+        * @param descriptionElements
+        * @param targetDescription
+        * @param isPaste if true, the elements are only copied (cloned) and not removed from the
+        *      old description
+        */
+       public void moveDescriptionElementsToDescription(Collection<DescriptionElementBase> descriptionElements, DescriptionBase targetDescription, boolean isPaste);
 }
\ No newline at end of file