Merge branch 'develop' of wp5.e-taxonomy.eu:/var/git/taxeditor into remoting-4.0
[taxeditor.git] / eu.etaxonomy.taxeditor.editor / src / main / java / eu / etaxonomy / taxeditor / editor / view / dataimport / transientServices / TransientTaxonService.java
index 2a7a3d69e9b912f3d784a6e75068da1e03f58cc1..a47a4284f73c0a120981b0e26b46d6bb0435314c 100644 (file)
@@ -1,12 +1,12 @@
 // $Id$
 /**
-* Copyright (C) 2013 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
+ * Copyright (C) 2013 EDIT
+ * European Distributed Institute of Taxonomy
+ * http://www.e-taxonomy.eu
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
 package eu.etaxonomy.taxeditor.editor.view.dataimport.transientServices;
 
 import java.io.IOException;
@@ -56,7 +56,6 @@ import eu.etaxonomy.cdm.model.common.MarkerType;
 import eu.etaxonomy.cdm.model.common.OrderedTermVocabulary;
 import eu.etaxonomy.cdm.model.common.RelationshipBase;
 import eu.etaxonomy.cdm.model.common.RelationshipBase.Direction;
-import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
 import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
 import eu.etaxonomy.cdm.model.description.Feature;
 import eu.etaxonomy.cdm.model.description.PresenceAbsenceTerm;
@@ -80,6 +79,7 @@ import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
 import eu.etaxonomy.cdm.model.view.AuditEvent;
 import eu.etaxonomy.cdm.model.view.AuditEventRecord;
 import eu.etaxonomy.cdm.persistence.dao.common.AuditEventSort;
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.cdm.persistence.fetch.CdmFetch;
 import eu.etaxonomy.cdm.persistence.query.Grouping;
 import eu.etaxonomy.cdm.persistence.query.MatchMode;
@@ -1088,7 +1088,7 @@ public class TransientTaxonService implements ITaxonService {
             String queryString, Classification classification, Set<NamedArea> namedAreas,
             Set<PresenceAbsenceTerm> distributionStatus, List<Language> languages, boolean highlightFragments,
             Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths)
-            throws CorruptIndexException, IOException, ParseException, LuceneMultiSearchException {
+                    throws CorruptIndexException, IOException, ParseException, LuceneMultiSearchException {
         return defaultService.findTaxaAndNamesByFullText(searchModes, queryString, classification, namedAreas, distributionStatus, languages, highlightFragments, pageSize, pageNumber, orderHints, propertyPaths);
     }
 
@@ -1350,14 +1350,14 @@ public class TransientTaxonService implements ITaxonService {
         return defaultService.getSynonymsByHomotypicGroup(taxon, propertyPaths);
     }
 
-       @Override
-       public Synonym changeRelatedTaxonToSynonym(Taxon fromTaxon, Taxon toTaxon,
-                       TaxonRelationshipType oldRelationshipType,
-                       SynonymRelationshipType synonymRelationshipType)
-                       throws DataChangeNoRollbackException {
+    @Override
+    public Synonym changeRelatedTaxonToSynonym(Taxon fromTaxon, Taxon toTaxon,
+            TaxonRelationshipType oldRelationshipType,
+            SynonymRelationshipType synonymRelationshipType)
+                    throws DataChangeNoRollbackException {
 
-               return defaultService.changeRelatedTaxonToSynonym(fromTaxon, toTaxon, oldRelationshipType, synonymRelationshipType);
-       }
+        return defaultService.changeRelatedTaxonToSynonym(fromTaxon, toTaxon, oldRelationshipType, synonymRelationshipType);
+    }
 
     /* (non-Javadoc)
      * @see eu.etaxonomy.cdm.api.service.ITaxonService#pageAcceptedTaxaFor(java.util.UUID, java.util.UUID, java.lang.Integer, java.lang.Integer, java.util.List, java.util.List)
@@ -1377,24 +1377,24 @@ public class TransientTaxonService implements ITaxonService {
         return defaultService.listAcceptedTaxaFor(synonymUuid, classificationUuid, pageSize, pageNumber, orderHints, propertyPaths);
     }
 
-       @Override
-       public DeleteResult isDeletable(TaxonBase object,
-                       DeleteConfiguratorBase config) {
-               // TODO Auto-generated method stub
-               return null;
-       }
+    @Override
+    public DeleteResult isDeletable(TaxonBase object,
+            DeleteConfiguratorBase config) {
+        // TODO Auto-generated method stub
+        return null;
+    }
 
-       @Override
-       public IncludedTaxaDTO listIncludedTaxa(UUID taxonUuid,
-                       IncludedTaxonConfiguration configuration) {
-               // TODO Auto-generated method stub
-               return null;
-       }
+    @Override
+    public IncludedTaxaDTO listIncludedTaxa(UUID taxonUuid,
+            IncludedTaxonConfiguration configuration) {
+        // TODO Auto-generated method stub
+        return null;
+    }
 
-       @Override
-       public TaxonBase findWithoutFlush(UUID uuid) {
-               return defaultService.findWithoutFlush(uuid);
-       }
+    @Override
+    public TaxonBase findWithoutFlush(UUID uuid) {
+        return defaultService.findWithoutFlush(uuid);
+    }
 
     /* (non-Javadoc)
      * @see eu.etaxonomy.cdm.api.service.ITaxonService#findTaxaByName(eu.etaxonomy.cdm.api.service.config.MatchingTaxonConfigurator)
@@ -1404,37 +1404,33 @@ public class TransientTaxonService implements ITaxonService {
         return defaultService.findTaxaByName(config);
     }
 
-       @Override
-       public <S extends TaxonBase>  Pager<FindByIdentifierDTO<S>> findByIdentifier(Class<S> clazz, String identifier, DefinedTerm identifierType, MatchMode matchmode, boolean includeEntity, Integer pageSize, Integer pageNumber, List<String> propertyPaths){
-               return defaultService.findByIdentifier(clazz, identifier, identifierType, matchmode, includeEntity, pageSize, pageNumber, propertyPaths);
-       }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.cdm.api.service.ITaxonService#findByIdentifier(java.lang.Class, java.lang.String, eu.etaxonomy.cdm.model.common.DefinedTerm, eu.etaxonomy.cdm.model.taxon.TaxonNode, eu.etaxonomy.cdm.persistence.query.MatchMode, boolean, java.lang.Integer, java.lang.Integer, java.util.List)
-        */
-       @Override
-       public <S extends TaxonBase> Pager<FindByIdentifierDTO<S>> findByIdentifier(Class<S> clazz, String identifier,
-               DefinedTerm identifierType, TaxonNode subtreeFilter, MatchMode matchmode, boolean includeEntity,
-               Integer pageSize, Integer pageNumber, List<String> propertyPaths) {
-           return defaultService.findByIdentifier(clazz, identifier, identifierType, subtreeFilter, matchmode, includeEntity, pageSize, pageNumber, propertyPaths);
-       }
+    @Override
+    public <S extends TaxonBase>  Pager<FindByIdentifierDTO<S>> findByIdentifier(Class<S> clazz, String identifier, DefinedTerm identifierType, MatchMode matchmode, boolean includeEntity, Integer pageSize, Integer pageNumber, List<String> propertyPaths){
+        return defaultService.findByIdentifier(clazz, identifier, identifierType, matchmode, includeEntity, pageSize, pageNumber, propertyPaths);
+    }
 
     /* (non-Javadoc)
-     * @see eu.etaxonomy.cdm.api.service.ITaxonService#deleteSynonym(java.util.UUID, java.util.UUID, eu.etaxonomy.cdm.api.service.config.SynonymDeletionConfigurator)
+     * @see eu.etaxonomy.cdm.api.service.ITaxonService#findByIdentifier(java.lang.Class, java.lang.String, eu.etaxonomy.cdm.model.common.DefinedTerm, eu.etaxonomy.cdm.model.taxon.TaxonNode, eu.etaxonomy.cdm.persistence.query.MatchMode, boolean, java.lang.Integer, java.lang.Integer, java.util.List)
      */
     @Override
-    public DeleteResult deleteSynonym(UUID synonymUuid, UUID taxonUuid, SynonymDeletionConfigurator config) {
-        return defaultService.deleteSynonym(synonymUuid, taxonUuid, config);
+    public <S extends TaxonBase> Pager<FindByIdentifierDTO<S>> findByIdentifier(Class<S> clazz, String identifier,
+            DefinedTerm identifierType, TaxonNode subtreeFilter, MatchMode matchmode, boolean includeEntity,
+            Integer pageSize, Integer pageNumber, List<String> propertyPaths) {
+        return defaultService.findByIdentifier(clazz, identifier, identifierType, subtreeFilter, matchmode, includeEntity, pageSize, pageNumber, propertyPaths);
     }
 
+
+
     /* (non-Javadoc)
-     * @see eu.etaxonomy.cdm.api.service.IService#delete(java.util.UUID)
+     * @see eu.etaxonomy.cdm.api.service.ITaxonService#deleteSynonym(java.util.UUID, java.util.UUID, eu.etaxonomy.cdm.api.service.config.SynonymDeletionConfigurator)
      */
     @Override
-    public DeleteResult delete(UUID uuid) {
-        return defaultService.delete(uuid);
+    public DeleteResult deleteSynonym(UUID synonymUuid, UUID taxonUuid, SynonymDeletionConfigurator config) {
+        return defaultService.deleteSynonym(synonymUuid, taxonUuid, config);
     }
 
+
+
     /* (non-Javadoc)
      * @see eu.etaxonomy.cdm.api.service.ITaxonService#swapSynonymAndAcceptedTaxon(java.util.UUID, java.util.UUID)
      */
@@ -1451,7 +1447,25 @@ public class TransientTaxonService implements ITaxonService {
         return defaultService.deleteTaxon(taxonUuid, config, classificationUuid);
     }
 
+    @Override
+    public SynonymRelationship moveSynonymToAnotherTaxon(
+            SynonymRelationship oldSynonymRelation, UUID newTaxonUUID,
+            boolean moveHomotypicGroup,
+            SynonymRelationshipType newSynonymRelationshipType,
+            Reference reference, String referenceDetail, boolean keepReference)
+                    throws HomotypicalGroupChangeException {
 
+        return defaultService.moveSynonymToAnotherTaxon(oldSynonymRelation, newTaxonUUID, moveHomotypicGroup, newSynonymRelationshipType, reference, referenceDetail, keepReference);
+    }
 
 
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.cdm.api.service.IService#delete(java.util.UUID)
+     */
+    @Override
+    public DeleteResult delete(UUID uuid) {
+        return defaultService.delete(uuid);
+
+    }
+
 }