1
|
/**
|
2
|
* Copyright (C) 2008 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*/
|
6
|
|
7
|
package eu.etaxonomy.cdm.io.common;
|
8
|
|
9
|
import java.util.Set;
|
10
|
|
11
|
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
12
|
|
13
|
import eu.etaxonomy.cdm.api.application.CdmApplicationController;
|
14
|
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
|
15
|
import eu.etaxonomy.cdm.common.monitor.IProgressMonitor;
|
16
|
import eu.etaxonomy.cdm.config.Configuration;
|
17
|
import eu.etaxonomy.cdm.database.DbSchemaValidation;
|
18
|
import eu.etaxonomy.cdm.io.common.events.IIoObserver;
|
19
|
|
20
|
|
21
|
/**
|
22
|
* @author a.babadshanjan
|
23
|
* @created 13.11.2008
|
24
|
*/
|
25
|
public interface IIoConfigurator extends IIoObservable{
|
26
|
|
27
|
/**
|
28
|
* A String representation of the used source may it be a source to be imported (e.g. "BerlinModel Cichorieae Database")
|
29
|
* or a source to be exported (e.g. "CDM Cichorieae Database")
|
30
|
* @return String representing the source for the io
|
31
|
*/
|
32
|
public String getSourceNameString();
|
33
|
|
34
|
|
35
|
/**
|
36
|
* A String representation of the destination may it be an import destination and therefore a CDM (e.g. CDM Cichorieae Database)
|
37
|
* or an export destination (e.g. CDM XML)
|
38
|
* @return
|
39
|
*/
|
40
|
public String getDestinationNameString();
|
41
|
|
42
|
|
43
|
/**
|
44
|
* Returns the CdmApplicationController
|
45
|
* @return
|
46
|
*/
|
47
|
public ICdmApplicationConfiguration getCdmAppController();
|
48
|
|
49
|
|
50
|
/**
|
51
|
* Sets the CdmApplicationController
|
52
|
* @param cdmApp the cdmApp to set
|
53
|
*/
|
54
|
public void setCdmAppController(ICdmApplicationConfiguration cdmApp);
|
55
|
|
56
|
/**
|
57
|
* Get the way how the CDM schema is validated
|
58
|
* @see eu.etaxonomy.cdm.database.DbSchemaValidation
|
59
|
* @return
|
60
|
*/
|
61
|
public DbSchemaValidation getDbSchemaValidation();
|
62
|
|
63
|
/**
|
64
|
* Get the way how the CDM schema is validated
|
65
|
* For exports values that delete the source (CREATE, CREATE_DROP) are not allowed and may throw an
|
66
|
* Exception in the further run
|
67
|
* @see eu.etaxonomy.cdm.database.DbSchemaValidation
|
68
|
* @param dbSchemaValidation
|
69
|
*/
|
70
|
public void setDbSchemaValidation(DbSchemaValidation dbSchemaValidation);
|
71
|
|
72
|
|
73
|
/**
|
74
|
* Returns the progress monitor.
|
75
|
* @return
|
76
|
*/
|
77
|
public IProgressMonitor getProgressMonitor();
|
78
|
|
79
|
/**
|
80
|
* Sets the progress monitor.
|
81
|
* @see #getProgressMonitor()
|
82
|
* @param monitor
|
83
|
*/
|
84
|
public void setProgressMonitor(IProgressMonitor monitor);
|
85
|
|
86
|
/**
|
87
|
* Returns the observers for this import/export
|
88
|
* @return
|
89
|
*/
|
90
|
public Set<IIoObserver> getObservers();
|
91
|
|
92
|
/**
|
93
|
* Sets the observers for this import/export
|
94
|
* @param observers
|
95
|
*/
|
96
|
public void setObservers(Set<IIoObserver> observers);
|
97
|
|
98
|
public UsernamePasswordAuthenticationToken getAuthenticationToken();
|
99
|
|
100
|
public void setAuthenticationToken(UsernamePasswordAuthenticationToken token);
|
101
|
|
102
|
public void setAuthentication(String login, String password);
|
103
|
|
104
|
/**
|
105
|
* Creates the UsernamePasswordAuthenticationToken for the default admin.
|
106
|
*
|
107
|
* @see Configuration#adminLogin
|
108
|
* @see Configuration#adminPassword
|
109
|
*/
|
110
|
public void authenticateAsDefaultAdmin();
|
111
|
|
112
|
}
|