2 * Copyright (C) 2008 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
7 package eu
.etaxonomy
.cdm
.io
.common
;
11 import org
.springframework
.security
.authentication
.UsernamePasswordAuthenticationToken
;
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
;
22 * @author a.babadshanjan
25 public interface IIoConfigurator
extends IIoObservable
{
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
32 public String
getSourceNameString();
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)
40 public String
getDestinationNameString();
44 * Returns the CdmApplicationController
47 public ICdmApplicationConfiguration
getCdmAppController();
51 * Sets the CdmApplicationController
52 * @param cdmApp the cdmApp to set
54 public void setCdmAppController(ICdmApplicationConfiguration cdmApp
);
57 * Get the way how the CDM schema is validated
58 * @see eu.etaxonomy.cdm.database.DbSchemaValidation
61 public DbSchemaValidation
getDbSchemaValidation();
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
70 public void setDbSchemaValidation(DbSchemaValidation dbSchemaValidation
);
74 * Returns the progress monitor.
77 public IProgressMonitor
getProgressMonitor();
80 * Sets the progress monitor.
81 * @see #getProgressMonitor()
84 public void setProgressMonitor(IProgressMonitor monitor
);
87 * Returns the observers for this import/export
90 public Set
<IIoObserver
> getObservers();
93 * Sets the observers for this import/export
96 public void setObservers(Set
<IIoObserver
> observers
);
98 public UsernamePasswordAuthenticationToken
getAuthenticationToken();
100 public void setAuthenticationToken(UsernamePasswordAuthenticationToken token
);
102 public void setAuthentication(String login
, String password
);
105 * Creates the UsernamePasswordAuthenticationToken for the default admin.
107 * @see Configuration#adminLogin
108 * @see Configuration#adminPassword
110 public void authenticateAsDefaultAdmin();