KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sslexplorer > unixauth > UNIXUser


1 /*
2  * SSL-Explorer
3  *
4  * Copyright (C) 2003-2006 3SP LTD. All Rights Reserved
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2 of
9  * the License, or (at your option) any later version.
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public
16  * License along with this program; if not, write to the Free Software
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */

19             
20 package com.sslexplorer.unixauth;
21
22 import java.util.Date JavaDoc;
23
24 import com.sslexplorer.realms.Realm;
25 import com.sslexplorer.security.DefaultUser;
26 import com.sslexplorer.security.Role;
27
28 /**
29  * Implementation of a {@link com.sslexplorer.security.DefaultUser}
30  * for <i>Unix users</i>.
31  *
32  * @author James D Robinson <a HREF="mailto:james@3sp.com">&lt;james@3sp.com&gt;</a>
33  *
34  */

35 public class UNIXUser extends DefaultUser {
36
37     private char[] password;
38     private String JavaDoc home;
39     private String JavaDoc shell;
40     private int uid;
41     private int gid;
42
43     /**
44      * @param username
45      * @param email
46      * @param password
47      * @param uid
48      * @param gid
49      * @param fullname
50      * @param home
51      * @param shell
52      * @param roles
53      * @param realm
54      */

55     public UNIXUser(String JavaDoc username, String JavaDoc email, char[] password, int uid, int gid, String JavaDoc fullname, String JavaDoc home, String JavaDoc shell, Role[] roles, Realm realm) {
56         super(username, email, fullname, new Date JavaDoc(), realm);
57         setRoles(roles);
58         this.uid = uid;
59         this.password = password;
60         this.gid = gid;
61         this.home = home;
62         this.shell = shell;
63     }
64
65     /**
66      * @return int
67      */

68     public int getGid() {
69         return gid;
70     }
71
72     /**
73      * @param gid
74      */

75     public void setGid(int gid) {
76         this.gid = gid;
77     }
78
79     /**
80      * @return String
81      */

82     public String JavaDoc getHome() {
83         return home;
84     }
85
86     /**
87      * @param home
88      */

89     public void setHome(String JavaDoc home) {
90         this.home = home;
91     }
92
93     /**
94      * @return char[]
95      */

96     public char[] getPassword() {
97         return password;
98     }
99
100     /**
101      * @param password
102      */

103     public void setPassword(char[] password) {
104         this.password = password;
105     }
106
107     /**
108      * @return String
109      */

110     public String JavaDoc getShell() {
111         return shell;
112     }
113
114     /**
115      * @param shell
116      */

117     public void setShell(String JavaDoc shell) {
118         this.shell = shell;
119     }
120
121     /**
122      * @return int
123      */

124     public int getUid() {
125         return uid;
126     }
127
128     /**
129      * @param uid
130      */

131     public void setUid(int uid) {
132         this.uid = uid;
133     }
134
135
136 }
Popular Tags