1
|
/**
|
2
|
* Copyright (C) 2007 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
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.
|
8
|
*/
|
9
|
|
10
|
package eu.etaxonomy.cdm.io.common;
|
11
|
|
12
|
import org.apache.log4j.Logger;
|
13
|
|
14
|
|
15
|
/**
|
16
|
* @author a.mueller
|
17
|
* @created 11.05.2009
|
18
|
* @version 1.0
|
19
|
*/
|
20
|
public abstract class IoStateBase<CONFIG extends IIoConfigurator, IO extends ICdmIO> {
|
21
|
// public abstract class IoStateBase<CONFIG extends IIoConfigurator, IO extends ICdmIO<IoStateBase<CONFIG, IO>>> {
|
22
|
|
23
|
@SuppressWarnings("unused")
|
24
|
private static final Logger logger = Logger.getLogger(IoStateBase.class);
|
25
|
|
26
|
private IO currentIO;
|
27
|
|
28
|
private boolean success = true;
|
29
|
|
30
|
CONFIG config;
|
31
|
|
32
|
/**
|
33
|
* @return the config
|
34
|
*/
|
35
|
public CONFIG getConfig() {
|
36
|
return config;
|
37
|
}
|
38
|
|
39
|
/**
|
40
|
* @param config the config to set
|
41
|
*/
|
42
|
public void setConfig(CONFIG config) {
|
43
|
this.config = config;
|
44
|
}
|
45
|
|
46
|
/**
|
47
|
* @param config
|
48
|
*/
|
49
|
//TODO config not necessary ones it it implemented in constructor for Imports too.
|
50
|
public void initialize(CONFIG config){
|
51
|
this.config = config;
|
52
|
}
|
53
|
|
54
|
/**
|
55
|
* @param currentImport the currentImport to set
|
56
|
*/
|
57
|
public void setCurrentIO(IO currentIO) {
|
58
|
this.currentIO = currentIO;
|
59
|
}
|
60
|
|
61
|
/**
|
62
|
* @return the currentImport
|
63
|
*/
|
64
|
public IO getCurrentIO() {
|
65
|
return currentIO;
|
66
|
}
|
67
|
|
68
|
public void setSuccess(boolean success) {
|
69
|
this.success = success;
|
70
|
}
|
71
|
|
72
|
public void setUnsuccessfull(){
|
73
|
this.success = false;
|
74
|
}
|
75
|
|
76
|
public boolean isSuccess() {
|
77
|
return success;
|
78
|
}
|
79
|
|
80
|
|
81
|
}
|