1 package org.apache.fulcrum.security.model.dynamic.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.User; 25 import org.apache.fulcrum.security.model.basic.entity.BasicUser; 26 27 /** 28 * Represents the "simple" model where permissions are related to roles, roles 29 * are related to groups and groups are related to users, all in many to many 30 * relationships. 31 * 32 * Users have a set of delegates and delegatee's. If user A has B in their 33 * delegates - B assumes A's groups,roles and permissions If user C has D in 34 * their delegatees - C assumes D's groups,roles and permissions 35 * 36 * @author <a href="mailto:epugh@upstate.com">Eric Pugh</a> 37 * @version $Id$ 38 */ 39 public interface DynamicUser extends BasicUser 40 { 41 /** 42 * Get the set of delegatees for this user 43 * 44 * @param <T> 45 * @return Returns the delegatees. 46 */ 47 public <T extends User> Set<T> getDelegatees(); 48 49 /** 50 * Set the delegatees for this user 51 * 52 * @param delegatees 53 * The delegatees to set. 54 */ 55 public <T extends User> void setDelegatees(Set<T> delegatees); 56 57 /** 58 * Get the set of delegators for this user 59 * 60 * @param <T> 61 * @return Returns the delegators. 62 */ 63 public <T extends User> Set<T> getDelegators(); 64 65 /** 66 * Set the delegators for this user 67 * 68 * @param delegators 69 * The delegators to set. 70 */ 71 public <T extends User> void setDelegators(Set<T> delegators); 72 }