Deliver centralized role management feature
[portal.git] / ecomp-portal-BE-common / src / main / java / org / openecomp / portalapp / portal / domain / ExternalRoleDetails.java
1 package org.openecomp.portalapp.portal.domain;
2
3 import java.util.List;
4
5 public class ExternalRoleDetails implements Comparable {
6
7         
8         private String  name;
9     private boolean active;
10     private Integer priority;
11     
12     private Long appId;     // used by ECOMP only 
13     private Long appRoleId; // used by ECOMP only
14
15         private List<EPAppRoleFunction> perms;
16
17         public String getName() {
18                 return name;
19         }
20
21         public void setName(String name) {
22                 this.name = name;
23         }
24
25         public boolean isActive() {
26                 return active;
27         }
28
29         public void setActive(boolean active) {
30                 this.active = active;
31         }
32
33         public Integer getPriority() {
34                 return priority;
35         }
36
37         public void setPriority(Integer priority) {
38                 this.priority = priority;
39         }
40
41         public Long getAppId() {
42                 return appId;
43         }
44
45         public void setAppId(Long appId) {
46                 this.appId = appId;
47         }
48
49         public Long getAppRoleId() {
50                 return appRoleId;
51         }
52
53         public void setAppRoleId(Long appRoleId) {
54                 this.appRoleId = appRoleId;
55         }
56
57
58
59         public List<EPAppRoleFunction> getPerms() {
60                 return perms;
61         }
62
63         public void setPerms(List<EPAppRoleFunction> perms) {
64                 this.perms = perms;
65         }
66
67         @Override
68         public int compareTo(Object obj) {
69                 EPRole other = (EPRole)obj;
70
71         String c1 = getName();
72         String c2 = other.getName();
73
74         return (c1 == null || c2 == null) ? 1 : c1.compareTo(c2);
75         }
76
77         
78 }