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
.log4j
.Logger
;
14 * This class is used to configure term deletion.
16 * @see ITermService#delete(eu.etaxonomy.cdm.common.DefinedTermBase)
22 public class TermDeletionConfigurator
extends DeleteConfiguratorBase
{
23 @SuppressWarnings("unused")
24 private static final Logger logger
= Logger
.getLogger(TermDeletionConfigurator
.class);
26 private boolean deleteIncludedTerms
= false;
28 private boolean deleteIncludedRelations
= false;
30 private boolean deletePartOfRelations
= true;
32 private boolean deleteGeneralizationOfRelations
= false;
34 private boolean deleteKindOfRelations
= true;
36 private boolean deleteMediaIfPossible
= false;
39 // * If <code>true</code> all included terms are also deleted (recursivly).<BR>
40 // * Default value is <code>true</code>.
42 // public boolean isDeleteIncludedTerms() {
43 // return deleteIncludedTerms;
45 // public void setDeleteIncludedTerms(boolean deleteIncludedTerms) {
46 // this.deleteIncludedTerms = deleteIncludedTerms;
50 * If <code>true</code> included terms will be attached to the parent
51 * of <code>this</code> term. If <code>this</code> term has no parent, included terms
52 * will become top level terms. <BR>
53 * Default value is <code>false</code>.
55 public boolean isDeleteIncludedRelations() {
56 return deleteIncludedRelations
;
58 public void setDeleteIncludedRelations(boolean deleteIncludedRelations
) {
59 this.deleteIncludedRelations
= deleteIncludedRelations
;
63 * 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>
65 * term is part of another term.<BR>
66 * Default value is <code>true</code>.
68 public boolean isDeletePartOfRelations() {
69 return deletePartOfRelations
;
71 public void setDeletePartOfRelations(boolean deletePartOfRelations
) {
72 this.deletePartOfRelations
= deletePartOfRelations
;
77 * If <code>true</code> more specific terms will be detached from this term prior to
78 * deletion. If <code>this</code> term has a generalization itself the specific terms will be
79 * attached to this generalization.<BR>
80 * If <code>false</code> deletion will be aborted if <code>this</code>
81 * term is a generalization of any another term.
83 * Default value is <code>false</code>.
85 public boolean isDeleteGeneralizationOfRelations() {
86 return deleteGeneralizationOfRelations
;
88 public void setDeleteGeneralizationOfRelations( boolean deleteGeneralizationOfRelations
) {
89 this.deleteGeneralizationOfRelations
= deleteGeneralizationOfRelations
;
93 * 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>
95 * term is kind of another term.<BR>
96 * Default value is <code>true</code>.
98 public boolean isDeleteKindOfRelations() {
99 return deleteKindOfRelations
;
101 public void setDeleteKindOfRelations(boolean deleteKindOfRelations
) {
102 this.deleteKindOfRelations
= deleteKindOfRelations
;