01: package org.contineo.core.security;
02:
03: import java.util.Collection;
04:
05: /**
06: * Manager on security issues such as users and groups
07: *
08: * @author Marco Meschieri
09: * @version $Id: SecurityManager.java,v 1.1 2007/06/29 06:28:30 marco Exp $
10: * @since 3.0
11: */
12: public interface SecurityManager {
13:
14: /**
15: * Assign a collection of users to a group.
16: *
17: * @param users The users collection
18: * @param group The group
19: */
20: public abstract void assignUsersToGroup(Collection<User> users,
21: Group group);
22:
23: /**
24: * Assign a user to a collection of groups.
25: *
26: * @param user The user to be assigned
27: * @param groups The groups collection
28: */
29: public abstract void assignUserToGroups(User user,
30: Collection<Group> groups);
31:
32: /**
33: * Assign a user to a collection of groups.
34: *
35: * @param user The user to be assigned
36: * @param groupNames Array of group names
37: */
38: public abstract void assignUserToGroups(User user,
39: String[] groupNames);
40:
41: /**
42: * Assign a user to a group.
43: *
44: * @param user The user to be assigned
45: * @param group The group
46: */
47: public abstract void assignUserToGroup(User user, Group group);
48:
49: /**
50: * Removes the specified users from a group
51: *
52: * @param users The users to be removed
53: * @param group The group to be updated
54: */
55: public abstract void removeUsersFromGroup(Collection<User> users,
56: Group group);
57:
58: /**
59: * Removes the specified user from a group
60: *
61: * @param users The user to be removed
62: * @param group The group to be updated
63: */
64: public abstract void removeUserFromGroup(User user, Group group);
65:
66: /**
67: * Removes the specified user from a all groups
68: *
69: * @param user The user to be removed
70: */
71: public abstract void removeUserFromAllGroups(User user);
72:
73: /**
74: * Removes all users from group
75: *
76: * @param group The group from wich all users must be removed
77: */
78: public abstract void removeAllUsersFromGroup(Group group);
79:
80: }
|