[PORTAL-16 PORTAL-18] Widget ms; staging
[portal.git] / ecomp-portal-BE-common / src / main / java / org / openecomp / portalapp / portal / transport / BusinessCardApplicationRolesList.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.transport;
21
22 import java.util.List;
23
24 import com.fasterxml.jackson.annotation.JsonInclude;
25
26 @JsonInclude(JsonInclude.Include.NON_NULL)
27 public class BusinessCardApplicationRolesList {
28
29         public BusinessCardApplicationRolesList(){}
30
31     private String appName;
32         private List<String> roleNames;
33
34
35         public String getAppName() {
36                 return appName;
37         }
38         public void setAppName(String appName) {
39                 this.appName = appName;
40         }
41         public List<String> getRoleNames() {
42                 return roleNames;
43         }
44         public void setRoleNames(List<String> roleNames) {
45                 this.roleNames = roleNames;
46         }
47         public BusinessCardApplicationRolesList(String appName, List<String> roleNames) {
48                 super();
49                 this.appName = appName;
50                 this.roleNames = roleNames;
51         }
52         @Override
53         public String toString() {
54                 return "BusinessCardUserAppRoles [appName=" + appName + ", roleNames=" + roleNames + "]";
55         }
56         @Override
57         public int hashCode() {
58                 final int prime = 31;
59                 int result = 1;
60                 result = prime * result + ((appName == null) ? 0 : appName.hashCode());
61                 result = prime * result + ((roleNames == null) ? 0 : roleNames.hashCode());
62                 return result;
63         }
64         @Override
65         public boolean equals(Object obj) {
66                 if (this == obj)
67                         return true;
68                 if (obj == null)
69                         return false;
70                 if (getClass() != obj.getClass())
71                         return false;
72                 BusinessCardApplicationRolesList other = (BusinessCardApplicationRolesList) obj;
73                 if (appName == null) {
74                         if (other.appName != null)
75                                 return false;
76                 } else if (!appName.equals(other.appName))
77                         return false;
78                 if (roleNames == null) {
79                         if (other.roleNames != null)
80                                 return false;
81                 } else if (!roleNames.equals(other.roleNames))
82                         return false;
83                 return true;
84         }
85         
86 }