1 package org.apache.fulcrum.security.model.basic.entity;
2
3 /*
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
19 * under the License.
20 */
21
22 import java.util.Set;
23
24 import org.apache.fulcrum.security.entity.Group;
25 import org.apache.fulcrum.security.entity.User;
26 import org.apache.fulcrum.security.util.UserSet;
27
28 /**
29 * Represents the "basic" model where users are part of groups, but nothing
30 * else.
31 *
32 * @author <a href="mailto:epugh@upstate.com">Eric Pugh</a>
33 * @version $Id$
34 */
35 public interface BasicGroup extends Group
36 {
37 /**
38 * Get the users that are part of this group
39 *
40 * @return a set of users
41 */
42 public UserSet getUsers();
43
44 /**
45 * Set the users that are part of this group
46 *
47 * @param userSet
48 * a set of users
49 */
50 public void setUsers(UserSet userSet);
51
52 /**
53 * Get the users that are part of this group as a Set
54 *
55 * @param <T> User type
56 * @return a set of users
57 */
58 public <T extends User> Set<T> getUsersAsSet();
59
60 /**
61 * Set the users that are part of this group as a Set
62 *
63 * @param <T> User type
64 * @param users
65 * a set of users
66 */
67 public <T extends User> void setUsersAsSet(Set<T> users);
68
69 /**
70 * Add a user to this group
71 *
72 * @param user
73 * the user to add
74 */
75 public void addUser(User user);
76
77 /**
78 * Remove a user from this group
79 *
80 * @param user
81 * the user to remove
82 */
83 public void removeUser(User user);
84 }