-// $Id$
/**
* Copyright (C) 2015 EDIT
* European Distributed Institute of Taxonomy
import eu.etaxonomy.cdm.api.service.ICommonService;
import eu.etaxonomy.cdm.api.service.IService;
import eu.etaxonomy.cdm.api.service.ITestService;
+import eu.etaxonomy.cdm.api.service.longrunningService.ILongRunningTasksService;
import eu.etaxonomy.cdm.io.service.IIOService;
import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.taxeditor.service.ICachedCommonService;
private static CdmApplicationState cdmApplicationState;
- private ICdmApplicationConfiguration appConfig;
+ private ICdmRepository appConfig;
private ICdmDataChangeService dataChangeService;
+ //FIXME SecurityContextHolder.getContext()
private SecurityContext securityContext;
private static CdmServiceCacher cdmServiceCacher;
return cdmApplicationState;
}
- public void setAppConfig(ICdmApplicationConfiguration appConfig) {
+ public void setAppConfig(ICdmRepository appConfig) {
this.appConfig = appConfig;
if(appConfig instanceof CdmApplicationRemoteController) {
CdmBase.setNewEntityListener(new DefaultNewEntityListener());
}
}
- public ICdmApplicationConfiguration getAppConfig() {
+ public ICdmRepository getAppConfig() {
return appConfig;
}
- public static void setCurrentAppConfig(ICdmApplicationConfiguration appConfig) {
+ public static void setCurrentAppConfig(ICdmRepository appConfig) {
getInstance().setAppConfig(appConfig);
}
- public static ICdmApplicationConfiguration getCurrentAppConfig() {
+ public static ICdmRepository getCurrentAppConfig() {
return getInstance().getAppConfig();
}
/**
- * Generic method that will scan the getters of {@link ICdmApplicationConfiguration} for the given service
+ * Generic method that will scan the getters of {@link ICdmRepository} for the given service
* interface. If a matching getter is found the according service implementation is returned by
* invoking the getter otherwise the method returns <code>null</code>.
*
* @throws CdmApplicationException
*/
public static <T extends IService> T getService(Class<T> serviceClass) throws CdmApplicationException {
- ICdmApplicationConfiguration configuration = getCurrentAppConfig();
+ ICdmRepository configuration = getCurrentAppConfig();
- Method[] methods = ICdmApplicationConfiguration.class.getDeclaredMethods();
+ Method[] methods = ICdmRepository.class.getDeclaredMethods();
T service = null;
* As ICommonService is not extending IService we need a specific request here
*/
public static ICommonService getCommonService() {
- ICdmApplicationConfiguration configuration = getCurrentAppConfig();
+ ICdmRepository configuration = getCurrentAppConfig();
return configuration.getCommonService();
}
public static IIOService getIOService() {
- ICdmApplicationConfiguration configuration = getCurrentAppConfig();
+ ICdmRepository configuration = getCurrentAppConfig();
return ((CdmApplicationRemoteController)configuration).getIOService();
}
+ public static ILongRunningTasksService getLongRunningTasksService() {
+ ICdmRepository configuration = getCurrentAppConfig();
+
+ return ((CdmApplicationRemoteController)configuration).getLongRunningTasksService();
+
+ }
+
+
public static ITestService getTestService() {
- ICdmApplicationConfiguration configuration = getCurrentAppConfig();
+ ICdmRepository configuration = getCurrentAppConfig();
return ((CdmApplicationRemoteController)configuration).getTestService();
}
public static ICachedCommonService getCachedCommonService() {
- ICdmApplicationConfiguration configuration = getCurrentAppConfig();
+ ICdmRepository configuration = getCurrentAppConfig();
return ((CdmApplicationRemoteController)configuration).getCachedCommonService();
URL fileURL = bundle.getEntry(jar);
File file = null;
try {
- String urlString = FileLocator.resolve(fileURL).toExternalForm().replace(" ", "%20");;
+ String urlString = FileLocator.resolve(fileURL).toExternalForm().replace(" ", "%20");
file = new File(new URI(urlString));
JarFile jarFile = new JarFile(file);
Manifest manifest = jarFile.getManifest();