Commit 9d25a1fc authored by Marco Descher's avatar Marco Descher
Browse files

Update sample bundle

parent f919b832
package task;
import java.util.Collections;
import java.util.ArrayList;
import java.util.HashMap;
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;
public class BasicExecutionTask implements MisthiosTask {
......@@ -24,12 +23,16 @@ public class BasicExecutionTask implements MisthiosTask {
logger.debug("Debug test");
monitor.beginTask("Basic task", 1);
Optional<IModelService> service = OsgiServiceUtil.getService(IModelService.class);
System.out.println(service);
context.forEach(logger::info);
monitor.done();
return Collections.emptyMap();
Map<String, Object> resultMap = new HashMap<>();
resultMap.put("result", "I am a string result");
resultMap.put("resultInt", 538);
resultMap.put("resultObject", Optional.of(new ArrayList<Float>()));
return resultMap;
}
}
\ 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