[PORTAL-7] Rebase
[portal.git] / ecomp-portal-BE-common / src / main / java / org / openecomp / portalapp / portal / transport / BusinessCardApplicationRolesList.java
1 /*-\r
2  * ================================================================================\r
3  * ECOMP Portal\r
4  * ================================================================================\r
5  * Copyright (C) 2017 AT&T Intellectual Property\r
6  * ================================================================================\r
7  * Licensed under the Apache License, Version 2.0 (the "License");\r
8  * you may not use this file except in compliance with the License.\r
9  * You may obtain a copy of the License at\r
10  * \r
11  *      http://www.apache.org/licenses/LICENSE-2.0\r
12  * \r
13  * Unless required by applicable law or agreed to in writing, software\r
14  * distributed under the License is distributed on an "AS IS" BASIS,\r
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16  * See the License for the specific language governing permissions and\r
17  * limitations under the License.\r
18  * ================================================================================\r
19  */\r
20 package org.openecomp.portalapp.portal.transport;\r
21 \r
22 import java.util.List;\r
23 \r
24 import com.fasterxml.jackson.annotation.JsonInclude;\r
25 \r
26 @JsonInclude(JsonInclude.Include.NON_NULL)\r
27 public class BusinessCardApplicationRolesList {\r
28 \r
29         public BusinessCardApplicationRolesList(){}\r
30 \r
31     private String appName;\r
32         private List<String> roleNames;\r
33 \r
34 \r
35         public String getAppName() {\r
36                 return appName;\r
37         }\r
38         public void setAppName(String appName) {\r
39                 this.appName = appName;\r
40         }\r
41         public List<String> getRoleNames() {\r
42                 return roleNames;\r
43         }\r
44         public void setRoleNames(List<String> roleNames) {\r
45                 this.roleNames = roleNames;\r
46         }\r
47         public BusinessCardApplicationRolesList(String appName, List<String> roleNames) {\r
48                 super();\r
49                 this.appName = appName;\r
50                 this.roleNames = roleNames;\r
51         }\r
52         @Override\r
53         public String toString() {\r
54                 return "BusinessCardUserAppRoles [appName=" + appName + ", roleNames=" + roleNames + "]";\r
55         }\r
56         @Override\r
57         public int hashCode() {\r
58                 final int prime = 31;\r
59                 int result = 1;\r
60                 result = prime * result + ((appName == null) ? 0 : appName.hashCode());\r
61                 result = prime * result + ((roleNames == null) ? 0 : roleNames.hashCode());\r
62                 return result;\r
63         }\r
64         @Override\r
65         public boolean equals(Object obj) {\r
66                 if (this == obj)\r
67                         return true;\r
68                 if (obj == null)\r
69                         return false;\r
70                 if (getClass() != obj.getClass())\r
71                         return false;\r
72                 BusinessCardApplicationRolesList other = (BusinessCardApplicationRolesList) obj;\r
73                 if (appName == null) {\r
74                         if (other.appName != null)\r
75                                 return false;\r
76                 } else if (!appName.equals(other.appName))\r
77                         return false;\r
78                 if (roleNames == null) {\r
79                         if (other.roleNames != null)\r
80                                 return false;\r
81                 } else if (!roleNames.equals(other.roleNames))\r
82                         return false;\r
83                 return true;\r
84         }\r
85         \r
86 }\r