01: /*
02: * Copyright 2007 Outerthought bvba and Schaubroeck nv
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.outerj.daisy.workflow;
17:
18: import org.outerj.daisy.repository.RepositoryException;
19:
20: import java.util.List;
21:
22: /**
23: * Management of workflow pools, which are basically sets of users.
24: *
25: * <p>Pools can be created/updated only by Administrators.
26: *
27: * <p>Accessing information on pools (which pools are available,
28: * who is in which pools, ...) can be done by all users.
29: */
30: public interface WfPoolManager {
31: /**
32: * Creates a new pool. This pool will not be immediately created
33: * persistently, you need to call the save method on the returned
34: * Pool object to do this.
35: */
36: WfPool createPool(String name);
37:
38: List<WfPool> getPools() throws RepositoryException;
39:
40: WfPool getPool(long id) throws RepositoryException;
41:
42: WfPool getPoolByName(String name) throws RepositoryException;
43:
44: List<Long> getUsersForPool(long poolId) throws RepositoryException;
45:
46: List<WfPool> getPoolsForUser(long userId)
47: throws RepositoryException;
48:
49: void addUsersToPool(long poolId, List<Long> userIds)
50: throws RepositoryException;
51:
52: void removeUsersFromPool(long poolId, List<Long> userIds)
53: throws RepositoryException;
54:
55: /**
56: * Removes all users from this pool.
57: */
58: void clearPool(long poolId) throws RepositoryException;
59:
60: void deletePool(long poolId) throws RepositoryException;
61: }
|