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