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.
23: * @version $Id: Group.java 473861 2006-11-12 03:51:14Z gregor $
24: */
25: public interface Group extends Identifiable, Item {
26:
27: /**
28: * Returns the members of this group.
29: * @return An array of {@link Groupable}s.
30: */
31: Groupable[] getMembers();
32:
33: /**
34: * Adds a member to this group.
35: * @param member The member to add.
36: */
37: void add(Groupable member);
38:
39: /**
40: * Removes a member from this group.
41: * @param member The member to remove.
42: */
43: void remove(Groupable member);
44:
45: /**
46: * Removes all members from this group.
47: */
48: void removeAllMembers();
49:
50: /**
51: * Returns if this group contains this member.
52: * @param member The member to check.
53: * @return A boolean value.
54: */
55: boolean contains(Groupable member);
56:
57: /**
58: * Delete a group.
59: * @throws AccessControlException if the delete failed
60: */
61: void delete() throws AccessControlException;
62:
63: /**
64: * Saves this group.
65: * @throws AccessControlException when saving failed.
66: */
67: void save() throws AccessControlException;
68:
69: }
|