Revision c7dae22d
Added by Katja Luther about 8 years ago
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/config/TaxonBaseDeletionConfigurator.java | ||
---|---|---|
1 | 1 |
// $Id$ |
2 | 2 |
/** |
3 | 3 |
* Copyright (C) 2009 EDIT |
4 |
* European Distributed Institute of Taxonomy
|
|
4 |
* European Distributed Institute of Taxonomy |
|
5 | 5 |
* http://www.e-taxonomy.eu |
6 |
*
|
|
6 |
* |
|
7 | 7 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
8 | 8 |
* See LICENSE.TXT at the top of this package for the full license terms. |
9 | 9 |
*/ |
10 | 10 |
package eu.etaxonomy.cdm.api.service.config; |
11 | 11 |
|
12 |
import eu.etaxonomy.cdm.api.service.ITaxonService; |
|
13 |
import eu.etaxonomy.cdm.model.taxon.SynonymRelationship; |
|
14 |
|
|
12 | 15 |
/** |
13 | 16 |
* This class is used to configure taxonbase deletion. |
14 |
*
|
|
15 |
* @see ITaxonService#deleteTaxon(eu.etaxonomy.cdm.model.taxon.Taxon) and ITaxonService#deleteSynonym(eu.etaxonomy.cdm.model.taxon.Synonym)
|
|
16 |
*
|
|
17 |
* |
|
18 |
* @see ITaxonService#deleteTaxon(eu.etaxonomy.cdm.model.taxon.Taxon) and ITaxonService#deleteSynonym(eu.etaxonomy.cdm.model.taxon.Synonym) |
|
19 |
* |
|
17 | 20 |
* @author k.luther |
18 | 21 |
* @date 09.11.2011 |
19 | 22 |
* |
... | ... | |
21 | 24 |
public class TaxonBaseDeletionConfigurator extends DeleteConfiguratorBase{ |
22 | 25 |
|
23 | 26 |
private boolean deleteNameIfPossible = true; |
24 |
|
|
27 |
private boolean deleteSynonymRelations = true; |
|
28 |
|
|
25 | 29 |
private NameDeletionConfigurator nameDeletionConfig = new NameDeletionConfigurator(); |
26 |
|
|
30 |
|
|
27 | 31 |
/** |
28 | 32 |
* If true the taxons name will be deleted if this is possible. |
29 | 33 |
* It is possible if the name is not linked in a way that it can not be deleted. |
... | ... | |
38 | 42 |
public void setDeleteNameIfPossible(boolean deleteNameIfPossible) { |
39 | 43 |
this.deleteNameIfPossible = deleteNameIfPossible; |
40 | 44 |
} |
41 |
|
|
45 |
|
|
42 | 46 |
/** |
43 | 47 |
* The configurator for name deletion. Only evaluated if {@link #isDeleteNameIfPossible()} |
44 | 48 |
* is <code>true</code>. |
... | ... | |
54 | 58 |
public void setNameDeletionConfig(NameDeletionConfigurator nameDeletionConfig) { |
55 | 59 |
this.nameDeletionConfig = nameDeletionConfig; |
56 | 60 |
} |
61 |
|
|
62 |
/** |
|
63 |
* |
|
64 |
* If <code>true</code> all {@link SynonymRelationship relations from taxon to synonyms} will be |
|
65 |
* removed. |
|
66 |
* Synonyms itself will be removed depending on {@link #deleteSynonymsIfPossible}. |
|
67 |
* @return |
|
68 |
*/ |
|
69 |
public boolean isDeleteSynonymRelations() { |
|
70 |
return deleteSynonymRelations; |
|
71 |
} |
|
72 |
|
|
73 |
/** |
|
74 |
* @param deleteSynonymRelations the deleteSynonymRelations to set |
|
75 |
*/ |
|
76 |
public void setDeleteSynonymRelations(boolean deleteSynonymRelations) { |
|
77 |
this.deleteSynonymRelations = deleteSynonymRelations; |
|
78 |
} |
|
57 | 79 |
} |
Also available in: Unified diff
improve delete configurator for taxa and synonyms