KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > security > realm > principals > UserMBean


1 /**
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 1999-2004 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or 1any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * Initial developer: Florent BENOIT
22  * --------------------------------------------------------------------------
23  * $Id: UserMBean.java,v 1.3 2004/05/25 15:13:29 benoitf Exp $
24  * --------------------------------------------------------------------------
25  */

26
27 package org.objectweb.jonas.security.realm.principals;
28
29
30 /**
31  * This interface defines the MBean method for the User
32  * @author Florent Benoit
33  */

34 public interface UserMBean {
35
36     /**
37      * Get the roles
38      * @return the array of the roles
39      */

40     String JavaDoc[] getArrayRoles();
41
42     /**
43      * Get the groups
44      * @return the array of the groups
45      */

46     String JavaDoc[] getArrayGroups();
47
48     /**
49      * Get the name of this user
50      * @return the name of this user
51      */

52     String JavaDoc getName();
53
54     /**
55      * Get the password of this user
56      * @return the password of this user
57      */

58     String JavaDoc getPassword();
59
60     /**
61      * Set the password of this user
62      * @param password password of the user
63      */

64     void setPassword(String JavaDoc password);
65
66
67     /**
68      * Add the specified group to this user
69      * @param group the group to add
70      */

71     void addGroup(String JavaDoc group);
72
73     /**
74      * Add a role to this user
75      * @param role the given role
76      */

77     void addRole(String JavaDoc role);
78
79     /**
80      * Remove a group from this user
81      * @param group the given group
82      */

83     void removeGroup(String JavaDoc group);
84
85     /**
86      * Remove a role from this user
87      * @param role the given role
88      */

89     void removeRole(String JavaDoc role);
90
91 }
92
Popular Tags