01: package org.osbl.concern;
02:
03: import org.osbl.ObjectLocator;
04: import org.concern.*;
05:
06: import java.util.Map;
07: import java.util.HashMap;
08:
09: public class TaskLocator implements ObjectLocator<Work> {
10: public Work objectByQuery(Map<String, String> query) {
11: String process = query.get("process");
12: String subjectId = query.get("subject");
13: String activity = query.get("activity");
14: String locale = query.get("locale");
15: return ControllerLookup.getInstance().getWorklist().getWork(
16: process, subjectId, activity, locale);
17: }
18:
19: public Map<String, String> queryByObject(Work work) {
20: Map<String, String> map = new HashMap<String, String>();
21: map.put("process", work.getProcess());
22: map.put("subject", work.getSubjectId());
23: map.put("activity", work.getActivity());
24: return map;
25: }
26: }
|