Add find- and countByTitle() methods to primer and amplification service
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / service / IClassificationService.java
index 3661abb6b905ccd1ec8936d1f6a6f7e53fdcbdfc..4be48af59b7e0d15cdc505f73b4f83acf784e280 100644 (file)
@@ -15,14 +15,15 @@ import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 
+import eu.etaxonomy.cdm.api.service.config.CreateHierarchyForClassificationConfigurator;
 import eu.etaxonomy.cdm.api.service.pager.Pager;
-import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
 import eu.etaxonomy.cdm.model.media.MediaRepresentation;
 import eu.etaxonomy.cdm.model.name.Rank;
 import eu.etaxonomy.cdm.model.taxon.Classification;
-import eu.etaxonomy.cdm.model.taxon.ITreeNode;
+import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.cdm.persistence.query.OrderHint;
 
 
@@ -44,7 +45,7 @@ public interface IClassificationService extends IIdentifiableEntityService<Class
      * @param uuid
      * @return
      */
-    public ITreeNode getTreeNodeByUuid(UUID uuid);
+    public ITaxonTreeNode getTreeNodeByUuid(UUID uuid);
 
     /**
      *
@@ -175,16 +176,12 @@ public interface IClassificationService extends IIdentifiableEntityService<Class
 
 
     /**
-     * Although this method seems to be a redundant alternative to {@link #loadChildNodesOfTaxonNode(TaxonNode, List)} it is an important
-     * alternative from which web services benefit. Without this method the web service controller method, which operates outside of the
-     * transaction, would have to initialize the full taxon tree with all nodes of the taxon.
-     * This would be rather slow compared to using this method.
-     * @param taxon
-     * @param classification
+     * @param taxonUuid
+     * @param classificationUuid
      * @param propertyPaths
      * @return
      */
-    public List<TaxonNode> loadChildNodesOfTaxon(Taxon taxon, Classification classification, List<String> propertyPaths);
+    public List<TaxonNode> listChildNodesOfTaxon(UUID taxonUuid, UUID classificationUuid, Integer pageSize, Integer pageIndex, List<String> propertyPaths);
 
     /**
      * @param taxonNode
@@ -211,7 +208,8 @@ public interface IClassificationService extends IIdentifiableEntityService<Class
      * @param widthOrDuration
      * @param mimeTypes
      * @return
-     *  @deprecated use getAllMediaForChildNodes(TaxonNode taxonNode, ...) instead
+     *
+     * @deprecated use getAllMediaForChildNodes(TaxonNode taxonNode, ...) instead
      * if you have a classification and a taxon that is in it, you should also have the according taxonNode
      */
     @Deprecated
@@ -261,17 +259,20 @@ public interface IClassificationService extends IIdentifiableEntityService<Class
      * @param treeNode
      * @return
      */
-    public UUID removeTreeNode(ITreeNode treeNode);
+   
+    public UUID removeTreeNode(ITaxonTreeNode treeNode);
 
     /**
      *
      * @param treeNode
      * @return
      */
-    public UUID saveTreeNode(ITreeNode treeNode);
+    public UUID saveTreeNode(ITaxonTreeNode treeNode);
 
 
     public List<TaxonNode> getAllNodes();
 
+       public UpdateResult createHierarchyInClassification(Classification classification, CreateHierarchyForClassificationConfigurator configurator);
+
 
 }