Revision 37c7b75c
Added by Andreas Müller over 2 years ago
app-import/src/main/java/eu/etaxonomy/cdm/app/wp6/palmae/PalmaePostImportUpdater.java | ||
---|---|---|
17 | 17 |
import org.springframework.transaction.TransactionStatus; |
18 | 18 |
|
19 | 19 |
import eu.etaxonomy.cdm.api.application.CdmApplicationController; |
20 |
import eu.etaxonomy.cdm.api.application.ICdmRepository; |
|
20 | 21 |
import eu.etaxonomy.cdm.app.common.CdmDestinations; |
21 | 22 |
import eu.etaxonomy.cdm.database.DbSchemaValidation; |
22 | 23 |
import eu.etaxonomy.cdm.database.ICdmDataSource; |
... | ... | |
51 | 52 |
try{ |
52 | 53 |
int count = 0; |
53 | 54 |
UUID featureTreeUuid = PalmaeActivator.featureTreeUuid; |
54 |
CdmApplicationController cdmApp = CdmApplicationController.NewInstance(dataSource, DbSchemaValidation.VALIDATE);
|
|
55 |
ICdmRepository cdmApp = CdmApplicationController.NewInstance(dataSource, DbSchemaValidation.VALIDATE);
|
|
55 | 56 |
|
56 | 57 |
TransactionStatus tx = cdmApp.startTransaction(); |
57 | 58 |
|
58 | 59 |
@SuppressWarnings("unchecked") |
59 |
TermTree<Feature> tree = cdmApp.getFeatureTreeService().find(featureTreeUuid);
|
|
60 |
TermTree<Feature> tree = cdmApp.getTermTreeService().find(featureTreeUuid);
|
|
60 | 61 |
TermNode<Feature> root = tree.getRoot(); |
61 | 62 |
|
62 | 63 |
List<Feature> featureList = cdmApp.getTermService().list(Feature.class, null, null, null, null); |
... | ... | |
91 | 92 |
public boolean updateNameUsage(ICdmDataSource dataSource) { |
92 | 93 |
try{ |
93 | 94 |
boolean result = true; |
94 |
CdmApplicationController cdmApp = CdmApplicationController.NewInstance(dataSource, DbSchemaValidation.VALIDATE);
|
|
95 |
ICdmRepository cdmApp = CdmApplicationController.NewInstance(dataSource, DbSchemaValidation.VALIDATE);
|
|
95 | 96 |
|
96 | 97 |
TransactionStatus tx = cdmApp.startTransaction(); |
97 | 98 |
|
... | ... | |
131 | 132 |
//add citation feature to feature tree |
132 | 133 |
UUID featureTreeUuid = PalmaeActivator.featureTreeUuid; |
133 | 134 |
@SuppressWarnings("unchecked") |
134 |
TermTree<Feature> tree = cdmApp.getFeatureTreeService().find(featureTreeUuid);
|
|
135 |
TermTree<Feature> tree = cdmApp.getTermTreeService().find(featureTreeUuid);
|
|
135 | 136 |
TermNode<Feature> root = tree.getRoot(); |
136 | 137 |
List<Feature> featureList = cdmApp.getTermService().list(Feature.class, null, null, null, null); |
137 | 138 |
count = 0; |
Also available in: Unified diff
cleanup and remove usage of feature tree service