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 org
.apache
.logging
.log4j
.LogManager
;import org
.apache
.logging
.log4j
.Logger
;
13 import eu
.etaxonomy
.cdm
.api
.service
.ITermService
;
16 * This class is used to configure term deletion.
18 * @see ITermService#delete(eu.etaxonomy.cdm.common.DefinedTermBase)
23 public class TermDeletionConfigurator
extends DeleteConfiguratorBase
{
25 private static final long serialVersionUID
= 213038079829537335L;
26 @SuppressWarnings("unused")
27 private static final Logger logger
= LogManager
.getLogger(TermDeletionConfigurator
.class);
29 private boolean deleteIncludedTerms
= false;
31 private boolean deleteIncludedRelations
= false;
33 private boolean deletePartOfRelations
= true;
35 private boolean deleteGeneralizationOfRelations
= false;
37 private boolean deleteKindOfRelations
= true;
39 private boolean deleteMediaIfPossible
= false;
42 // * If <code>true</code> all included terms are also deleted (recursivly).<BR>
43 // * Default value is <code>true</code>.
45 // public boolean isDeleteIncludedTerms() {
46 // return deleteIncludedTerms;
48 // public void setDeleteIncludedTerms(boolean deleteIncludedTerms) {
49 // this.deleteIncludedTerms = deleteIncludedTerms;
53 * If <code>true</code> included terms will be attached to the parent
54 * of <code>this</code> term. If <code>this</code> term has no parent, included terms
55 * will become top level terms. <BR>
56 * Default value is <code>false</code>.
58 public boolean isDeleteIncludedRelations() {
59 return deleteIncludedRelations
;
61 public void setDeleteIncludedRelations(boolean deleteIncludedRelations
) {
62 this.deleteIncludedRelations
= deleteIncludedRelations
;
66 * If <code>true</code> <code>this</code> term will be detached from its parent
67 * term. If <code>false</code> the deletion will be aborted if <code>this</code>
68 * term is part of another term.<BR>
69 * Default value is <code>true</code>.
71 public boolean isDeletePartOfRelations() {
72 return deletePartOfRelations
;
74 public void setDeletePartOfRelations(boolean deletePartOfRelations
) {
75 this.deletePartOfRelations
= deletePartOfRelations
;
79 * If <code>true</code> more specific terms will be detached from this term prior to
80 * deletion. If <code>this</code> term has a generalization itself the specific terms will be
81 * attached to this generalization.<BR>
82 * If <code>false</code> deletion will be aborted if <code>this</code>
83 * term is a generalization of any another term.
85 * Default value is <code>false</code>.
87 public boolean isDeleteGeneralizationOfRelations() {
88 return deleteGeneralizationOfRelations
;
90 public void setDeleteGeneralizationOfRelations( boolean deleteGeneralizationOfRelations
) {
91 this.deleteGeneralizationOfRelations
= deleteGeneralizationOfRelations
;
95 * If <code>true</code> <code>this</code> term will be detached from the general term.
96 * If <code>false</code> the deletion will be aborted if <code>this</code>
97 * term is kind of another term.<BR>
98 * Default value is <code>true</code>.
100 public boolean isDeleteKindOfRelations() {
101 return deleteKindOfRelations
;
103 public void setDeleteKindOfRelations(boolean deleteKindOfRelations
) {
104 this.deleteKindOfRelations
= deleteKindOfRelations
;