Added oparent to sdc main
[sdc.git] / utils / webseal-simulator / src / main / java / org / openecomp / sdc / webseal / simulator / User.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.openecomp.sdc.webseal.simulator;
22
23 public class User {
24
25         private String firstName;
26         private String lastName;
27         private String email;
28         private String userId;
29         private String role;
30         
31         private String password;
32         
33         public User(){          
34         }
35         
36         public User(String userId){
37                 setUserId(userId);
38         }
39
40         public User(String firstName,String lastName,String email,String userId, String role, String password){
41                 setUserId(userId);
42                 setFirstName(firstName);
43                 setLastName(lastName);
44                 setEmail(email);
45                 setPassword(password);
46                 setRole(role);
47         }
48         
49         public String getFirstName() {
50                 return firstName;
51         }
52         public void setFirstName(String firstName) {
53                 this.firstName = firstName;
54         }
55         public String getLastName() {
56                 return lastName;
57         }
58         public void setLastName(String lastName) {
59                 this.lastName = lastName;
60         }
61         public String getEmail() {
62                 return email;
63         }
64         public void setEmail(String email) {
65                 this.email = email;
66         }
67         public String getUserId() {
68                 return userId;
69         }
70         public void setUserId(String userId) {
71                 this.userId = userId;
72         }
73         public String getPassword() {
74                 return password;
75         }
76
77         public void setPassword(String password) {
78                 this.password = password;
79         }
80         
81         public String getRole() {
82                 return role;
83         }
84
85         public void setRole(String role) {
86                 this.role = role;
87         }
88         
89         public String getUserRef() {
90                 return "<a href='?userId="+getUserId()+"&password="+getPassword()+"'>"+getFirstName()+" "+getLastName()+"</a>";
91         }
92         
93         public String getUserCreateRef() {
94                 return "<a href='create?userId="+getUserId()+"&firstName="+getFirstName()+"&lastName="+getLastName()+"&role=" + getRole() + "&email=" + getEmail() + "' target='resultFrame'>create</a>";
95         }
96
97         @Override
98         public String toString() {
99                 return "User [firstName=" + firstName + ", lastName=" + lastName + ", email=" + email + ", userId=" + userId
100                                 + ", role=" + role + ", password=" + password + "]";
101         }
102
103 }