2 * Copyright (C) 2009 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
9 package eu
.etaxonomy
.cdm
.api
.service
.config
;
11 import eu
.etaxonomy
.cdm
.api
.service
.ITaxonService
;
14 * This class is used to configure taxonbase deletion.
16 * @see ITaxonService#deleteTaxon(eu.etaxonomy.cdm.model.taxon.Taxon) and ITaxonService#deleteSynonym(eu.etaxonomy.cdm.model.taxon.Synonym)
22 public class TaxonBaseDeletionConfigurator
extends DeleteConfiguratorBase
{
24 private boolean deleteNameIfPossible
= true;
25 private boolean deleteSynonymRelations
= true;
27 private NameDeletionConfigurator nameDeletionConfig
= new NameDeletionConfigurator();
30 * If true the taxons name will be deleted if this is possible.
31 * It is possible if the name is not linked in a way that it can not be deleted.
32 * This depends also on the {@link NameDeletionConfigurator}
33 * @see #getNameDeletionConfig()
36 public boolean isDeleteNameIfPossible() {
37 return deleteNameIfPossible
;
40 public void setDeleteNameIfPossible(boolean deleteNameIfPossible
) {
41 this.deleteNameIfPossible
= deleteNameIfPossible
;
45 * The configurator for name deletion. Only evaluated if {@link #isDeleteNameIfPossible()}
46 * is <code>true</code>.
47 * @see NameDeletionConfigurator
48 * @see #isDeleteNameIfPossible()
49 * @see #isDeleteSynonymsIfPossible()
52 public NameDeletionConfigurator
getNameDeletionConfig() {
53 return nameDeletionConfig
;
56 public void setNameDeletionConfig(NameDeletionConfigurator nameDeletionConfig
) {
57 this.nameDeletionConfig
= nameDeletionConfig
;
62 * If <code>true</code> all Synonym relations from taxon to synonyms will be
64 * Synonyms itself will be removed depending on {@link #deleteSynonymsIfPossible}.
67 public boolean isDeleteSynonymRelations() {
68 return deleteSynonymRelations
;
72 * @param deleteSynonymRelations the deleteSynonymRelations to set
74 public void setDeleteSynonymRelations(boolean deleteSynonymRelations
) {
75 this.deleteSynonymRelations
= deleteSynonymRelations
;