KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > lenya > ac > UserManager


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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  */

17
18 package org.apache.lenya.ac;
19
20 /**
21  * User manager.
22  * @version $Id: UserManager.java 43669 2004-09-10 14:27:02Z andreas $
23  */

24 public interface UserManager extends ItemManager {
25     
26     /**
27      * Get all users.
28      *
29      * @return an array of users
30      */

31     User[] getUsers();
32     
33     /**
34      * Get all supported user types
35      *
36      * @return a collection of user types
37      */

38     UserType[] getUserTypes();
39
40     /**
41      * Add the given user
42      *
43      * @param user User that is to be added
44      * @throws AccessControlException when the user is already contained.
45      */

46     void add(User user) throws AccessControlException;
47     
48     /**
49      * Remove the given user
50      *
51      * @param user User that is to be removed
52      * @throws AccessControlException when the user is not contained.
53      */

54     void remove(User user) throws AccessControlException;
55     
56     /**
57      * Get the user with the given user id.
58      *
59      * @param userId user id of requested user
60      * @return the requested user or null if there is
61      * no user with the given user id
62      */

63     User getUser(String JavaDoc userId);
64     
65 }
Popular Tags