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