KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jac > aspects > user > UserManager


1 /*
2   Copyright (C) 2002-2003 Renaud Pawlak <renaud@aopsys.com>
3
4   This program is free software; you can redistribute it and/or modify
5   it under the terms of the GNU Lesser General Public License as
6   published by the Free Software Foundation; either version 2 of the
7   License, or (at your option) any later version.
8
9   This program is distributed in the hope that it will be useful,
10   but WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12   GNU Lesser General Public License for more details.
13
14   You should have received a copy of the GNU Lesser General Public License
15   along with this program; if not, write to the Free Software
16   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */

17
18 package org.objectweb.jac.aspects.user;
19
20 import java.util.Hashtable JavaDoc;
21 import java.util.Map JavaDoc;
22
23 /**
24  * Binding with profiles
25  */

26
27 public class UserManager {
28
29     public UserManager() {
30     }
31    
32     Hashtable JavaDoc profiles = new Hashtable JavaDoc();
33
34     /**
35      * Get a profile with its name.
36      *
37      * @param name the name of the profile.
38      */

39     public Profile getProfile(String JavaDoc name) {
40         return (Profile)profiles.get(name);
41     }
42
43     public Map JavaDoc getProfiles() {
44         return profiles;
45     }
46
47     /**
48      * Add a news profile.
49      *
50      * @param profile the profile to add
51      */

52     public void addProfile(Profile profile) {
53         profiles.put(profile.getName(),profile);
54     }
55
56     Object JavaDoc defaultAdmin;
57    
58     /**
59      * Get the value of defaultAdmin.
60      * @return value of defaultAdmin.
61      */

62     public Object JavaDoc getDefaultAdmin() {
63         return defaultAdmin;
64     }
65    
66     /**
67      * Set the value of defaultAdmin.
68      * @param v Value to assign to defaultAdmin.
69      */

70     public void setDefaultAdmin(Object JavaDoc v) {
71         this.defaultAdmin = v;
72     }
73       
74 }
75
Popular Tags