KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > portal > security > PortalUser


1 /*
2  * Copyright 2005 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.cocoon.portal.security;
17
18 import java.util.ArrayList JavaDoc;
19
20 import org.osoco.cowarp.StandardUser;
21
22 /**
23  * @version $Id: PortalUser.java 234170 2005-08-21 10:00:44Z cziegeler $
24  */

25 public class PortalUser extends StandardUser {
26
27     private int uid;
28     private String JavaDoc lastname;
29     private String JavaDoc firstname;
30     private String JavaDoc password;
31     
32     public PortalUser(String JavaDoc uid) {
33         super(uid);
34         this.roles = new ArrayList JavaDoc();
35     }
36
37     public String JavaDoc getFirstname() {
38         return firstname;
39     }
40
41     public void setFirstname(String JavaDoc firstname) {
42         this.firstname = firstname;
43     }
44
45     public String JavaDoc getLastname() {
46         return lastname;
47     }
48
49     public void setLastname(String JavaDoc lastname) {
50         this.lastname = lastname;
51     }
52
53     public String JavaDoc getPassword() {
54         return password;
55     }
56
57     public void setPassword(String JavaDoc password) {
58         this.password = password;
59     }
60
61     public String JavaDoc getRole() {
62         return (String JavaDoc) roles.get(0);
63     }
64
65     public void setRole(String JavaDoc role) {
66         this.roles.clear();
67         this.roles.add(role);
68     }
69
70     public int getUid() {
71         return uid;
72     }
73
74     public void setUid(int uid) {
75         this.uid = uid;
76     }
77
78     public String JavaDoc getUsername() {
79         return id;
80     }
81
82     public void setUsername(String JavaDoc username) {
83         this.id = username;
84     }
85
86 }
87
Popular Tags