3 * Copyright (C) 2009 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.cdm
.api
.service
.config
;
12 import eu
.etaxonomy
.cdm
.api
.service
.ITaxonNodeService
;
15 * This class is used to configure taxonbase deletion.
17 * @see ITaxonService#deleteTaxon(eu.etaxonomy.cdm.model.taxon.Taxon) and ITaxonService#deleteSynonym(eu.etaxonomy.cdm.model.taxon.Synonym)
23 public class TaxonBaseDeletionConfigurator
extends DeleteConfiguratorBase
{
25 private boolean deleteNameIfPossible
= 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
;