[PORTAL-7] Rebase
[portal.git] / ecomp-portal-BE-common / src / main / java / org / openecomp / portalapp / portal / domain / AdminUserApplications.java
1 /*-
2  * ================================================================================
3  * ECOMP Portal
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property
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  * ================================================================================
19  */
20 package org.openecomp.portalapp.portal.domain;
21
22 import java.util.ArrayList;
23 import java.util.List;
24
25 public class AdminUserApplications {
26         private List<Application> apps = new ArrayList<Application>();
27         
28         private Long user_Id;
29         private String firstName;
30         private String lastName;
31         private String orgUserId;
32         
33         public AdminUserApplications(AdminUserApp app) {
34                 setUser_Id(app.getUser_Id());
35                 setOrgUserId(app.getOrgUserId());
36                 setFirstName(app.getFirstName());
37                 setLastName(app.getLastName());
38                 
39                 addApp(app.getAppId(), app.getAppName());
40         }
41         public Long getUser_Id() {
42                 return user_Id;
43         }
44         public void setUser_Id(Long user_Id) {
45                 this.user_Id = user_Id;
46         }
47         public String getFirstName() {
48                 return firstName;
49         }
50         public void setFirstName(String firstName) {
51                 this.firstName = firstName;
52         }
53         public String getLastName() {
54                 return lastName;
55         }
56         public void setLastName(String lastName) {
57                 this.lastName = lastName;
58         }
59         public String getOrgUserId() {
60                 return orgUserId;
61         }
62         public void setOrgUserId(String orgUserId) {
63                 this.orgUserId = orgUserId;
64         }
65         public List<Application> getApps() {
66                 return apps;
67         }
68         public void setApps(List<Application> apps) {
69                 this.apps = apps;
70         }
71         public void addApp(Long otherAppId, String otherAppName) {
72                 apps.add(new Application(otherAppId, otherAppName));
73         }
74
75         public class Application {
76                 private Long appId; 
77                 private String appName; 
78                 
79                 public Application(Long otherAppId, String otherAppName) {
80                         setAppId(otherAppId);
81                         setAppName(otherAppName);
82                 }
83                 public Long getAppId() {
84                         return appId;
85                 }
86                 public void setAppId(Long appId) {
87                         this.appId = appId;
88                 }
89                 public String getAppName() {
90                         return appName;
91                 }
92                 public void setAppName(String appName) {
93                         this.appName = appName;
94                 }
95         }
96 }