01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.cocoon.portal.security;
18:
19: import java.util.ArrayList;
20:
21: import org.apache.cocoon.auth.StandardUser;
22:
23: /**
24: * @version $Id: PortalUser.java 433543 2006-08-22 06:22:54Z crossley $
25: */
26: public class PortalUser extends StandardUser {
27:
28: private int uid;
29: private String lastname;
30: private String firstname;
31: private String password;
32:
33: public PortalUser(String uid) {
34: super (uid);
35: this .roles = new ArrayList();
36: }
37:
38: public String getFirstname() {
39: return firstname;
40: }
41:
42: public void setFirstname(String firstname) {
43: this .firstname = firstname;
44: }
45:
46: public String getLastname() {
47: return lastname;
48: }
49:
50: public void setLastname(String lastname) {
51: this .lastname = lastname;
52: }
53:
54: public String getPassword() {
55: return password;
56: }
57:
58: public void setPassword(String password) {
59: this .password = password;
60: }
61:
62: public String getRole() {
63: return (String) roles.get(0);
64: }
65:
66: public void setRole(String role) {
67: this .roles.clear();
68: this .roles.add(role);
69: }
70:
71: public int getUid() {
72: return uid;
73: }
74:
75: public void setUid(int uid) {
76: this .uid = uid;
77: }
78:
79: public String getUsername() {
80: return id;
81: }
82:
83: public void setUsername(String username) {
84: this.id = username;
85: }
86:
87: }
|