merge trunk into model change 3.6
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / service / config / TaxonBaseDeletionConfigurator.java
1 // $Id$
2 /**
3 * Copyright (C) 2009 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
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.
9 */
10 package eu.etaxonomy.cdm.api.service.config;
11
12 import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
13
14 /**
15 * This class is used to configure taxonbase deletion.
16 *
17 * @see ITaxonService#deleteTaxon(eu.etaxonomy.cdm.model.taxon.Taxon) and ITaxonService#deleteSynonym(eu.etaxonomy.cdm.model.taxon.Synonym)
18 *
19 * @author k.luther
20 * @date 09.11.2011
21 *
22 */
23 public class TaxonBaseDeletionConfigurator extends DeleteConfiguratorBase{
24
25 private boolean deleteNameIfPossible = true;
26
27 private NameDeletionConfigurator nameDeletionConfig = new NameDeletionConfigurator();
28
29 /**
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()
34 * @return
35 */
36 public boolean isDeleteNameIfPossible() {
37 return deleteNameIfPossible;
38 }
39
40 public void setDeleteNameIfPossible(boolean deleteNameIfPossible) {
41 this.deleteNameIfPossible = deleteNameIfPossible;
42 }
43
44 /**
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()
50 * @return
51 */
52 public NameDeletionConfigurator getNameDeletionConfig() {
53 return nameDeletionConfig;
54 }
55
56 public void setNameDeletionConfig(NameDeletionConfigurator nameDeletionConfig) {
57 this.nameDeletionConfig = nameDeletionConfig;
58 }
59 }