Revision 381bdda4
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/TaxonEditorInput.java | ||
---|---|---|
7 | 7 |
|
8 | 8 |
import eu.etaxonomy.cdm.api.service.ITaxonService; |
9 | 9 |
import eu.etaxonomy.cdm.api.service.config.DeleteConfiguratorBase; |
10 |
import eu.etaxonomy.cdm.api.service.config.FindTaxaAndNamesConfiguratorImpl; |
|
11 |
import eu.etaxonomy.cdm.api.service.config.IFindTaxaAndNamesConfigurator; |
|
12 | 10 |
import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator; |
13 | 11 |
import eu.etaxonomy.cdm.api.service.config.SynonymDeletionConfigurator; |
14 | 12 |
import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator; |
... | ... | |
17 | 15 |
import eu.etaxonomy.cdm.model.taxon.Synonym; |
18 | 16 |
import eu.etaxonomy.cdm.model.taxon.Taxon; |
19 | 17 |
import eu.etaxonomy.cdm.model.taxon.TaxonBase; |
20 |
import eu.etaxonomy.cdm.persistence.query.MatchMode; |
|
21 | 18 |
import eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator; |
22 | 19 |
import eu.etaxonomy.taxeditor.bulkeditor.input.entitycreator.TaxonCreator; |
23 | 20 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
... | ... | |
43 | 40 |
return instance; |
44 | 41 |
} |
45 | 42 |
|
46 |
|
|
47 |
@Override |
|
43 |
@Override |
|
48 | 44 |
public String getName() { |
49 | 45 |
return BulkEditorInputType.TAXON.label; |
50 | 46 |
} |
51 | 47 |
|
52 |
@Override |
|
53 |
public String getToolTipText() { |
|
54 |
return getName(); |
|
55 |
} |
|
56 |
|
|
57 |
|
|
58 | 48 |
/** |
59 | 49 |
* <p>getID</p> |
60 | 50 |
* |
... | ... | |
85 | 75 |
// IFindTaxaAndNamesConfigurator<TaxonBase> newConfig = new FindTaxaAndNamesConfiguratorImpl<TaxonBase>(); |
86 | 76 |
// newConfig.setTitleSearchString(configurator.getTitleSearchStringSqlized()); |
87 | 77 |
// newConfig.setMatchMode(MatchMode.ANYWHERE); |
88 |
|
|
78 |
|
|
89 | 79 |
List<TaxonBase> taxa = CdmStore.getSearchManager().findTaxa(configurator); |
90 | 80 |
List<TaxonBase> taxaCopy = new ArrayList<TaxonBase>(); |
91 | 81 |
for (TaxonBase taxon:taxa){ |
... | ... | |
117 | 107 |
if (config instanceof TaxonDeletionConfigurator){ |
118 | 108 |
taxonConfig = (TaxonDeletionConfigurator)config; |
119 | 109 |
}else{ |
120 |
|
|
110 |
|
|
121 | 111 |
} |
122 |
|
|
112 |
|
|
123 | 113 |
return CdmStore.getService(ITaxonService.class).deleteTaxon(entity.getUuid(), taxonConfig, null) != null; |
124 | 114 |
} else{ |
125 | 115 |
SynonymDeletionConfigurator synConfig = null; |
126 | 116 |
if (config instanceof SynonymDeletionConfigurator){ |
127 | 117 |
synConfig = (SynonymDeletionConfigurator)config; |
128 | 118 |
}else{ |
129 |
|
|
119 |
|
|
130 | 120 |
} |
131 |
|
|
121 |
|
|
132 | 122 |
return CdmStore.getService(ITaxonService.class).deleteSynonym(entity.getUuid(), synConfig) != null; |
133 | 123 |
} |
134 | 124 |
} |
Also available in: Unified diff
ref #6913 Remove IEditorInput dependency from bulk editor input