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.apache.log4j.Logger;
|
13
|
import org.springframework.beans.factory.annotation.Autowired;
|
14
|
import org.springframework.beans.factory.annotation.Qualifier;
|
15
|
import org.springframework.orm.hibernate3.HibernateTransactionManager;
|
16
|
import org.springframework.stereotype.Component;
|
17
|
import org.springframework.transaction.PlatformTransactionManager;
|
18
|
|
19
|
import eu.etaxonomy.cdm.api.service.IAgentService;
|
20
|
import eu.etaxonomy.cdm.api.service.ICommonService;
|
21
|
import eu.etaxonomy.cdm.api.service.IDatabaseService;
|
22
|
import eu.etaxonomy.cdm.api.service.IDescriptionService;
|
23
|
import eu.etaxonomy.cdm.api.service.IMediaService;
|
24
|
import eu.etaxonomy.cdm.api.service.INameService;
|
25
|
import eu.etaxonomy.cdm.api.service.IOccurrenceService;
|
26
|
import eu.etaxonomy.cdm.api.service.IReferenceService;
|
27
|
import eu.etaxonomy.cdm.api.service.IService;
|
28
|
import eu.etaxonomy.cdm.api.service.ITaxonService;
|
29
|
import eu.etaxonomy.cdm.api.service.ITermService;
|
30
|
import eu.etaxonomy.cdm.model.common.CdmBase;
|
31
|
|
32
|
/**
|
33
|
* @author a.mueller
|
34
|
* @created 21.05.2008
|
35
|
* @version 1.0
|
36
|
*/
|
37
|
@Component
|
38
|
public class CdmApplicationDefaultConfiguration implements ICdmApplicationConfiguration {
|
39
|
@SuppressWarnings("unused")
|
40
|
private static final Logger logger = Logger.getLogger(CdmApplicationDefaultConfiguration.class);
|
41
|
|
42
|
@Autowired
|
43
|
//@Qualifier("nameService")
|
44
|
private INameService nameService;
|
45
|
@Autowired
|
46
|
//@Qualifier("taxonService")
|
47
|
private ITaxonService taxonService;
|
48
|
@Autowired
|
49
|
//@Qualifier("referenceService")
|
50
|
private IReferenceService referenceService;
|
51
|
@Autowired
|
52
|
//@Qualifier("agentService")
|
53
|
private IAgentService agentService;
|
54
|
@Autowired
|
55
|
//@Qualifier("databaseService")
|
56
|
private IDatabaseService databaseService;
|
57
|
@Autowired
|
58
|
//@Qualifier("termService")
|
59
|
private ITermService termService;
|
60
|
@Autowired
|
61
|
private HibernateTransactionManager transactionManager;
|
62
|
@Autowired
|
63
|
//@Qualifier("descriptionService")
|
64
|
private IDescriptionService descriptionService;
|
65
|
@Autowired
|
66
|
//@Qualifier("occurrenceService")
|
67
|
private IOccurrenceService occurrenceService;
|
68
|
@Autowired
|
69
|
//@Qualifier("mediaService")
|
70
|
private IMediaService mediaService;
|
71
|
@Autowired
|
72
|
//@Qualifier("commonService")
|
73
|
private ICommonService commonService;
|
74
|
//@Autowired
|
75
|
@Qualifier("mainService")
|
76
|
private IService<CdmBase> mainService;
|
77
|
|
78
|
|
79
|
/**
|
80
|
*
|
81
|
*/
|
82
|
public CdmApplicationDefaultConfiguration() {
|
83
|
}
|
84
|
|
85
|
/* (non-Javadoc)
|
86
|
* @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getAgentService()
|
87
|
*/
|
88
|
public IAgentService getAgentService() {
|
89
|
return this.agentService;
|
90
|
}
|
91
|
|
92
|
/* (non-Javadoc)
|
93
|
* @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getDatabaseService()
|
94
|
*/
|
95
|
public IDatabaseService getDatabaseService() {
|
96
|
return this.databaseService;
|
97
|
}
|
98
|
|
99
|
/* (non-Javadoc)
|
100
|
* @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getNameService()
|
101
|
*/
|
102
|
public INameService getNameService() {
|
103
|
return this.nameService;
|
104
|
}
|
105
|
|
106
|
/* (non-Javadoc)
|
107
|
* @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getReferenceService()
|
108
|
*/
|
109
|
public IReferenceService getReferenceService() {
|
110
|
return this.referenceService;
|
111
|
}
|
112
|
|
113
|
/* (non-Javadoc)
|
114
|
* @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getTaxonService()
|
115
|
*/
|
116
|
public ITaxonService getTaxonService() {
|
117
|
return this.taxonService;
|
118
|
}
|
119
|
|
120
|
/* (non-Javadoc)
|
121
|
* @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getDescriptionService()
|
122
|
*/
|
123
|
public IDescriptionService getDescriptionService(){
|
124
|
return this.descriptionService;
|
125
|
}
|
126
|
|
127
|
public IOccurrenceService getOccurrenceService(){
|
128
|
return this.occurrenceService;
|
129
|
}
|
130
|
|
131
|
public IMediaService getMediaService(){
|
132
|
return this.mediaService;
|
133
|
}
|
134
|
|
135
|
/* (non-Javadoc)
|
136
|
* @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getTermService()
|
137
|
*/
|
138
|
public ITermService getTermService() {
|
139
|
return this.termService;
|
140
|
}
|
141
|
|
142
|
/* (non-Javadoc)
|
143
|
* @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getCommonService()
|
144
|
*/
|
145
|
public ICommonService getCommonService(){
|
146
|
return this.commonService;
|
147
|
}
|
148
|
|
149
|
/* (non-Javadoc)
|
150
|
* @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getCommonService()
|
151
|
*/
|
152
|
public IService<CdmBase> getMainService(){
|
153
|
return this.mainService;
|
154
|
}
|
155
|
|
156
|
/* (non-Javadoc)
|
157
|
* @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getTransactionManager()
|
158
|
*/
|
159
|
public PlatformTransactionManager getTransactionManager() {
|
160
|
return this.transactionManager;
|
161
|
}
|
162
|
|
163
|
|
164
|
}
|