merge from trunk
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / service / ITaxonNodeService.java
index 122d56c205e57215e315e16a509d88d9560ee7fd..02e630b991e9838b43c4a679b6a89d401b1902b0 100644 (file)
 
 package eu.etaxonomy.cdm.api.service;
 
+import java.util.Collection;
 import java.util.List;
 import java.util.Set;
+import java.util.UUID;
 
 import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;
 import eu.etaxonomy.cdm.model.reference.Reference;
@@ -53,6 +55,12 @@ public interface ITaxonNodeService extends IAnnotatableService<TaxonNode>{
         */
        public Synonym makeTaxonNodeASynonymOfAnotherTaxonNode(TaxonNode oldTaxonNode, TaxonNode newAcceptedTaxonNode, SynonymRelationshipType synonymRelationshipType, Reference citation, String citationMicroReference) ;
 
+       public Synonym makeTaxonNodeASynonymOfAnotherTaxonNode(UUID oldTaxonNodeUuid,
+               UUID newAcceptedTaxonNodeUUID,
+               SynonymRelationshipType synonymRelationshipType,
+               Reference citation,
+               String citationMicroReference) ;
+
        /**
         * deletes the given taxon nodes
         *
@@ -61,8 +69,15 @@ public interface ITaxonNodeService extends IAnnotatableService<TaxonNode>{
         * @return
         *
         */
-       DeleteResult deleteTaxonNodes(Set<ITaxonTreeNode> nodes,
+       public DeleteResult deleteTaxonNodes(Set<ITaxonTreeNode> nodes,
                        TaxonDeletionConfigurator config) ;
+    /**
+     * @param nodeUuids
+     * @param config
+     * @return
+     */
+    public DeleteResult deleteTaxonNodes(Collection<UUID> nodeUuids, TaxonDeletionConfigurator config);
+
        /**
         * deletes the given taxon node the configurator defines whether the children will be deleted too or not
         *
@@ -80,6 +95,14 @@ public interface ITaxonNodeService extends IAnnotatableService<TaxonNode>{
         * @param end  - limit of how many rows are to be pulled from the database, i.e. 1000 rows.
         * @return filtered List of TaxonNode according to the classification provided
         */
+
+    /**
+     * @param nodeUuid
+     * @param config
+     * @return
+     */
+    public DeleteResult deleteTaxonNode(UUID nodeUuid, TaxonDeletionConfigurator config);
+
        public List<TaxonNode> listAllNodesForClassification(Classification classification, Integer start, Integer end);
 
        /**
@@ -90,11 +113,19 @@ public interface ITaxonNodeService extends IAnnotatableService<TaxonNode>{
         */
        public int countAllNodesForClassification(Classification classification);
 
-       public TaxonNode moveTaxonNode(TaxonNode taxonNode, TaxonNode newParent);
-
-
-
+    /**
+     * @param taxonNode
+     * @param newParentTaxonNode
+     * @return
+     */
+    public TaxonNode moveTaxonNode(TaxonNode taxonNode, TaxonNode newParentTaxonNode);
 
 
+    /**
+     * @param taxonNodeUuid
+     * @param newParentTaxonNodeUuid
+     * @return
+     */
+    public TaxonNode moveTaxonNode(UUID taxonNodeUuid, UUID newParentTaxonNodeUuid);
 
 }