68effb0cd87250aec920fa0ceb634113de67f015
[portal/sdk.git] /
1 /*-
2  * ============LICENSE_START==========================================
3  * ONAP Portal SDK
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  * 
37  */
38 package org.onap.portalsdk.external.authorization.domain;
39
40 import java.util.List;
41
42 public class ExternalRoleDescription {
43
44         private String id;
45         private String  name;
46     private String active;
47     private String priority;
48     private String appId;
49     private String appRoleId;
50     private List<ExternalAccessPerms> permissions;
51     
52         public String getId() {
53                 return id;
54         }
55         public void setId(String id) {
56                 this.id = id;
57         }
58         public String getName() {
59                 return name;
60         }
61         public void setName(String name) {
62                 this.name = name;
63         }
64         public String getActive() {
65                 return active;
66         }
67         public void setActive(String active) {
68                 this.active = active;
69         }
70         public String getPriority() {
71                 return priority;
72         }
73         public void setPriority(String priority) {
74                 this.priority = priority;
75         }
76         public String getAppId() {
77                 return appId;
78         }
79         public void setAppId(String appId) {
80                 this.appId = appId;
81         }
82         public String getAppRoleId() {
83                 return appRoleId;
84         }
85         public void setAppRoleId(String appRoleId) {
86                 this.appRoleId = appRoleId;
87         }
88         
89         public List<ExternalAccessPerms> getPermissions() {
90                 return permissions;
91         }
92         public void setPermissions(List<ExternalAccessPerms> permissions) {
93                 this.permissions = permissions;
94         }
95         @Override
96         public int hashCode() {
97                 final int prime = 31;
98                 int result = 1;
99                 result = prime * result + ((active == null) ? 0 : active.hashCode());
100                 result = prime * result + ((appId == null) ? 0 : appId.hashCode());
101                 result = prime * result + ((appRoleId == null) ? 0 : appRoleId.hashCode());
102                 result = prime * result + ((id == null) ? 0 : id.hashCode());
103                 result = prime * result + ((name == null) ? 0 : name.hashCode());
104                 result = prime * result + ((priority == null) ? 0 : priority.hashCode());
105                 return result;
106         }
107         @Override
108         public boolean equals(Object obj) {
109                 if (this == obj)
110                         return true;
111                 if (obj == null)
112                         return false;
113                 if (getClass() != obj.getClass())
114                         return false;
115                 ExternalRoleDescription other = (ExternalRoleDescription) obj;
116                 if (active == null) {
117                         if (other.active != null)
118                                 return false;
119                 } else if (!active.equals(other.active))
120                         return false;
121                 if (appId == null) {
122                         if (other.appId != null)
123                                 return false;
124                 } else if (!appId.equals(other.appId))
125                         return false;
126                 if (appRoleId == null) {
127                         if (other.appRoleId != null)
128                                 return false;
129                 } else if (!appRoleId.equals(other.appRoleId))
130                         return false;
131                 if (id == null) {
132                         if (other.id != null)
133                                 return false;
134                 } else if (!id.equals(other.id))
135                         return false;
136                 if (name == null) {
137                         if (other.name != null)
138                                 return false;
139                 } else if (!name.equals(other.name))
140                         return false;
141                 if (priority == null) {
142                         if (other.priority != null)
143                                 return false;
144                 } else if (!priority.equals(other.priority))
145                         return false;
146                 return true;
147         }
148     
149     
150 }