Project

General

Profile

Revision 41356809

ID41356809907128cc0b175ce4757fcc678e3c5da2
Parent be652f06
Child 7f6cc57e

Added by Andreas Kohlbecker over 3 years ago

ref #6419 renaming ICdmApplicationDefaultConfiguration to ICdmRepository

View differences:

cdmlib-ext/src/main/java/eu/etaxonomy/cdm/ext/bci/BciServiceWrapper.java
30 30

  
31 31
import com.ibm.lsid.MalformedLSIDException;
32 32

  
33
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
33
import eu.etaxonomy.cdm.api.application.ICdmRepository;
34 34
import eu.etaxonomy.cdm.common.CdmUtils;
35 35
import eu.etaxonomy.cdm.ext.common.SchemaAdapterBase;
36 36
import eu.etaxonomy.cdm.ext.common.ServiceWrapperBase;
......
83 83
	 * @return
84 84
	 */
85 85
	@Override
86
    public List<Collection> getCollectionsByCode(String code, ICdmApplicationConfiguration appConfig){
86
    public List<Collection> getCollectionsByCode(String code, ICdmRepository appConfig){
87 87

  
88 88
		SchemaAdapterBase<Collection> schemaAdapter = schemaAdapterMap.get("recordSchema");
89 89
		if(schemaAdapter == null){
......
129 129
	 * @param restRequest
130 130
	 * @return
131 131
	*/
132
	private List<? extends IdentifiableEntity> queryService(String request, ICdmApplicationConfiguration appConfig, URL serviceUrl, ServiceType serviceType){
132
	private List<? extends IdentifiableEntity> queryService(String request, ICdmRepository appConfig, URL serviceUrl, ServiceType serviceType){
133 133
		try {
134 134
            // create the request url
135 135
            URL newUrl = new URL(serviceUrl.getProtocol(),
......
179 179
    }
180 180

  
181 181

  
182
	private List<Collection> buildCollectionList(InputStream content, ICdmApplicationConfiguration appConfig) throws IOException {
182
	private List<Collection> buildCollectionList(InputStream content, ICdmRepository appConfig) throws IOException {
183 183
		List<Collection> result = new ArrayList<Collection>();
184 184
		BufferedReader reader = new BufferedReader (new InputStreamReader(content));
185 185

  
......
196 196
	}
197 197

  
198 198

  
199
	private Collection getCollectionFromLine(String line, ICdmApplicationConfiguration appConfig) {
199
	private Collection getCollectionFromLine(String line, ICdmRepository appConfig) {
200 200
		//urn:lsid:biocol.org:col:15727	http://biocol.org/urn:lsid:biocol.org:col:15727	University of Bergen Herbarium
201 201
		String[] splits = line.split("\t");
202 202
		if (splits.length != 3){
......
237 237
	}
238 238

  
239 239

  
240
	private Reference getBciCitation(ICdmApplicationConfiguration appConfig) {
240
	private Reference getBciCitation(ICdmRepository appConfig) {
241 241
		Reference bciReference;
242 242
		if (appConfig != null){
243 243
			bciReference = appConfig.getReferenceService().find(uuidBci);
cdmlib-ext/src/main/java/eu/etaxonomy/cdm/ext/bci/IBciServiceWrapper.java
12 12
import java.util.List;
13 13
import java.util.UUID;
14 14

  
15
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
15
import eu.etaxonomy.cdm.api.application.ICdmRepository;
16 16
import eu.etaxonomy.cdm.model.occurrence.Collection;
17 17

  
18 18

  
......
41 41
	 * @param appConfig
42 42
	 * @return
43 43
	 */
44
	public List<Collection> getCollectionsByCode(String code, ICdmApplicationConfiguration appConfig);
44
	public List<Collection> getCollectionsByCode(String code, ICdmRepository appConfig);
45 45
	
46 46
	public URL getServiceUrl(String url);
47 47

  
cdmlib-ext/src/main/java/eu/etaxonomy/cdm/ext/ipni/IIpniService.java
13 13
import java.util.List;
14 14
import java.util.UUID;
15 15

  
16
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
16
import eu.etaxonomy.cdm.api.application.ICdmRepository;
17 17
import eu.etaxonomy.cdm.ext.ipni.IpniService.IpniRank;
18 18
import eu.etaxonomy.cdm.model.agent.Person;
19 19
import eu.etaxonomy.cdm.model.common.ExtensionType;
......
107 107
	 * @param appConfig
108 108
	 * @return
109 109
	 */
110
	public List<Person> getAuthors(String abbreviation, String surname, String forename, String isoCountry, ICdmApplicationConfiguration appConfig, IpniServiceAuthorConfigurator config);
110
	public List<Person> getAuthors(String abbreviation, String surname, String forename, String isoCountry, ICdmRepository appConfig, IpniServiceAuthorConfigurator config);
111 111

  
112 112

  
113 113
	/**
......
125 125
	 * @param appConfig
126 126
	 * @return
127 127
	 */
128
	public List<BotanicalName> getNamesSimple(String wholeName, ICdmApplicationConfiguration services, IpniServiceNamesConfigurator config);
128
	public List<BotanicalName> getNamesSimple(String wholeName, ICdmRepository services, IpniServiceNamesConfigurator config);
129 129
	
130 130
	/**
131 131
	 * Returns the name matching the id parameter according to the IPNI Quick search function.
......
193 193
			IpniRank ipniRankToReturn,
194 194
			Boolean sortByFamily,
195 195
			IpniServiceNamesConfigurator config,
196
			ICdmApplicationConfiguration appConfig);
196
			ICdmRepository appConfig);
197 197

  
198 198
	/**
199
	 * As {@link #getNamesAdvanced(String, String, String, String, String, String, String, Boolean, Boolean, String, Boolean, Boolean, Boolean, IpniRank, Boolean, IpniServiceNamesConfigurator, ICdmApplicationConfiguration)}
199
	 * As {@link #getNamesAdvanced(String, String, String, String, String, String, String, Boolean, Boolean, String, Boolean, Boolean, Boolean, IpniRank, Boolean, IpniServiceNamesConfigurator, ICdmRepository)}
200 200
	 * but using CDM Rank instead of IpniRank. The CDM Rank is transformed into an IpniRank so it returns all
201 201
	 * names that are in the same IpniRange as the CDM rank. Therefore when using CDM rank 'variety' also a 
202 202
	 * 'subspecies' may be returned as 'variety' and 'subspecies' are within the same IpniRange 'Infraspecific'.  
......
230 230
			Rank rankRangeToReturn,
231 231
			Boolean sortByFamily,
232 232
			IpniServiceNamesConfigurator config,
233
			ICdmApplicationConfiguration appConfig);
233
			ICdmRepository appConfig);
234 234
	
235 235
	/**
236 236
	 * Returns a list of publications matching the title and/or the abbreviation parameter according to the IPNI Publication search function.
......
246 246
	 * @param config for finetuning, maybe null
247 247
	 * @return
248 248
	 */
249
	public List<Reference> getPublications(String title, String abbreviation, ICdmApplicationConfiguration services, IpniServicePublicationConfigurator config);
249
	public List<Reference> getPublications(String title, String abbreviation, ICdmRepository services, IpniServicePublicationConfigurator config);
250 250

  
251 251
	public URL getServiceUrl(String url);
252 252
}
cdmlib-ext/src/main/java/eu/etaxonomy/cdm/ext/ipni/IpniService.java
28 28
import org.apache.log4j.Logger;
29 29
import org.springframework.stereotype.Component;
30 30

  
31
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
31
import eu.etaxonomy.cdm.api.application.ICdmRepository;
32 32
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
33 33
import eu.etaxonomy.cdm.common.CdmUtils;
34 34
import eu.etaxonomy.cdm.common.UriUtils;
......
218 218
	 * @see eu.etaxonomy.cdm.ext.ipni.IIpniService#getAuthors(java.lang.String, java.lang.String, java.lang.String, java.lang.String, eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration, eu.etaxonomy.cdm.ext.ipni.IpniServiceAuthorConfigurator)
219 219
	 */
220 220
	@Override
221
    public List<Person> getAuthors(String abbreviation, String surname, String forename, String isoCountry, ICdmApplicationConfiguration services, IpniServiceAuthorConfigurator config){
221
    public List<Person> getAuthors(String abbreviation, String surname, String forename, String isoCountry, ICdmRepository services, IpniServiceAuthorConfigurator config){
222 222
		//config
223 223
		if (config == null){
224 224
			config = new IpniServiceAuthorConfigurator();
......
249 249
	 * @param restRequest
250 250
	 * @return
251 251
	*/
252
	private List<? extends IdentifiableEntity> queryService(String request, ICdmApplicationConfiguration services, URL serviceUrl, IIpniServiceConfigurator config, ServiceType serviceType){
252
	private List<? extends IdentifiableEntity> queryService(String request, ICdmRepository services, URL serviceUrl, IIpniServiceConfigurator config, ServiceType serviceType){
253 253
		if (config == null){
254 254
			throw new NullPointerException("Ipni service configurator should not be null");
255 255
		}
......
333 333

  
334 334

  
335 335

  
336
	private List<Reference> buildPublicationList( InputStream content, ICdmApplicationConfiguration services, IIpniServiceConfigurator iConfig) throws IOException {
336
	private List<Reference> buildPublicationList( InputStream content, ICdmRepository services, IIpniServiceConfigurator iConfig) throws IOException {
337 337
		IpniServicePublicationConfigurator config = (IpniServicePublicationConfigurator)iConfig;
338 338

  
339 339
		List<Reference> result = new ArrayList<Reference>();
......
360 360
	 * @param config
361 361
	 * @return
362 362
	 */
363
	private Reference getPublicationFromLine(String line, Map<Integer, String> parameterMap, ICdmApplicationConfiguration appConfig, IpniServicePublicationConfigurator config) {
363
	private Reference getPublicationFromLine(String line, Map<Integer, String> parameterMap, ICdmRepository appConfig, IpniServicePublicationConfigurator config) {
364 364
		//fill value map
365 365
		String[] splits = line.split("%");
366 366

  
......
433 433
	}
434 434

  
435 435

  
436
	private List<TaxonNameBase<?,?>> buildNameList( InputStream content, ICdmApplicationConfiguration appConfig, IIpniServiceConfigurator iConfig) throws IOException {
436
	private List<TaxonNameBase<?,?>> buildNameList( InputStream content, ICdmRepository appConfig, IIpniServiceConfigurator iConfig) throws IOException {
437 437
		IpniServiceNamesConfigurator config = (IpniServiceNamesConfigurator)iConfig;
438 438
		List<TaxonNameBase<?,?>> result = new ArrayList<>();
439 439
		BufferedReader reader = new BufferedReader (new InputStreamReader(content));
......
455 455
	}
456 456

  
457 457

  
458
	private IBotanicalName getNameFromLine(String line, Map<Integer, String> parameterMap, ICdmApplicationConfiguration appConfig) {
458
	private IBotanicalName getNameFromLine(String line, Map<Integer, String> parameterMap, ICdmRepository appConfig) {
459 459
		//Id%Version%Standard form%Default author forename%Default author surname%Taxon groups%Dates%Alternative names
460 460
		String[] splits = line.split("%");
461 461
		Map<String, String> valueMap = new HashMap<String, String>();
......
662 662
	}
663 663

  
664 664

  
665
	private List<Person> buildAuthorList(InputStream content, ICdmApplicationConfiguration services, IIpniServiceConfigurator iConfig) throws IOException {
665
	private List<Person> buildAuthorList(InputStream content, ICdmRepository services, IIpniServiceConfigurator iConfig) throws IOException {
666 666
		IpniServiceAuthorConfigurator config = (IpniServiceAuthorConfigurator)iConfig;
667 667
		List<Person> result = new ArrayList<Person>();
668 668
		BufferedReader reader = new BufferedReader (new InputStreamReader(content));
......
696 696
	}
697 697

  
698 698

  
699
	private Person getAuthorFromLine(String line, Map<Integer, String> categoryMap, ICdmApplicationConfiguration appConfig, IpniServiceAuthorConfigurator config) {
699
	private Person getAuthorFromLine(String line, Map<Integer, String> categoryMap, ICdmRepository appConfig, IpniServiceAuthorConfigurator config) {
700 700
		//Id%Version%Standard form%Default author forename%Default author surname%Taxon groups%Dates%Alternative names
701 701
		String[] splits = line.split("%");
702 702
		Map<String, String> valueMap = new HashMap<String, String>();
......
738 738
	}
739 739

  
740 740

  
741
	private Reference getIpniCitation(ICdmApplicationConfiguration appConfig) {
741
	private Reference getIpniCitation(ICdmRepository appConfig) {
742 742
		Reference ipniReference;
743 743
		if (appConfig != null){
744 744
			ipniReference = appConfig.getReferenceService().find(uuidIpni);
......
783 783
			Rank rankInRangeToReturn,
784 784
			Boolean sortByFamily,
785 785
			IpniServiceNamesConfigurator config,
786
			ICdmApplicationConfiguration services){
786
			ICdmRepository services){
787 787
		IpniRank ipniRank = IpniRank.valueOf(rankInRangeToReturn);
788 788
		return getNamesAdvanced(family, genus, species, infraFamily, infraGenus, infraSpecies, authorAbbrev, includePublicationAuthors, includeBasionymAuthors, publicationTitle, isAPNIRecord, isGCIRecord, isIKRecord, ipniRank, sortByFamily, config, services);
789 789
	}
......
799 799
			IpniRank rankToReturn,
800 800
			Boolean sortByFamily,
801 801
			IpniServiceNamesConfigurator config,
802
			ICdmApplicationConfiguration services) {
802
			ICdmRepository services) {
803 803

  
804 804
//		find_rankToReturn=all&output_format=normal&find_sortByFamily=on&find_sortByFamily=off&query_type=by_query&back_page=plantsearch
805 805

  
......
860 860
	 * @see eu.etaxonomy.cdm.ext.IIpniService#getNamesSimple(java.lang.String, eu.etaxonomy.cdm.ext.IIpniService.DelimitedFormat, eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration)
861 861
	 */
862 862
	@Override
863
    public List<BotanicalName> getNamesSimple(String wholeName, ICdmApplicationConfiguration services, IpniServiceNamesConfigurator config){
863
    public List<BotanicalName> getNamesSimple(String wholeName, ICdmRepository services, IpniServiceNamesConfigurator config){
864 864
		if (config == null){
865 865
			config = new IpniServiceNamesConfigurator();
866 866
		}
......
882 882
	 * @see eu.etaxonomy.cdm.ext.IIpniService#getPublications(java.lang.String, java.lang.String, boolean, eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration)
883 883
	 */
884 884
	@Override
885
    public List<Reference> getPublications(String title, String abbreviation, ICdmApplicationConfiguration services, IpniServicePublicationConfigurator config){
885
    public List<Reference> getPublications(String title, String abbreviation, ICdmRepository services, IpniServicePublicationConfigurator config){
886 886
//		http://www.uk.ipni.org/ipni/advPublicationSearch.do?find_title=Spe*plant*&find_abbreviation=&output_format=normal&query_type=by_query&back_page=publicationsearch
887 887
//		http://www.uk.ipni.org/ipni/advPublicationSearch.do?find_title=*Hortus+Britannicus*&find_abbreviation=&output_format=delimited-classic&output_format=delimited
888 888

  
cdmlib-ext/src/test/java/eu/etaxonomy/cdm/ext/bci/BciServiceTest.java
10 10
import org.junit.Ignore;
11 11
import org.junit.Test;
12 12

  
13
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
13
import eu.etaxonomy.cdm.api.application.ICdmRepository;
14 14
import eu.etaxonomy.cdm.ext.ipni.IIpniService;
15 15
import eu.etaxonomy.cdm.model.occurrence.Collection;
16 16

  
......
46 46
	@Test
47 47
	@Ignore // service is under refactoring 
48 48
	public void testGetCollectionsByCode(){
49
		ICdmApplicationConfiguration config = null;
49
		ICdmRepository config = null;
50 50
		List<Collection> collectionList = service1.getCollectionsByCode("BG", config);
51 51
		//expected web service result: urn:lsid:biocol.org:col:15727	http://biocol.org/urn:lsid:biocol.org:col:15727	University of Bergen Herbarium
52 52

  
cdmlib-ext/src/test/java/eu/etaxonomy/cdm/ext/ipni/IpniServiceTest.java
14 14
import org.unitils.dbunit.annotation.DataSet;
15 15
import org.unitils.dbunit.annotation.DataSets;
16 16

  
17
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
17
import eu.etaxonomy.cdm.api.application.ICdmRepository;
18 18
import eu.etaxonomy.cdm.common.UriUtils;
19 19
import eu.etaxonomy.cdm.ext.ipni.IIpniService.DelimitedFormat;
20 20
import eu.etaxonomy.cdm.ext.ipni.IpniService.IpniRank;
......
70 70
	        @DataSet(value="/eu/etaxonomy/cdm/database/TermsDataSet-with_auditing_info.xml")
71 71
	        })
72 72
	public void testGetAuthors(){
73
		ICdmApplicationConfiguration services = null;
73
		ICdmRepository services = null;
74 74
		IpniServiceAuthorConfigurator config = new IpniServiceAuthorConfigurator();
75 75
		config.setFormat(DelimitedFormat.EXTENDED);
76 76
		List<Person> authorList = service1.getAuthors(null, "Greuter", null, null, services, config);
......
123 123
        @DataSet(value="/eu/etaxonomy/cdm/database/TermsDataSet-with_auditing_info.xml")
124 124
        })
125 125
	public void testGetNamesSimple(){
126
		ICdmApplicationConfiguration services = null;
126
		ICdmRepository services = null;
127 127
		IpniServiceNamesConfigurator config = null;
128 128
		List<BotanicalName> nameList = service1.getNamesSimple("Abies albertiana", services, config);
129 129
		//expected web service result: 3379-1%1.1%Greuter%Werner Rodolfo%Greuter%PS%1938-%>Greuter, Werner Rodolfo
......
150 150
        @DataSet(value="/eu/etaxonomy/cdm/database/TermsDataSet-with_auditing_info.xml")
151 151
        })
152 152
	public void testGetNamesAdvanced(){
153
		ICdmApplicationConfiguration services = null;
153
		ICdmRepository services = null;
154 154
		IpniServiceNamesConfigurator config = new IpniServiceNamesConfigurator();
155 155

  
156 156
		//http://www.uk.ipni.org/ipni/advPlantNameSearch.do?find_family=&find_genus=Abies&find_species=alba&find_infrafamily=&find_infragenus=&find_infraspecies=&find_authorAbbrev=B*&find_includePublicationAuthors=on&find_includePublicationAuthors=off&find_includeBasionymAuthors=on&find_includeBasionymAuthors=off&find_publicationTitle=&find_isAPNIRecord=on&find_isAPNIRecord=false&find_isGCIRecord=on&find_isGCIRecord=false&find_isIKRecord=on&find_isIKRecord=false&find_rankToReturn=infraspec&output_format=normal&find_sortByFamily=on&find_sortByFamily=off&query_type=by_query&back_page=plantsearch
......
195 195
        @DataSet(value="/eu/etaxonomy/cdm/database/TermsDataSet-with_auditing_info.xml")
196 196
        })
197 197
	public void testPublications(){
198
		ICdmApplicationConfiguration services = null;
198
		ICdmRepository services = null;
199 199
		IpniServicePublicationConfigurator config = null;
200 200
		List<Reference> refList = service1.getPublications("Species Plantarum, Edition 3", "Sp. Pl.", services, config);
201 201
		//20009158-1%1.2%Pinaceae%%N%Abies%%N%alba%apennina%subsp.%Brullo, Scelsi & Spamp.%%Brullo, Scelsi & Spamp.%Abies alba subsp. apennina%Vegetaz. Aspromonte%41 (2001)%2001%%%%%%Italy%tax. nov.
......
235 235

  
236 236
	@Test
237 237
	public void testNameID(){
238
		ICdmApplicationConfiguration services = null;
238
		ICdmRepository services = null;
239 239
		IpniServiceNamesConfigurator config = null;
240 240
		InputStream content = service1.getNamesById("416415-1");
241 241

  
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/common/CdmDefaultIOBase.java
10 10
import org.springframework.core.io.ClassPathResource;
11 11

  
12 12
import eu.etaxonomy.cdm.api.application.CdmApplicationController;
13
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
13
import eu.etaxonomy.cdm.api.application.ICdmRepository;
14 14
import eu.etaxonomy.cdm.database.DbSchemaValidation;
15 15
import eu.etaxonomy.cdm.database.ICdmDataSource;
16 16

  
......
28 28
	public static final String DEFAULT_IO_APPLICATION_CONTEXT_RESOURCE = "/eu/etaxonomy/cdm/defaultIoApplicationContext.xml";
29 29

  
30 30

  
31
	protected ICdmApplicationConfiguration cdmApp = null;
31
	protected ICdmRepository cdmApp = null;
32 32

  
33 33
	/**
34 34
	 * Creates a new {@link CdmApplicationController} if it does not exist yet
......
74 74
	 *
75 75
	 * @return the cdmApp
76 76
	 */
77
	public ICdmApplicationConfiguration getCdmAppController() {
77
	public ICdmRepository getCdmAppController() {
78 78
		return this.cdmApp;
79 79
	}
80 80

  
......
82 82
	 * @param cdmApp
83 83
	 *            the cdmApp to set
84 84
	 */
85
	public void setCdmAppController(ICdmApplicationConfiguration cdmApp) {
85
	public void setCdmAppController(ICdmRepository cdmApp) {
86 86
		this.cdmApp = cdmApp;
87 87
	}
88 88

  
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/common/ExportConfiguratorBase.java
9 9
import org.apache.log4j.Logger;
10 10

  
11 11
import eu.etaxonomy.cdm.api.application.CdmApplicationController;
12
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
12
import eu.etaxonomy.cdm.api.application.ICdmRepository;
13 13
import eu.etaxonomy.cdm.database.ICdmDataSource;
14 14
import eu.etaxonomy.cdm.io.common.mapping.out.IExportTransformer;
15 15
import eu.etaxonomy.cdm.model.reference.IDatabase;
......
151 151
	 * Returns a new instance of <code>CdmApplicationController</code> created by the values of this configuration.
152 152
	 * @return
153 153
	 */
154
	public ICdmApplicationConfiguration getNewCdmAppController(){
154
	public ICdmRepository getNewCdmAppController(){
155 155
		return getCdmAppController(true, false);
156 156
	}
157 157

  
......
161 161
	 * been created before a new controller is returned.
162 162
	 * @return
163 163
	 */
164
	public ICdmApplicationConfiguration getCdmAppController(boolean createNew){
164
	public ICdmRepository getCdmAppController(boolean createNew){
165 165
		return getCdmAppController(createNew, false);
166 166
	}
167 167

  
......
172 172
	 * been created before a new controller is returned.
173 173
	 * @return
174 174
	 */
175
	public ICdmApplicationConfiguration getCdmAppController(boolean createNew, boolean omitTermLoading){
175
	public ICdmRepository getCdmAppController(boolean createNew, boolean omitTermLoading){
176 176
		if (cdmApp == null || createNew == true){
177 177
			cdmApp = CdmApplicationController.NewInstance(this.getSource(), this.getDbSchemaValidation(), omitTermLoading);
178 178
		}
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/common/IIoConfigurator.java
10 10

  
11 11
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
12 12

  
13
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
13
import eu.etaxonomy.cdm.api.application.ICdmRepository;
14 14
import eu.etaxonomy.cdm.common.monitor.IProgressMonitor;
15 15
import eu.etaxonomy.cdm.config.Configuration;
16 16
import eu.etaxonomy.cdm.database.DbSchemaValidation;
......
43 43
	 * Returns the CdmApplicationController
44 44
	 * @return
45 45
	 */
46
	public ICdmApplicationConfiguration getCdmAppController();
46
	public ICdmRepository getCdmAppController();
47 47

  
48 48
	
49 49
	/**
50 50
	 * Sets the CdmApplicationController
51 51
	 * @param cdmApp the cdmApp to set
52 52
	 */
53
	public void setCdmAppController(ICdmApplicationConfiguration cdmApp);
53
	public void setCdmAppController(ICdmRepository cdmApp);
54 54

  
55 55
	/**
56 56
	 * Get the way how the CDM schema is validated
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/common/IoConfiguratorBase.java
12 12
import org.apache.log4j.Logger;
13 13
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
14 14

  
15
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
15
import eu.etaxonomy.cdm.api.application.ICdmRepository;
16 16
import eu.etaxonomy.cdm.common.monitor.IProgressMonitor;
17 17
import eu.etaxonomy.cdm.common.monitor.NullProgressMonitor;
18 18
import eu.etaxonomy.cdm.config.Configuration;
......
34 34
//	protected Class<ICdmIO>[] ioClassList;
35 35
	private DbSchemaValidation dbSchemaValidation = DbSchemaValidation.VALIDATE;
36 36
	
37
	protected ICdmApplicationConfiguration cdmApp = null;
37
	protected ICdmRepository cdmApp = null;
38 38
	
39 39
	//authentification token
40 40
	UsernamePasswordAuthenticationToken authenticationToken;
......
61 61
		this.dbSchemaValidation = dbSchemaValidation;
62 62
	}
63 63
	
64
	public ICdmApplicationConfiguration getCdmAppController(){
64
	public ICdmRepository getCdmAppController(){
65 65
		return this.cdmApp;
66 66
	}
67 67

  
68 68
	/**
69 69
	 * @param cdmApp the cdmApp to set
70 70
	 */
71
	public void setCdmAppController(ICdmApplicationConfiguration cdmApp) {
71
	public void setCdmAppController(ICdmRepository cdmApp) {
72 72
		this.cdmApp = cdmApp;
73 73
	}
74 74
		
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/SpecimenImportBase.java
20 20

  
21 21
import org.apache.log4j.Logger;
22 22

  
23
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
23
import eu.etaxonomy.cdm.api.application.ICdmRepository;
24 24
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
25 25
import eu.etaxonomy.cdm.api.service.config.FindOccurrencesConfigurator;
26 26
import eu.etaxonomy.cdm.api.service.pager.Pager;
......
550 550
	     * @param state
551 551
	     */
552 552
	    protected UUID save(CdmBase cdmBase, SpecimenImportStateBase state) {
553
	        ICdmApplicationConfiguration cdmRepository = state.getConfig().getCdmAppController();
553
	        ICdmRepository cdmRepository = state.getConfig().getCdmAppController();
554 554
	        if (cdmRepository == null){
555 555
	            cdmRepository = this;
556 556
	        }
......
583 583

  
584 584

  
585 585
	    protected SpecimenOrObservationBase findExistingSpecimen(String unitId, SpecimenImportStateBase state){
586
	        ICdmApplicationConfiguration cdmAppController = state.getConfig().getCdmAppController();
586
	        ICdmRepository cdmAppController = state.getConfig().getCdmAppController();
587 587
	        if(cdmAppController==null){
588 588
	            cdmAppController = this;
589 589
	        }
......
1026 1026

  
1027 1027
	    private boolean existsInClassification(Taxon taxon, Classification classification, STATE state){
1028 1028
	        boolean exist = false;
1029
	        ICdmApplicationConfiguration cdmAppController = state.getConfig().getCdmAppController();
1029
	        ICdmRepository cdmAppController = state.getConfig().getCdmAppController();
1030 1030
            if(cdmAppController==null){
1031 1031
                cdmAppController = this;
1032 1032
            }
......
1096 1096
	                    logger.info("specimenTypeDesignationstatus :"+ specimenTypeDesignationstatus);
1097 1097
	                }
1098 1098

  
1099
	                ICdmApplicationConfiguration cdmAppController = config.getCdmAppController();
1099
	                ICdmRepository cdmAppController = config.getCdmAppController();
1100 1100
	                if(cdmAppController == null){
1101 1101
	                    cdmAppController = this;
1102 1102
	                }
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/SpecimenImportStateBase.java
14 14

  
15 15
import org.springframework.transaction.TransactionStatus;
16 16

  
17
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
17
import eu.etaxonomy.cdm.api.application.ICdmRepository;
18 18
import eu.etaxonomy.cdm.io.common.CdmImportBase;
19 19
import eu.etaxonomy.cdm.io.common.ImportStateBase;
20 20
import eu.etaxonomy.cdm.io.common.MapWrapper;
......
48 48

  
49 49
    private TransactionStatus tx;
50 50

  
51
    private ICdmApplicationConfiguration cdmRepository;
51
    private ICdmRepository cdmRepository;
52 52
    private Classification classification = null;
53 53
    private Classification defaultClassification = null;
54 54
    private Reference ref = null;
......
173 173
        this.tx = tx;
174 174
    }
175 175

  
176
    public ICdmApplicationConfiguration getCdmRepository() {
176
    public ICdmRepository getCdmRepository() {
177 177
        return cdmRepository;
178 178
    }
179 179

  
180
    public void setCdmRepository(ICdmApplicationConfiguration cdmRepository) {
180
    public void setCdmRepository(ICdmRepository cdmRepository) {
181 181
        this.cdmRepository = cdmRepository;
182 182
    }
183 183

  
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/abcd206/in/Abcd206Import.java
26 26
import org.w3c.dom.Element;
27 27
import org.w3c.dom.NodeList;
28 28

  
29
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
29
import eu.etaxonomy.cdm.api.application.ICdmRepository;
30 30
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
31 31
import eu.etaxonomy.cdm.ext.occurrence.bioCase.BioCaseQueryServiceWrapper;
32 32
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
......
365 365
            logger.info("handleSingleUnit "+state.getRef());
366 366
        }
367 367
        try {
368
            ICdmApplicationConfiguration cdmAppController = state.getConfig().getCdmAppController();
368
            ICdmRepository cdmAppController = state.getConfig().getCdmAppController();
369 369
            if(cdmAppController==null){
370 370
                cdmAppController = this;
371 371
            }
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/abcd206/in/AbcdParseUtility.java
23 23
import org.w3c.dom.Node;
24 24
import org.w3c.dom.NodeList;
25 25

  
26
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
26
import eu.etaxonomy.cdm.api.application.ICdmRepository;
27 27
import eu.etaxonomy.cdm.common.CdmUtils;
28 28
import eu.etaxonomy.cdm.model.reference.Reference;
29 29
import eu.etaxonomy.cdm.model.reference.ReferenceFactory;
......
120 120
        return date;
121 121
    }
122 122

  
123
    public static Reference parseFirstReference(NodeList referenceNodeList, ICdmApplicationConfiguration cdmAppController){
123
    public static Reference parseFirstReference(NodeList referenceNodeList, ICdmRepository cdmAppController){
124 124
        String referenceCitation = AbcdParseUtility.parseFirstTextContent(referenceNodeList);
125 125
        //check if reference already exists
126 126
        List<Reference> matchingReferences = cdmAppController.getReferenceService().findByTitle(Reference.class, referenceCitation, MatchMode.EXACT, null, null, null, null, null).getRecords();
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/abcd206/in/AbcdPersonParser.java
13 13
import org.w3c.dom.Element;
14 14
import org.w3c.dom.NodeList;
15 15

  
16
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
16
import eu.etaxonomy.cdm.api.application.ICdmRepository;
17 17
import eu.etaxonomy.cdm.model.agent.AgentBase;
18 18
import eu.etaxonomy.cdm.model.agent.Person;
19 19
import eu.etaxonomy.cdm.persistence.query.MatchMode;
......
29 29

  
30 30
    private final SpecimenImportReport report;
31 31

  
32
    private final ICdmApplicationConfiguration cdmAppController;
32
    private final ICdmRepository cdmAppController;
33 33

  
34 34

  
35
    public AbcdPersonParser(String prefix, SpecimenImportReport report, ICdmApplicationConfiguration cdmAppController) {
35
    public AbcdPersonParser(String prefix, SpecimenImportReport report, ICdmRepository cdmAppController) {
36 36
        this.prefix = prefix;
37 37
        this.report = report;
38 38
        this.cdmAppController = cdmAppController;
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/abcd206/in/UnitAssociationParser.java
18 18
import org.apache.log4j.Logger;
19 19
import org.w3c.dom.Element;
20 20

  
21
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
21
import eu.etaxonomy.cdm.api.application.ICdmRepository;
22 22
import eu.etaxonomy.cdm.ext.occurrence.OccurenceQuery;
23 23
import eu.etaxonomy.cdm.ext.occurrence.bioCase.BioCaseQueryServiceWrapper;
24 24

  
......
35 35

  
36 36
    private final SpecimenImportReport report;
37 37

  
38
    private final ICdmApplicationConfiguration cdmAppController;
38
    private final ICdmRepository cdmAppController;
39 39

  
40
    public UnitAssociationParser(String prefix, SpecimenImportReport report, ICdmApplicationConfiguration cdmAppController) {
40
    public UnitAssociationParser(String prefix, SpecimenImportReport report, ICdmRepository cdmAppController) {
41 41
        this.prefix = prefix;
42 42
        this.report = report;
43 43
        this.cdmAppController = cdmAppController;
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/abcd206/in/molecular/AbcdDnaParser.java
15 15
import org.w3c.dom.Node;
16 16
import org.w3c.dom.NodeList;
17 17

  
18
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
18
import eu.etaxonomy.cdm.api.application.ICdmRepository;
19 19
import eu.etaxonomy.cdm.io.specimen.abcd206.in.Abcd206ImportState;
20 20
import eu.etaxonomy.cdm.io.specimen.abcd206.in.AbcdParseUtility;
21 21
import eu.etaxonomy.cdm.io.specimen.abcd206.in.AbcdPersonParser;
......
40 40

  
41 41
    private final SpecimenImportReport report;
42 42

  
43
    private final ICdmApplicationConfiguration cdmAppController;
43
    private final ICdmRepository cdmAppController;
44 44

  
45
    public AbcdDnaParser(String prefix, SpecimenImportReport report, ICdmApplicationConfiguration cdmAppController) {
45
    public AbcdDnaParser(String prefix, SpecimenImportReport report, ICdmRepository cdmAppController) {
46 46
        this.prefix = prefix;
47 47
        this.report = report;
48 48
        this.cdmAppController = cdmAppController;
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/abcd206/in/molecular/AbcdGgbnParser.java
17 17
import org.w3c.dom.Node;
18 18
import org.w3c.dom.NodeList;
19 19

  
20
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
20
import eu.etaxonomy.cdm.api.application.ICdmRepository;
21 21
import eu.etaxonomy.cdm.io.specimen.abcd206.in.Abcd206ImportState;
22 22
import eu.etaxonomy.cdm.io.specimen.abcd206.in.AbcdParseUtility;
23 23
import eu.etaxonomy.cdm.io.specimen.abcd206.in.SpecimenImportReport;
......
63 63

  
64 64
    private final SpecimenImportReport report;
65 65

  
66
    private final ICdmApplicationConfiguration cdmAppController;
66
    private final ICdmRepository cdmAppController;
67 67

  
68
    public AbcdGgbnParser(SpecimenImportReport report, ICdmApplicationConfiguration cdmAppController) {
68
    public AbcdGgbnParser(SpecimenImportReport report, ICdmRepository cdmAppController) {
69 69
        this.report = report;
70 70
        this.cdmAppController = cdmAppController;
71 71
    }
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/gbif/in/GbifImport.java
23 23
import org.apache.log4j.Logger;
24 24
import org.springframework.stereotype.Component;
25 25

  
26
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
26
import eu.etaxonomy.cdm.api.application.ICdmRepository;
27 27
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
28 28
import eu.etaxonomy.cdm.ext.occurrence.gbif.GbifQueryServiceWrapper;
29 29
import eu.etaxonomy.cdm.ext.occurrence.gbif.GbifResponse;
......
303 303
        logger.info("handleSingleUnit "+state.getRef());
304 304
    }
305 305

  
306
        ICdmApplicationConfiguration cdmAppController = state.getConfig().getCdmAppController();
306
        ICdmRepository cdmAppController = state.getConfig().getCdmAppController();
307 307
        if(cdmAppController==null){
308 308
            cdmAppController = this;
309 309
        }
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/gbif/in/GbifImportState.java
14 14

  
15 15
import org.springframework.transaction.TransactionStatus;
16 16

  
17
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
17
import eu.etaxonomy.cdm.api.application.ICdmRepository;
18 18
import eu.etaxonomy.cdm.io.specimen.SpecimenImportStateBase;
19 19
import eu.etaxonomy.cdm.io.specimen.abcd206.in.AbcdTransformer;
20 20
import eu.etaxonomy.cdm.io.specimen.abcd206.in.SpecimenImportReport;
......
36 36

  
37 37

  
38 38

  
39
    private ICdmApplicationConfiguration cdmRepository;
39
    private ICdmRepository cdmRepository;
40 40

  
41 41
    private String prefix;
42 42

  
......
93 93

  
94 94

  
95 95
    @Override
96
    public ICdmApplicationConfiguration getCdmRepository() {
96
    public ICdmRepository getCdmRepository() {
97 97
        return cdmRepository;
98 98
    }
99 99

  
100 100

  
101 101
    @Override
102
    public void setCdmRepository(ICdmApplicationConfiguration cdmRepository) {
102
    public void setCdmRepository(ICdmRepository cdmRepository) {
103 103
        this.cdmRepository = cdmRepository;
104 104
    }
105 105

  
cdmlib-print/src/main/java/eu/etaxonomy/cdm/print/LocalXMLEntityFactory.java
23 23
import org.springframework.stereotype.Component;
24 24
import org.springframework.web.servlet.ModelAndView;
25 25

  
26
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
26
import eu.etaxonomy.cdm.api.application.ICdmRepository;
27 27
import eu.etaxonomy.cdm.common.monitor.IProgressMonitor;
28 28
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
29 29
import eu.etaxonomy.cdm.print.XMLHelper.EntityType;
......
55 55
    private final JsonView xmlView;
56 56

  
57 57
    @Autowired
58
    private final ICdmApplicationConfiguration applicationConfiguration;
58
    private final ICdmRepository applicationConfiguration;
59 59

  
60 60
    @Autowired
61 61
    private JsonConfig jsonConfig;
......
93 93
     * @param monitor
94 94
     */
95 95
    protected LocalXMLEntityFactory(
96
            ICdmApplicationConfiguration applicationConfiguration,
96
            ICdmRepository applicationConfiguration,
97 97
            IProgressMonitor monitor) {
98 98
        this.applicationConfiguration = applicationConfiguration;
99 99
        this.monitor = monitor;
cdmlib-print/src/main/java/eu/etaxonomy/cdm/print/PublishConfigurator.java
21 21
import org.jdom.Element;
22 22

  
23 23
import eu.etaxonomy.cdm.api.application.CdmApplicationController;
24
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
24
import eu.etaxonomy.cdm.api.application.ICdmRepository;
25 25
import eu.etaxonomy.cdm.common.monitor.IProgressMonitor;
26 26
import eu.etaxonomy.cdm.common.monitor.NullProgressMonitor;
27 27
import eu.etaxonomy.cdm.print.out.IPublishOutputModule;
......
41 41

  
42 42
	private static final long serialVersionUID = 4896190792717383839L;
43 43

  
44
	private ICdmApplicationConfiguration applicationConfiguration;
44
	private ICdmRepository applicationConfiguration;
45 45

  
46 46
	private URL webserviceUrl;
47 47

  
......
80 80
	 * @return
81 81
	 */
82 82
	public static PublishConfigurator NewLocalInstance(
83
			ICdmApplicationConfiguration applicationConfiguration) {
83
			ICdmRepository applicationConfiguration) {
84 84
		PublishConfigurator configurator = new PublishConfigurator();
85 85
		configurator.setLocal();
86 86
		configurator.setApplicationConfiguration(applicationConfiguration);
......
360 360
	 * @return the {@link CdmApplicationController} or null if <code>this</code>
361 361
	 *         is a {@linkplain #isRemote() remote} instance
362 362
	 */
363
	public ICdmApplicationConfiguration getApplicationConfiguration() {
363
	public ICdmRepository getApplicationConfiguration() {
364 364
		return applicationConfiguration;
365 365
	}
366 366

  
......
369 369
	 * @param applicationConfiguration
370 370
	 */
371 371
	private void setApplicationConfiguration(
372
			ICdmApplicationConfiguration applicationConfiguration) {
372
			ICdmRepository applicationConfiguration) {
373 373
		this.applicationConfiguration = applicationConfiguration;
374 374
	}
375 375

  
cdmlib-print/src/test/java/eu/etaxonomy/cdm/print/PubTest.java
18 18
import org.springframework.core.io.ClassPathResource;
19 19
import org.springframework.core.io.Resource;
20 20

  
21
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
21
import eu.etaxonomy.cdm.api.application.ICdmRepository;
22 22
import eu.etaxonomy.cdm.common.CdmUtils;
23 23
import eu.etaxonomy.cdm.common.monitor.DefaultProgressMonitor;
24 24
import eu.etaxonomy.cdm.common.monitor.IProgressMonitor;
......
58 58
		//Connecting to a CDMDataSource
59 59
		///Resource resource =  new ClassPathResource(CdmDefaultIOBase.DEFAULT_IO_APPLICATION_CONTEXT_RESOURCE);
60 60
		Resource resource =  new ClassPathResource(DEFAULT_PRINT_APPLICATION_CONTEXT_RESOURCE);
61
		ICdmApplicationConfiguration app = CdmIoApplicationController.NewInstance(resource, dataSource, DbSchemaValidation.VALIDATE, false, progressMonitor);
61
		ICdmRepository app = CdmIoApplicationController.NewInstance(resource, dataSource, DbSchemaValidation.VALIDATE, false, progressMonitor);
62 62
		//ICdmApplicationConfiguration app = CdmApplicationController.NewInstance(resource, dataSource, DbSchemaValidation.VALIDATE, false, progressMonitor);
63 63
		//configurator = PublishConfigurator.NewLocalInstance(CdmStore.getCurrentApplicationConfiguration());//from taxeditor GeneratePdfHandler
64 64
		configurator = PublishConfigurator.NewLocalInstance(app);
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationController.java
81 81
/**
82 82
 * @author a.mueller
83 83
 */
84
public class CdmApplicationController implements ICdmApplicationConfiguration {
84
public class CdmApplicationController implements ICdmRepository {
85 85
	private static final Logger logger = Logger.getLogger(CdmApplicationController.class);
86 86

  
87 87
	public static final String DEFAULT_APPLICATION_CONTEXT_RESOURCE = "/eu/etaxonomy/cdm/defaultApplicationContext.xml";
88 88

  
89 89
	public AbstractApplicationContext applicationContext;
90
	protected ICdmApplicationConfiguration configuration;
90
	protected ICdmRepository configuration;
91 91
	private final Resource applicationContextResource;
92 92

  
93 93
	private final IProgressMonitor progressMonitor;
......
403 403
				logger.info(beanName);
404 404
			}
405 405
		}
406
		configuration = (ICdmApplicationConfiguration) applicationContext.getBean("cdmApplicationDefaultConfiguration");
406
		configuration = (ICdmRepository) applicationContext.getBean("cdmApplicationDefaultConfiguration");
407 407
		try {
408 408
			//FIXME:Remoting catching exection to allow for remoting
409 409
			getDatabaseService().setApplicationController(this);
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/application/CdmRepository.java
78 78
 * @version 1.0
79 79
 */
80 80
@Component
81
public class CdmRepository implements ICdmApplicationConfiguration, ApplicationContextAware {
81
public class CdmRepository implements ICdmRepository, ApplicationContextAware {
82 82
	private static final Logger logger = Logger.getLogger(CdmRepository.class);
83 83

  
84 84
	protected ApplicationContext applicationContext;
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/application/ICdmApplicationConfiguration.java
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.api.application;
11

  
12
import org.springframework.security.authentication.ProviderManager;
13
import org.springframework.transaction.PlatformTransactionManager;
14
import org.springframework.transaction.TransactionStatus;
15

  
16
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
17
import eu.etaxonomy.cdm.api.service.IAgentService;
18
import eu.etaxonomy.cdm.api.service.IAnnotationService;
19
import eu.etaxonomy.cdm.api.service.IClassificationService;
20
import eu.etaxonomy.cdm.api.service.ICollectionService;
21
import eu.etaxonomy.cdm.api.service.ICommonService;
22
import eu.etaxonomy.cdm.api.service.IDatabaseService;
23
import eu.etaxonomy.cdm.api.service.IDescriptionService;
24
import eu.etaxonomy.cdm.api.service.IEntityConstraintViolationService;
25
import eu.etaxonomy.cdm.api.service.IEntityValidationService;
26
import eu.etaxonomy.cdm.api.service.IEventBaseService;
27
import eu.etaxonomy.cdm.api.service.IFeatureNodeService;
28
import eu.etaxonomy.cdm.api.service.IFeatureTreeService;
29
import eu.etaxonomy.cdm.api.service.IGrantedAuthorityService;
30
import eu.etaxonomy.cdm.api.service.IGroupService;
31
import eu.etaxonomy.cdm.api.service.IIdentificationKeyService;
32
import eu.etaxonomy.cdm.api.service.ILocationService;
33
import eu.etaxonomy.cdm.api.service.IMediaService;
34
import eu.etaxonomy.cdm.api.service.IMetadataService;
35
import eu.etaxonomy.cdm.api.service.INameService;
36
import eu.etaxonomy.cdm.api.service.IOccurrenceService;
37
import eu.etaxonomy.cdm.api.service.IPolytomousKeyNodeService;
38
import eu.etaxonomy.cdm.api.service.IPolytomousKeyService;
39
import eu.etaxonomy.cdm.api.service.IPreferenceService;
40
import eu.etaxonomy.cdm.api.service.IProgressMonitorService;
41
import eu.etaxonomy.cdm.api.service.IReferenceService;
42
import eu.etaxonomy.cdm.api.service.IService;
43
import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
44
import eu.etaxonomy.cdm.api.service.ITaxonService;
45
import eu.etaxonomy.cdm.api.service.ITermService;
46
import eu.etaxonomy.cdm.api.service.IUserService;
47
import eu.etaxonomy.cdm.api.service.IVocabularyService;
48
import eu.etaxonomy.cdm.api.service.IWorkingSetService;
49
import eu.etaxonomy.cdm.api.service.molecular.IAmplificationService;
50
import eu.etaxonomy.cdm.api.service.molecular.IPrimerService;
51
import eu.etaxonomy.cdm.api.service.molecular.ISequenceService;
52
import eu.etaxonomy.cdm.model.common.CdmBase;
53
import eu.etaxonomy.cdm.persistence.hibernate.permission.CdmPermissionEvaluator;
54
import eu.etaxonomy.cdm.persistence.hibernate.permission.ICdmPermissionEvaluator;
55

  
56
/**
57
 * @author a.mueller
58
 * @created 21.05.2008
59
 */
60
public interface ICdmApplicationConfiguration{
61

  
62

  
63
    public TransactionStatus startTransaction();
64

  
65
    public TransactionStatus startTransaction(Boolean readOnly);
66

  
67
    public void commitTransaction(TransactionStatus tx);
68

  
69

  
70
	public Object getBean(String string);
71

  
72

  
73
	   /**
74
     * @return
75
     */
76
    public IAnnotationService getAnnotationService();
77

  
78
	/**
79
	 * @return
80
	 */
81
	public INameService getNameService();
82

  
83

  
84
	/**
85
	 * @return
86
	 */
87
	public ITaxonService getTaxonService();
88

  
89

  
90
	/**
91
	 * @return
92
	 */
93
	public IClassificationService getClassificationService();
94

  
95

  
96
	/**
97
	 *
98
	 * @return
99
	 */
100
	public ITaxonNodeService getTaxonNodeService();
101

  
102

  
103
	/**
104
	 * @return
105
	 */
106
	public IReferenceService getReferenceService();
107

  
108

  
109
	/**
110
	 * @return
111
	 */
112
	public IAgentService getAgentService();
113

  
114

  
115
	/**
116
	 * @return
117
	 */
118
	public IDescriptionService getDescriptionService();
119

  
120

  
121
	/**
122
	 * @return
123
	 */
124
	public IOccurrenceService getOccurrenceService();
125

  
126

  
127
	/**
128
	 * @return
129
	 */
130
	public IPrimerService getPrimerService();
131

  
132

  
133
	/**
134
	 * @return
135
	 */
136
	public IAmplificationService getAmplificationService();
137

  
138

  
139
	/**
140
	 * @return
141
	 */
142
	public ISequenceService getSequenceService();
143

  
144
	public IEventBaseService getEventBaseService();
145

  
146

  
147
	/**
148
	 * @return
149
	 */
150
	public IMediaService getMediaService();
151

  
152
   /**
153
     * @return
154
     */
155
    public IMetadataService getMetadataService();
156

  
157

  
158
	/**
159
	 * @return
160
	 */
161
	public IDatabaseService getDatabaseService();
162

  
163

  
164
	/**
165
	 * @return
166
	 */
167
	public ITermService getTermService();
168

  
169

  
170
	/**
171
	 * @return
172
	 */
173
	public ICommonService getCommonService();
174

  
175

  
176
	/**
177
	 *
178
	 * @return
179
	 */
180
	public ILocationService getLocationService();
181

  
182

  
183
	/**
184
	 *
185
	 * @return
186
	 */
187
	public IUserService getUserService();
188

  
189

  
190
	/**
191
	 *
192
	 * @return
193
	 */
194
	public IGroupService getGroupService();
195

  
196
	/**
197
    *
198
    * @return
199
    */
200
   public IPreferenceService getPreferenceService();
201

  
202
	/**
203
	 *
204
	 * @return
205
	 */
206
	public IGrantedAuthorityService getGrantedAuthorityService();
207

  
208

  
209
	/**
210
	 * @return
211
	 */
212
	public IService<CdmBase> getMainService();
213

  
214

  
215
	/**
216
	 * @return
217
	 */
218
	public IWorkingSetService getWorkingSetService();
219

  
220

  
221
	/**
222
	 * @return
223
	 */
224
	public PlatformTransactionManager getTransactionManager();
225

  
226

  
227
	/**
228
	 *
229
	 * @return
230
	 */
231
	public ProviderManager getAuthenticationManager();
232

  
233

  
234
	/**
235
	 * @return
236
	 */
237
	public ConversationHolder NewConversation();
238

  
239

  
240
	/**
241
	 *
242
	 * @return
243
	 */
244
	public ICollectionService getCollectionService();
245

  
246

  
247
	/**
248
	 *
249
	 * @return
250
	 */
251
	public IFeatureTreeService getFeatureTreeService();
252

  
253

  
254
	/**
255
	 *
256
	 * @return
257
	 */
258
	public IFeatureNodeService getFeatureNodeService();
259

  
260

  
261
	/**
262
	 *
263
	 * @return
264
	 */
265
	public IVocabularyService getVocabularyService();
266

  
267

  
268
	/**
269
	 * @return
270
	 */
271
	public IIdentificationKeyService getIdentificationKeyService();
272

  
273

  
274
	/**
275
	 * @return
276
	 */
277
	public IPolytomousKeyService getPolytomousKeyService();
278

  
279

  
280
	/**
281
	 * @return
282
	 */
283
	public IPolytomousKeyNodeService getPolytomousKeyNodeService();
284

  
285
	/**
286
     * @return
287
     */
288
	public IProgressMonitorService getProgressMonitorService();
289

  
290
	/**
291
	 * @return
292
	 */
293
	public IEntityValidationService getEntityValidationService();
294

  
295

  
296
	/**
297
	 * @return
298
	 */
299
	public IEntityConstraintViolationService getEntityConstraintViolationService();
300

  
301

  
302
	/**
303
	 * @return the configured PermissionEvaluator, usually the
304
	 *         {@link CdmPermissionEvaluator}
305
	 */
306
	public ICdmPermissionEvaluator getPermissionEvaluator();
307

  
308

  
309
	void authenticate(String username, String password);
310

  
311
}
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/application/ICdmRepository.java
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.api.application;
11

  
12
import org.springframework.security.authentication.ProviderManager;
13
import org.springframework.transaction.PlatformTransactionManager;
14
import org.springframework.transaction.TransactionStatus;
15

  
16
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
17
import eu.etaxonomy.cdm.api.service.IAgentService;
18
import eu.etaxonomy.cdm.api.service.IAnnotationService;
19
import eu.etaxonomy.cdm.api.service.IClassificationService;
20
import eu.etaxonomy.cdm.api.service.ICollectionService;
21
import eu.etaxonomy.cdm.api.service.ICommonService;
22
import eu.etaxonomy.cdm.api.service.IDatabaseService;
23
import eu.etaxonomy.cdm.api.service.IDescriptionService;
24
import eu.etaxonomy.cdm.api.service.IEntityConstraintViolationService;
25
import eu.etaxonomy.cdm.api.service.IEntityValidationService;
26
import eu.etaxonomy.cdm.api.service.IEventBaseService;
27
import eu.etaxonomy.cdm.api.service.IFeatureNodeService;
28
import eu.etaxonomy.cdm.api.service.IFeatureTreeService;
29
import eu.etaxonomy.cdm.api.service.IGrantedAuthorityService;
30
import eu.etaxonomy.cdm.api.service.IGroupService;
31
import eu.etaxonomy.cdm.api.service.IIdentificationKeyService;
32
import eu.etaxonomy.cdm.api.service.ILocationService;
33
import eu.etaxonomy.cdm.api.service.IMediaService;
34
import eu.etaxonomy.cdm.api.service.IMetadataService;
35
import eu.etaxonomy.cdm.api.service.INameService;
36
import eu.etaxonomy.cdm.api.service.IOccurrenceService;
37
import eu.etaxonomy.cdm.api.service.IPolytomousKeyNodeService;
38
import eu.etaxonomy.cdm.api.service.IPolytomousKeyService;
39
import eu.etaxonomy.cdm.api.service.IPreferenceService;
40
import eu.etaxonomy.cdm.api.service.IProgressMonitorService;
41
import eu.etaxonomy.cdm.api.service.IReferenceService;
42
import eu.etaxonomy.cdm.api.service.IService;
43
import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
44
import eu.etaxonomy.cdm.api.service.ITaxonService;
45
import eu.etaxonomy.cdm.api.service.ITermService;
46
import eu.etaxonomy.cdm.api.service.IUserService;
47
import eu.etaxonomy.cdm.api.service.IVocabularyService;
48
import eu.etaxonomy.cdm.api.service.IWorkingSetService;
49
import eu.etaxonomy.cdm.api.service.molecular.IAmplificationService;
50
import eu.etaxonomy.cdm.api.service.molecular.IPrimerService;
51
import eu.etaxonomy.cdm.api.service.molecular.ISequenceService;
52
import eu.etaxonomy.cdm.model.common.CdmBase;
53
import eu.etaxonomy.cdm.persistence.hibernate.permission.CdmPermissionEvaluator;
54
import eu.etaxonomy.cdm.persistence.hibernate.permission.ICdmPermissionEvaluator;
55

  
56
/**
57
 * @author a.mueller
58
 * @created 21.05.2008
59
 */
60
public interface ICdmRepository{
61

  
62

  
63
    public TransactionStatus startTransaction();
64

  
65
    public TransactionStatus startTransaction(Boolean readOnly);
66

  
67
    public void commitTransaction(TransactionStatus tx);
68

  
69

  
70
	public Object getBean(String string);
71

  
72

  
73
	   /**
74
     * @return
75
     */
76
    public IAnnotationService getAnnotationService();
77

  
78
	/**
79
	 * @return
80
	 */
81
	public INameService getNameService();
82

  
83

  
84
	/**
85
	 * @return
86
	 */
87
	public ITaxonService getTaxonService();
88

  
89

  
90
	/**
91
	 * @return
92
	 */
93
	public IClassificationService getClassificationService();
94

  
95

  
96
	/**
97
	 *
98
	 * @return
99
	 */
100
	public ITaxonNodeService getTaxonNodeService();
101

  
102

  
103
	/**
104
	 * @return
105
	 */
106
	public IReferenceService getReferenceService();
107

  
108

  
109
	/**
110
	 * @return
111
	 */
112
	public IAgentService getAgentService();
113

  
114

  
115
	/**
116
	 * @return
117
	 */
118
	public IDescriptionService getDescriptionService();
119

  
120

  
121
	/**
122
	 * @return
123
	 */
124
	public IOccurrenceService getOccurrenceService();
125

  
126

  
127
	/**
128
	 * @return
129
	 */
130
	public IPrimerService getPrimerService();
131

  
132

  
133
	/**
134
	 * @return
135
	 */
136
	public IAmplificationService getAmplificationService();
137

  
138

  
139
	/**
140
	 * @return
141
	 */
142
	public ISequenceService getSequenceService();
143

  
144
	public IEventBaseService getEventBaseService();
145

  
146

  
147
	/**
148
	 * @return
149
	 */
150
	public IMediaService getMediaService();
151

  
152
   /**
153
     * @return
154
     */
155
    public IMetadataService getMetadataService();
156

  
157

  
158
	/**
159
	 * @return
160
	 */
161
	public IDatabaseService getDatabaseService();
162

  
163

  
164
	/**
165
	 * @return
166
	 */
167
	public ITermService getTermService();
168

  
169

  
170
	/**
171
	 * @return
172
	 */
173
	public ICommonService getCommonService();
174

  
175

  
176
	/**
177
	 *
178
	 * @return
179
	 */
180
	public ILocationService getLocationService();
181

  
182

  
183
	/**
184
	 *
185
	 * @return
186
	 */
187
	public IUserService getUserService();
188

  
189

  
190
	/**
191
	 *
192
	 * @return
193
	 */
194
	public IGroupService getGroupService();
195

  
196
	/**
197
    *
198
    * @return
199
    */
200
   public IPreferenceService getPreferenceService();
201

  
202
	/**
203
	 *
204
	 * @return
205
	 */
206
	public IGrantedAuthorityService getGrantedAuthorityService();
207

  
208

  
209
	/**
210
	 * @return
211
	 */
212
	public IService<CdmBase> getMainService();
213

  
214

  
215
	/**
216
	 * @return
217
	 */
218
	public IWorkingSetService getWorkingSetService();
219

  
220

  
221
	/**
222
	 * @return
223
	 */
224
	public PlatformTransactionManager getTransactionManager();
225

  
226

  
227
	/**
228
	 *
229
	 * @return
230
	 */
231
	public ProviderManager getAuthenticationManager();
232

  
233

  
234
	/**
235
	 * @return
236
	 */
237
	public ConversationHolder NewConversation();
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)