Revision 2da9ade2
Added by Andreas Kohlbecker about 7 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmStore.java | ||
---|---|---|
25 | 25 |
import eu.etaxonomy.cdm.api.application.CdmApplicationException; |
26 | 26 |
import eu.etaxonomy.cdm.api.application.CdmApplicationRemoteController; |
27 | 27 |
import eu.etaxonomy.cdm.api.application.CdmApplicationState; |
28 |
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
|
|
28 |
import eu.etaxonomy.cdm.api.application.ICdmRepository;
|
|
29 | 29 |
import eu.etaxonomy.cdm.api.cache.CdmServiceCacher; |
30 | 30 |
import eu.etaxonomy.cdm.api.conversation.ConversationHolder; |
31 | 31 |
import eu.etaxonomy.cdm.api.service.IAgentService; |
... | ... | |
89 | 89 |
|
90 | 90 |
private static CdmStore instance; |
91 | 91 |
|
92 |
//private final ICdmApplicationConfiguration applicationConfiguration;
|
|
92 |
//private final ICdmRepository applicationConfiguration;
|
|
93 | 93 |
|
94 | 94 |
private static ContextManager contextManager = new ContextManager(); |
95 | 95 |
|
... | ... | |
273 | 273 |
CdmApplicationState.dispose(); |
274 | 274 |
} |
275 | 275 |
|
276 |
static void setInstance(ICdmApplicationConfiguration applicationController,
|
|
276 |
static void setInstance(ICdmRepository applicationController,
|
|
277 | 277 |
ICdmSource cdmSource) { |
278 | 278 |
instance = new CdmStore(applicationController, cdmSource); |
279 | 279 |
CdmApplicationState.setCdmServiceCacher(new CdmServiceCacher()); |
280 | 280 |
|
281 | 281 |
} |
282 | 282 |
|
283 |
private CdmStore(ICdmApplicationConfiguration applicationController,
|
|
283 |
private CdmStore(ICdmRepository applicationController,
|
|
284 | 284 |
ICdmSource cdmSource) { |
285 | 285 |
CdmApplicationState.setCurrentAppConfig(applicationController); |
286 | 286 |
CdmApplicationState.setCurrentDataChangeService(new CdmUIDataChangeService()); |
... | ... | |
293 | 293 |
* |
294 | 294 |
* @return |
295 | 295 |
*/ |
296 |
private ICdmApplicationConfiguration getApplicationConfiguration() {
|
|
296 |
private ICdmRepository getApplicationConfiguration() {
|
|
297 | 297 |
try { |
298 | 298 |
return CdmApplicationState.getCurrentAppConfig(); |
299 | 299 |
} catch (Exception e) { |
... | ... | |
311 | 311 |
* {@link eu.etaxonomy.cdm.remote.api.application.CdmApplicationController} |
312 | 312 |
* object. |
313 | 313 |
*/ |
314 |
public static ICdmApplicationConfiguration getCurrentApplicationConfiguration() {
|
|
314 |
public static ICdmRepository getCurrentApplicationConfiguration() {
|
|
315 | 315 |
if (getDefault() != null) { |
316 | 316 |
return getDefault().getApplicationConfiguration(); |
317 | 317 |
} |
... | ... | |
369 | 369 |
} |
370 | 370 |
|
371 | 371 |
/** |
372 |
* Generic method that will scan the getters of {@link ICdmApplicationConfiguration} for the given service
|
|
372 |
* Generic method that will scan the getters of {@link ICdmRepository} for the given service
|
|
373 | 373 |
* interface. If a matching getter is found the according service implementation is returned by |
374 | 374 |
* invoking the getter otherwise the method returns <code>null</code>. |
375 | 375 |
* |
Also available in: Unified diff
ref #6419 renaming CdmApplicationDefaultConfiguration to CdmRepository