01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: * $Id: RoleUsersManager.java 3721 2007-04-28 19:35:35Z gbevin $
07: */
08: package com.uwyn.rife.authentication.credentialsmanagers;
09:
10: import com.uwyn.rife.authentication.exceptions.CredentialsManagerException;
11:
12: public interface RoleUsersManager extends IdentifiableUsersManager {
13: public RoleUsersManager addRole(String role)
14: throws CredentialsManagerException;
15:
16: public boolean containsRole(String role)
17: throws CredentialsManagerException;
18:
19: public long countRoles() throws CredentialsManagerException;
20:
21: public boolean listRoles(ListRoles processor)
22: throws CredentialsManagerException;
23:
24: public RoleUsersManager addUser(String login,
25: RoleUserAttributes attributes)
26: throws CredentialsManagerException;
27:
28: public boolean containsUser(String login)
29: throws CredentialsManagerException;
30:
31: public long countUsers() throws CredentialsManagerException;
32:
33: public long getUserId(String login)
34: throws CredentialsManagerException;
35:
36: public boolean listUsers(ListUsers processor)
37: throws CredentialsManagerException;
38:
39: public boolean listUsers(ListUsers processor, int limit, int offset)
40: throws CredentialsManagerException;
41:
42: public boolean isUserInRole(long userId, String role)
43: throws CredentialsManagerException;
44:
45: public boolean listUsersInRole(ListUsers processor, String role)
46: throws CredentialsManagerException;
47:
48: public boolean updateUser(String login,
49: RoleUserAttributes attributes)
50: throws CredentialsManagerException;
51:
52: public boolean removeUser(String login)
53: throws CredentialsManagerException;
54:
55: public boolean removeUser(long userId)
56: throws CredentialsManagerException;
57:
58: public boolean removeRole(String name)
59: throws CredentialsManagerException;
60:
61: public void clearUsers() throws CredentialsManagerException;
62:
63: public boolean listUserRoles(String login, ListRoles processor)
64: throws CredentialsManagerException;
65: }
|