01: /*
02: * $Id: Worklist.java 654 2006-01-25 09:11:56Z hengels $
03: * (c) Copyright 2004 con:cern development team.
04: *
05: * This file is part of con:cern (http://concern.sf.net).
06: *
07: * con:cern is free software; you can redistribute it and/or modify
08: * it under the terms of the GNU Lesser General Public License
09: * as published by the Free Software Foundation; either version 2.1
10: * of the License, or (at your option) any later version.
11: *
12: * Please see COPYING for the complete licence.
13: */
14: package org.concern;
15:
16: import java.util.*;
17: import java.sql.Timestamp;
18:
19: /**
20: * A worklist provides a list of Work items, that are subject to be executed by a certain actor. The Work items can
21: * originate from one or more processes and actions. If a Work Item is included, might depend on information that is
22: * stored in the subject. An actor can be a user, a group of users or an external system.
23: * <p>
24: * There are different possibilites, how worklists are built. The simplest case is static associations between actors
25: * and activities. The userid / roleid / groupid is determined at design time and can be configured in the environment
26: * of the activities. More dynamic approaches use worklistFilters. The worklist is composed as the union of one or more
27: * activity lists and filtered in respect to certain properties of the subject (i.e. team leader, department manager).
28: */
29: public interface Worklist {
30: List<Work> listWork(String[] userids, String locale, int maxResults);
31:
32: List<Work> listWork(String[] userids, String[] processes,
33: String[] activities, String[] keywords, String[] orders,
34: String locale, int maxResults);
35:
36: List<Subject> listSubjects(String[] assignees, String[] processes,
37: String[] keywords, String[] originators, int state,
38: String[] orders, String locale, int maxResults);
39:
40: List<Subject> listArchivedSubjects(String[] processes,
41: String[] keywords, String[] originators, String[] orders,
42: String locale, int maxResults);
43:
44: List<Assignment> listAssignments(String subject,
45: String[] processes, String[] activities, String[] keywords,
46: String[] orders, String locale, int maxResults);
47:
48: boolean lock(Work work, String user, Timestamp until)
49: throws UnknownSubjectException;
50:
51: boolean unlock(Work work, String user)
52: throws UnknownSubjectException;
53:
54: void addAssignmentListener(AssignmentListener listener);
55:
56: void removeAssignmentListener(AssignmentListener listener);
57:
58: Subject getSubject(String process, String subjectId, String locale,
59: String assignee);
60:
61: Work getWork(String process, String subjectId, String activity,
62: String locale);
63: }
|