KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > raptus > owxv3 > api > usermgr > mmry > MmryUser


1 /*
2  * MmryUser.java
3  *
4  * Created on May 29, 2003, 10:26 AM
5  */

6
7 package com.raptus.owxv3.api.usermgr.mmry;
8
9 import com.raptus.owxv3.api.usermgr.*;
10 import java.util.*;
11
12 /**
13  *
14  * @author root
15  */

16 public class MmryUser implements User
17 {
18     /**
19      * The display name of the user
20      */

21     String JavaDoc name = null;
22     
23     /**
24      * The user's password
25      */

26     String JavaDoc password = null;
27     
28     /**
29      * The user's login name
30      */

31     String JavaDoc username = null;
32     
33     /**
34      * The user's email
35      */

36     String JavaDoc email = null;
37     String JavaDoc locale = null;
38     
39     /** Creates a new instance of MmryUser */
40     public MmryUser(String JavaDoc name,String JavaDoc username, String JavaDoc password, String JavaDoc email,String JavaDoc locale)
41     {
42         this.email = email;
43         this.locale = locale;
44         this.password = password;
45         this.username = username;
46         this.name = name;
47     }
48     
49     /**
50      * return the email address of this user
51      *
52      * @return the email address of this user
53      */

54     public String JavaDoc getEmail()
55     {
56         return email;
57     }
58     
59     /**
60      * return the locale of this user
61      *
62      * @return the locale of this user
63      */

64     public Locale getLocale()
65     {
66         return null;
67     }
68     
69     /**
70      * Return the display name of this user
71      *
72      * @return the display name of this user
73      */

74     public String JavaDoc getName()
75     {
76         return name;
77     }
78     
79     /**
80      * return the password of this user
81      *
82      * @return the password of this user
83      */

84     public String JavaDoc getPassword()
85     {
86         return password;
87     }
88     
89     /**
90      * return the login name of this user
91      *
92      * @return the login name of this user
93      */

94     public String JavaDoc getUsername()
95     {
96         return username;
97     }
98     
99     /** Return the list of roles
100      *
101      * @return list of roles, as iterator
102      *
103      */

104     public Iterator getRoles()
105     {
106         Vector v = new Vector();
107         MmryRole r = new MmryRole("role1", "role1");
108         v.add(r);
109         r = new MmryRole("role2", "role2");
110         v.add(r);
111         r = new MmryRole("role2", "role2");
112         v.add(r);
113         return v.iterator();
114     }
115     
116 }
117
Popular Tags