01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: *
17: */
18:
19: package org.apache.lenya.ac;
20:
21: /**
22: * User manager.
23: * @version $Id: UserManager.java 473861 2006-11-12 03:51:14Z gregor $
24: */
25: public interface UserManager extends ItemManager {
26:
27: /**
28: * Get all users.
29: *
30: * @return an array of users
31: */
32: User[] getUsers();
33:
34: /**
35: * Get all supported user types
36: *
37: * @return a collection of user types
38: */
39: UserType[] getUserTypes();
40:
41: /**
42: * Add the given user
43: *
44: * @param user A user.
45: * @throws AccessControlException when the user is already contained.
46: */
47: void add(User user) throws AccessControlException;
48:
49: /**
50: * Remove the given user
51: *
52: * @param user User that is to be removed
53: * @throws AccessControlException when the user is not contained.
54: */
55: void remove(User user) throws AccessControlException;
56:
57: /**
58: * Get the user with the given user id.
59: *
60: * @param userId user id of requested user
61: * @return the requested user or null if there is
62: * no user with the given user id
63: */
64: User getUser(String userId);
65:
66: }
|