Commit f919b832 authored by Marco Descher's avatar Marco Descher
Browse files

Fix for new

parent 9d29a158
package task;
import java.util.Collections;
import java.util.Map;
import java.util.Optional;
import org.eclipse.core.runtime.IProgressMonitor;
import org.slf4j.Logger;
import ch.elexis.core.services.IModelService;
import ch.elexis.core.utils.OsgiServiceUtil;
import info.elexis.server.misthios.MisthiosTask;
import info.elexis.server.misthios.MisthiosTaskResult;
import org.slf4j.Logger;
public class BasicExecutionTask implements MisthiosTask {
@Override
public MisthiosTaskResult run(Map<String, Object> context) {
public Map<String, Object> run(Map<String, Object> context) {
IProgressMonitor monitor = (IProgressMonitor) context.get("monitor");
Logger logger = (Logger) context.get("logger");
logger.error("Error test");
logger.info("Info test");
logger.warn("Warn test");
logger.debug("Debug test");
monitor.beginTask("Basic task", 1);
Optional<IModelService> service = OsgiServiceUtil.getService(IModelService.class);
System.out.println(service);
monitor.done();
return MisthiosTaskResult.OK();
return Collections.emptyMap();
}
}
\ 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