01: package org.osbl.concern;
02:
03: import org.osbl.ObjectLocator;
04: import org.concern.Controller;
05: import org.concern.ControllerLookup;
06: import org.concern.model.Process;
07:
08: import java.util.Map;
09: import java.util.HashMap;
10:
11: public class ProcessLocator implements
12: ObjectLocator<org.concern.model.Process> {
13: public org.concern.model.Process objectByQuery(
14: Map<String, String> query) {
15: String process = query.get("process");
16: Controller controller = ControllerLookup.getInstance()
17: .getController(process);
18: return controller.getProcess();
19: }
20:
21: public Map<String, String> queryByObject(
22: org.concern.model.Process process) {
23: Map<String, String> map = new HashMap<String, String>();
24: map.put("process", process.getName());
25: return map;
26: }
27: }
|