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