7095991c67eabd8e8e3a579b154568cd90eaf6b5
[portal.git] / ecomp-portal-BE-common / src / main / java / org / openecomp / portalapp / portal / transport / RemoteUserWithRoles.java
1 package org.openecomp.portalapp.portal.transport;
2
3 import java.util.ArrayList;
4 import java.util.List;
5
6 /*-
7  * ================================================================================
8  * ECOMP Portal SDK
9  * ================================================================================
10  * Copyright (C) 2017 AT&T Intellectual Property
11  * ================================================================================
12  * Licensed under the Apache License, Version 2.0 (the "License");
13  * you may not use this file except in compliance with the License.
14  * You may obtain a copy of the License at
15  * 
16  *      http://www.apache.org/licenses/LICENSE-2.0
17  * 
18  * Unless required by applicable law or agreed to in writing, software
19  * distributed under the License is distributed on an "AS IS" BASIS,
20  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21  * See the License for the specific language governing permissions and
22  * limitations under the License.
23  * ================================================================================
24  */
25
26 /**
27  * User description which we receive in response from request to remote
28  * application: applicationsRestClientService.get(RemoteUserWithRoles[].class,
29  * appId, "/users"). It contains the most important info about remote
30  * application user including his roles in this application.
31  */
32 public class RemoteUserWithRoles {
33
34         private Long orgId;
35
36         private Long managerId;
37
38         private String firstName;
39
40         private String middleInitial;
41
42         private String lastName;
43
44         private String phone;
45
46         private String email;
47
48         private String hrid;
49
50         private String orgUserId;
51
52         private String orgCode;
53
54         private String orgManagerUserId;
55
56         private String jobTitle;
57
58         private String loginId;
59
60         private Boolean active;
61
62         private List<RemoteRole> roles = new ArrayList<RemoteRole>();
63
64         public Long getOrgId() {
65                 return orgId;
66         }
67
68         public void setOrgId(Long orgId) {
69                 this.orgId = orgId;
70         }
71
72         public Long getManagerId() {
73                 return managerId;
74         }
75
76         public void setManagerId(Long managerId) {
77                 this.managerId = managerId;
78         }
79
80         public String getFirstName() {
81                 return firstName;
82         }
83
84         public void setFirstName(String firstName) {
85                 this.firstName = firstName;
86         }
87
88         public String getMiddleInitial() {
89                 return middleInitial;
90         }
91
92         public void setMiddleInitial(String middleInitial) {
93                 this.middleInitial = middleInitial;
94         }
95
96         public String getLastName() {
97                 return lastName;
98         }
99
100         public void setLastName(String lastName) {
101                 this.lastName = lastName;
102         }
103
104         public String getPhone() {
105                 return phone;
106         }
107
108         public void setPhone(String phone) {
109                 this.phone = phone;
110         }
111
112         public String getEmail() {
113                 return email;
114         }
115
116         public void setEmail(String email) {
117                 this.email = email;
118         }
119
120         public String getHrid() {
121                 return hrid;
122         }
123
124         public void setHrid(String hrid) {
125                 this.hrid = hrid;
126         }
127
128         public String getOrgUserId() {
129                 return orgUserId;
130         }
131
132         public void setOrgUserId(String orgUserId) {
133                 if(this.orgUserId == null)
134                         this.orgUserId = orgUserId;
135         }
136
137         public String getOrgCode() {
138                 return orgCode;
139         }
140
141         public void setOrgCode(String orgCode) {
142                 this.orgCode = orgCode;
143         }
144
145         public String getOrgManagerUserId() {
146                 return orgManagerUserId;
147         }
148
149         public void setOrgManagerUserId(String orgManagerUserId) {
150                 this.orgManagerUserId = orgManagerUserId;
151         }
152
153         public String getJobTitle() {
154                 return jobTitle;
155         }
156
157         public void setJobTitle(String jobTitle) {
158                 this.jobTitle = jobTitle;
159         }
160
161         public String getLoginId() {
162                 return loginId;
163         }
164
165         public void setLoginId(String loginId) {
166                 this.loginId = loginId;
167         }
168
169         public Boolean getActive() {
170                 return active;
171         }
172
173         public void setActive(Boolean active) {
174                 this.active = active;
175         }
176
177         public List<RemoteRole> getRoles() {
178                 return roles;
179         }
180
181         public void setRoles(List<RemoteRole> roles) {
182                 this.roles = roles;
183         }
184
185         @Override
186         public String toString() {
187                 return "RemoteUserWithRoles [orgId=" + orgId + ", managerId=" + managerId + ", firstName=" + firstName
188                                 + ", middleInitial=" + middleInitial + ", lastName=" + lastName + ", phone=" + phone + ", email="
189                                 + email + ", hrid=" + hrid + ", orgUserId=" + orgUserId + ", orgCode=" + orgCode + ", orgManagerUserId="
190                                 + orgManagerUserId + ", jobTitle=" + jobTitle + ", loginId=" + loginId + ", active=" + active
191                                 + ", roles=" + roles + "]";
192         }
193         
194         
195         
196         
197 }