Revision b9fdd7f4
Added by unknown about 7 years ago
app-import/src/main/java/eu/etaxonomy/cdm/app/images/AbstractImageImporter.java | ||
---|---|---|
1 | 1 |
/** |
2 | 2 |
* Copyright (C) 2007 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 |
*/ |
... | ... | |
14 | 14 |
|
15 | 15 |
import eu.etaxonomy.cdm.api.application.CdmApplicationController; |
16 | 16 |
import eu.etaxonomy.cdm.api.service.IAgentService; |
17 |
import eu.etaxonomy.cdm.api.service.IClassificationService; |
|
17 | 18 |
import eu.etaxonomy.cdm.api.service.ICommonService; |
18 | 19 |
import eu.etaxonomy.cdm.api.service.IDescriptionService; |
19 | 20 |
import eu.etaxonomy.cdm.api.service.IReferenceService; |
20 | 21 |
import eu.etaxonomy.cdm.api.service.ITaxonService; |
21 |
import eu.etaxonomy.cdm.api.service.IClassificationService; |
|
22 |
import eu.etaxonomy.cdm.io.common.CdmIoBase; |
|
23 |
import eu.etaxonomy.cdm.io.common.ICdmIO; |
|
22 |
import eu.etaxonomy.cdm.io.common.CdmImportBase; |
|
24 | 23 |
|
25 | 24 |
/** |
26 |
* |
|
27 | 25 |
* @author n.hoffmann |
28 | 26 |
* @created 11.11.2008 |
29 |
* @version 1.0 |
|
30 | 27 |
*/ |
31 |
public abstract class AbstractImageImporter extends CdmIoBase<ImageImportState> implements ICdmIO<ImageImportState> { |
|
32 |
private static final Logger logger = Logger.getLogger(AbstractImageImporter.class); |
|
33 |
|
|
28 |
public abstract class AbstractImageImporter |
|
29 |
extends CdmImportBase<ImageImportConfigurator, ImageImportState> { |
|
30 |
|
|
31 |
private static final long serialVersionUID = 6178173988325980060L; |
|
32 |
private static final Logger logger = Logger.getLogger(AbstractImageImporter.class); |
|
33 |
|
|
34 | 34 |
protected CdmApplicationController appCtr; |
35 |
|
|
35 |
|
|
36 | 36 |
protected CdmApplicationController cdmApp; |
37 | 37 |
protected ITaxonService taxonService; |
38 | 38 |
protected IClassificationService classificationService; |
... | ... | |
41 | 41 |
protected IDescriptionService descriptionService; |
42 | 42 |
protected IReferenceService referenceService; |
43 | 43 |
protected ICommonService commonService; |
44 |
|
|
44 |
|
|
45 | 45 |
/* (non-Javadoc) |
46 | 46 |
* @see eu.etaxonomy.cdm.io.common.CdmIoBase#doInvoke(eu.etaxonomy.cdm.io.common.IImportConfigurator, java.util.Map) |
47 | 47 |
*/ |
... | ... | |
49 | 49 |
public void doInvoke(ImageImportState state) { |
50 | 50 |
//cdmApp = config.getCdmAppController(); |
51 | 51 |
//if (config instanceof ImageImportConfigurator){ |
52 |
|
|
52 |
|
|
53 | 53 |
TransactionStatus status = startTransaction(); |
54 |
|
|
54 |
|
|
55 | 55 |
taxonService = getTaxonService(); |
56 | 56 |
agentService = getAgentService(); |
57 | 57 |
referenceService = getReferenceService(); |
... | ... | |
59 | 59 |
classificationService = getClassificationService(); |
60 | 60 |
|
61 | 61 |
invokeImageImport(state); |
62 |
|
|
62 |
|
|
63 | 63 |
commitTransaction(status); |
64 |
|
|
64 |
|
|
65 | 65 |
return; |
66 | 66 |
} |
67 | 67 |
|
68 | 68 |
/** |
69 |
* This method defines the image import.
|
|
69 |
* This method defines the image import. |
|
70 | 70 |
* It should take care of where to get the images from and what object they get attached to. |
71 |
*
|
|
71 |
* |
|
72 | 72 |
* @param config |
73 | 73 |
*/ |
74 | 74 |
protected abstract void invokeImageImport(ImageImportState state); |
... | ... | |
94 | 94 |
} |
95 | 95 |
|
96 | 96 |
|
97 |
|
|
97 |
|
|
98 | 98 |
} |
Also available in: Unified diff
cleanup