KickJava   Java API By Example, From Geeks To Geeks.

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


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  * A group.
22  * @version $Id: Group.java 43240 2004-08-16 16:21:22Z andreas $
23  */

24 public interface Group extends Identifiable, Item {
25     
26     /**
27      * Returns the members of this group.
28      * @return An array of {@link Groupable}s.
29      */

30     Groupable[] getMembers();
31     
32     /**
33      * Adds a member to this group.
34      * @param member The member to add.
35      */

36     void add(Groupable member);
37     
38     /**
39      * Removes a member from this group.
40      * @param member The member to remove.
41      */

42     void remove(Groupable member);
43     
44     /**
45      * Removes all members from this group.
46      */

47     void removeAllMembers();
48     
49     /**
50      * Returns if this group contains this member.
51      * @param member The member to check.
52      * @return A boolean value.
53      */

54     boolean contains(Groupable member);
55     
56     /**
57      * Delete a group.
58      * @throws AccessControlException if the delete failed
59      */

60     void delete() throws AccessControlException;
61     
62     /**
63      * Saves this group.
64      * @throws AccessControlException when saving failed.
65      */

66     void save() throws AccessControlException;
67     
68 }
Popular Tags