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: * A group manager.
23: * @version $Id: GroupManager.java 473861 2006-11-12 03:51:14Z gregor $
24: */
25: public interface GroupManager extends ItemManager {
26:
27: /**
28: * Get all groups.
29: * @return an array of groups.
30: */
31: Group[] getGroups();
32:
33: /**
34: * Add a group to this manager.
35: * @param id the ID of the group to be added.
36: * @return A group.
37: * @throws AccessControlException when the group is already contained.
38: */
39: Group add(String id) throws AccessControlException;
40:
41: /**
42: * Remove a group from this manager.
43: * @param group the group to be removed.
44: * @throws AccessControlException when the group is not contained.
45: */
46: void remove(Group group) throws AccessControlException;
47:
48: /**
49: * Get the group with the given group name.
50: *
51: * @param groupId the id of the requested group.
52: * @return a <code>Group</code> or null if there is no group with the given name
53: */
54: Group getGroup(String groupId);
55:
56: }
|