Revision ef165fe2
Added by Andreas Müller almost 3 years ago
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/config/TermDeletionConfigurator.java | ||
---|---|---|
1 | 1 |
/** |
2 | 2 |
* Copyright (C) 2009 EDIT |
3 |
* European Distributed Institute of Taxonomy
|
|
3 |
* European Distributed Institute of Taxonomy |
|
4 | 4 |
* http://www.e-taxonomy.eu |
5 |
*
|
|
5 |
* |
|
6 | 6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
7 | 7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
8 | 8 |
*/ |
... | ... | |
10 | 10 |
|
11 | 11 |
import org.apache.log4j.Logger; |
12 | 12 |
|
13 |
import eu.etaxonomy.cdm.api.service.ITermService; |
|
14 |
|
|
13 | 15 |
/** |
14 | 16 |
* This class is used to configure term deletion. |
15 |
*
|
|
17 |
* |
|
16 | 18 |
* @see ITermService#delete(eu.etaxonomy.cdm.common.DefinedTermBase) |
17 |
*
|
|
19 |
* |
|
18 | 20 |
* @author a.mueller |
19 | 21 |
* @since 09.11.2011 |
20 |
* |
|
21 | 22 |
*/ |
22 | 23 |
public class TermDeletionConfigurator extends DeleteConfiguratorBase { |
23 |
@SuppressWarnings("unused") |
|
24 |
|
|
25 |
private static final long serialVersionUID = 213038079829537335L; |
|
26 |
@SuppressWarnings("unused") |
|
24 | 27 |
private static final Logger logger = Logger.getLogger(TermDeletionConfigurator.class); |
25 | 28 |
|
26 | 29 |
private boolean deleteIncludedTerms = false; |
27 |
|
|
30 |
|
|
28 | 31 |
private boolean deleteIncludedRelations = false; |
29 | 32 |
|
30 | 33 |
private boolean deletePartOfRelations = true; |
31 |
|
|
34 |
|
|
32 | 35 |
private boolean deleteGeneralizationOfRelations = false; |
33 | 36 |
|
34 | 37 |
private boolean deleteKindOfRelations = true; |
... | ... | |
37 | 40 |
|
38 | 41 |
// /** |
39 | 42 |
// * If <code>true</code> all included terms are also deleted (recursivly).<BR> |
40 |
// * Default value is <code>true</code>.
|
|
43 |
// * Default value is <code>true</code>. |
|
41 | 44 |
// */ |
42 | 45 |
// public boolean isDeleteIncludedTerms() { |
43 | 46 |
// return deleteIncludedTerms; |
... | ... | |
50 | 53 |
* If <code>true</code> included terms will be attached to the parent |
51 | 54 |
* of <code>this</code> term. If <code>this</code> term has no parent, included terms |
52 | 55 |
* will become top level terms. <BR> |
53 |
* Default value is <code>false</code>.
|
|
56 |
* Default value is <code>false</code>. |
|
54 | 57 |
*/ |
55 | 58 |
public boolean isDeleteIncludedRelations() { |
56 | 59 |
return deleteIncludedRelations; |
... | ... | |
58 | 61 |
public void setDeleteIncludedRelations(boolean deleteIncludedRelations) { |
59 | 62 |
this.deleteIncludedRelations = deleteIncludedRelations; |
60 | 63 |
} |
61 |
|
|
64 |
|
|
62 | 65 |
/** |
63 | 66 |
* If <code>true</code> <code>this</code> term will be detached from its parent |
64 |
* term. If <code>false</code> the deletion will be aborted if <code>this</code>
|
|
67 |
* term. If <code>false</code> the deletion will be aborted if <code>this</code> |
|
65 | 68 |
* term is part of another term.<BR> |
66 |
* Default value is <code>true</code>.
|
|
69 |
* Default value is <code>true</code>. |
|
67 | 70 |
*/ |
68 | 71 |
public boolean isDeletePartOfRelations() { |
69 | 72 |
return deletePartOfRelations; |
... | ... | |
72 | 75 |
this.deletePartOfRelations = deletePartOfRelations; |
73 | 76 |
} |
74 | 77 |
|
75 |
|
|
76 | 78 |
/** |
77 | 79 |
* If <code>true</code> more specific terms will be detached from this term prior to |
78 | 80 |
* deletion. If <code>this</code> term has a generalization itself the specific terms will be |
79 | 81 |
* attached to this generalization.<BR> |
80 |
* If <code>false</code> deletion will be aborted if <code>this</code>
|
|
82 |
* If <code>false</code> deletion will be aborted if <code>this</code> |
|
81 | 83 |
* term is a generalization of any another term. |
82 | 84 |
* <BR> |
83 |
* Default value is <code>false</code>.
|
|
85 |
* Default value is <code>false</code>. |
|
84 | 86 |
*/ |
85 | 87 |
public boolean isDeleteGeneralizationOfRelations() { |
86 | 88 |
return deleteGeneralizationOfRelations; |
... | ... | |
88 | 90 |
public void setDeleteGeneralizationOfRelations( boolean deleteGeneralizationOfRelations) { |
89 | 91 |
this.deleteGeneralizationOfRelations = deleteGeneralizationOfRelations; |
90 | 92 |
} |
91 |
|
|
93 |
|
|
92 | 94 |
/** |
93 | 95 |
* If <code>true</code> <code>this</code> term will be detached from the general term. |
94 |
* If <code>false</code> the deletion will be aborted if <code>this</code>
|
|
96 |
* If <code>false</code> the deletion will be aborted if <code>this</code> |
|
95 | 97 |
* term is kind of another term.<BR> |
96 |
* Default value is <code>true</code>.
|
|
98 |
* Default value is <code>true</code>. |
|
97 | 99 |
*/ |
98 | 100 |
public boolean isDeleteKindOfRelations() { |
99 | 101 |
return deleteKindOfRelations; |
... | ... | |
101 | 103 |
public void setDeleteKindOfRelations(boolean deleteKindOfRelations) { |
102 | 104 |
this.deleteKindOfRelations = deleteKindOfRelations; |
103 | 105 |
} |
104 |
|
|
105 |
} |
|
106 |
} |
Also available in: Unified diff
cleanup