Project

General

Profile

« Previous | Next » 

Revision 707b6237

Added by Niels Hoffmann over 12 years ago

Merged with trunk

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmStore.java
58 58

  
59 59
	private static CdmStore instance;
60 60

  
61
	private final ICdmApplicationRemoteConfiguration applicationController;
61
	private final ICdmApplicationConfiguration applicationConfiguration;
62 62

  
63 63
	private static LoginManager loginManager = new LoginManager();
64 64

  
65
	private static ContextManager contextManager = new ContextManager();;
65
	private static ContextManager contextManager = new ContextManager();
66 66

  
67 67
	private static TermManager termManager = new TermManager();
68 68

  
......
168 168
				getContextManager().notifyContextAboutToStop(monitor);
169 169
				if ((monitor == null || (!monitor.isCanceled()) && isActive())) {
170 170
					getContextManager().notifyContextStop(monitor);
171
					if (instance.getApplicationController() != null) {
172
//						instance.getApplicationController().close();
173
					}
174 171
					instance.close();
175 172
				}
176 173
			}
......
189 186

  
190 187
	private CdmStore(ICdmApplicationRemoteConfiguration applicationController,
191 188
			ICdmDataSource dataSource) {
192
		this.applicationController = applicationController;
189
		this.applicationConfiguration = applicationController;
193 190
		this.cdmDatasource = dataSource;
194 191
		isConnected = true;
195 192
	}
......
199 196
	 * 
200 197
	 * @return
201 198
	 */
202
	private ICdmApplicationRemoteConfiguration getApplicationController() {
199
	private ICdmApplicationConfiguration getApplicationConfiguration() {
203 200
		try {
204
			return applicationController;
201
			return applicationConfiguration;
205 202
		} catch (Exception e) {
206 203
			StoreUtil.error(CdmStore.class, e);
207 204
		}
......
217 214
	 *         {@link eu.etaxonomy.cdm.api.application.CdmApplicationController}
218 215
	 *         object.
219 216
	 */
220
	public static ICdmApplicationRemoteConfiguration getCurrentApplicationController() {
217
	public static ICdmApplicationConfiguration getCurrentApplicationConfiguration() {
221 218
		if (getDefault() != null) {
222
			return getDefault().getApplicationController();
219
			return getDefault().getApplicationConfiguration();
223 220
		}
224 221
		return null;
225 222
	}
......
236 233
	 *         object.
237 234
	 */
238 235
	public static ConversationHolder createConversation() {
239
//		ConversationHolder conversation = getCurrentApplicationController()
240
//				.NewConversation();
241
		ConversationHolder conversation = new ConversationHolderMock(); 
236
		ConversationHolder conversation = getCurrentApplicationConfiguration()
237
				.NewConversation();
242 238

  
243 239
		conversation.startTransaction();
244 240
		return conversation;
......
253 249
	 * @return
254 250
	 */
255 251
	public static <T extends IService> T getService(Class<T> serviceClass) {
256
		ICdmApplicationRemoteConfiguration configuration = getCurrentApplicationController();
252
		ICdmApplicationConfiguration configuration = getCurrentApplicationConfiguration();
257 253

  
258 254
		Method[] methods = ICdmApplicationConfiguration.class
259 255
				.getDeclaredMethods();
......
290 286
	 *         object.
291 287
	 */
292 288
	public static ProviderManager getAuthenticationManager() {
293
		return null; //getCurrentApplicationController().getAuthenticationManager();
289
		return getCurrentApplicationConfiguration().getAuthenticationManager();
294 290
	}
295 291

  
296 292
	/**
......
301 297
	 * @return a {@link eu.etaxonomy.cdm.ext.geo.IEditGeoService} object.
302 298
	 */
303 299
	public static IEditGeoService getGeoService() {
304
		return null;// (IEditGeoService) getCurrentApplicationController().getBean("editGeoService");
300
		return (IEditGeoService) getCurrentApplicationConfiguration().getBean(
301
				"editGeoService");
305 302
	}
306 303

  
307 304
	/*
......
399 396
	 * @return a {@link eu.etaxonomy.taxeditor.io.ImportManager} object.
400 397
	 */
401 398
	public static ImportManager getImportManager() {
402
		return ImportManager.NewInstance(null);//getCurrentApplicationController());
399
		return ImportManager.NewInstance(getCurrentApplicationConfiguration());
403 400
	}
404 401

  
405 402
	/**
......
410 407
	 * @return a {@link eu.etaxonomy.taxeditor.io.ExportManager} object.
411 408
	 */
412 409
	public static ExportManager getExportManager() {
413
		return ExportManager.NewInstance(null);//getCurrentApplicationController());
410
		return ExportManager.NewInstance(getCurrentApplicationConfiguration());
414 411
	}
415 412

  
416 413
	/**

Also available in: Unified diff