Commit f37a0753 authored by Thomas Huster's avatar Thomas Huster

Revert "[20706] added task service holder to core services"

This reverts commit 99dd1984.
parent 6d18ee17
Pipeline #15414 passed with stages
in 6 minutes and 8 seconds
......@@ -16,7 +16,6 @@ Require-Bundle: org.eclipse.core.runtime,
org.apache.commons.io,
com.eclipsesource.jaxrs.consumer;bundle-version="5.3.1"
Import-Package: bsh,
ch.elexis.core.tasks.model,
com.google.common.cache;version="15.0.0",
com.google.gson;version="2.8.5",
javax.persistence,
......
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="ch.elexis.core.services.holder.TaskServiceHolder">
<reference bind="setTaskService" interface="ch.elexis.core.tasks.model.ITaskService" name="TaskService"/>
<implementation class="ch.elexis.core.services.holder.TaskServiceHolder"/>
</scr:component>
\ No newline at end of file
package ch.elexis.core.services.holder;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import ch.elexis.core.tasks.model.ITaskService;
@Component
public class TaskServiceHolder {
private static ITaskService taskService;
@Reference
public void setTaskService(ITaskService taskService){
TaskServiceHolder.taskService = taskService;
}
public static ITaskService get() {
if (taskService == null) {
throw new IllegalStateException("No ITaskService available");
}
return taskService;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment