Deliver centralized role management feature
[portal.git] / ecomp-portal-BE-common / src / main / java / org / openecomp / portalapp / portal / transport / ExternalAccessPerms.java
1 package org.openecomp.portalapp.portal.transport;
2
3 import java.io.Serializable;
4
5 public class ExternalAccessPerms implements Serializable, Comparable{
6
7         /**
8          * 
9          */
10         private static final long serialVersionUID = -200964838466882602L;
11         public String type;
12         public String instance;
13         public String action;
14         public String description;
15         
16         
17         public ExternalAccessPerms() {
18                 super();
19         }
20         
21         
22         
23         public ExternalAccessPerms(String type, String instance, String action, String description) {
24                 super();
25                 this.type = type;
26                 this.instance = instance;
27                 this.action = action;
28                 this.description = description;
29         }
30
31         public ExternalAccessPerms(String type, String instance, String action) {
32                 super();
33                 this.type = type;
34                 this.instance = instance;
35                 this.action = action;
36         }
37
38
39         /**
40          * @return the type
41          */
42         public String getType() {
43                 return type;
44         }
45         /**
46          * @param type the type to set
47          */
48         public void setType(String type) {
49                 this.type = type;
50         }
51         /**
52          * @return the instance
53          */
54         public String getInstance() {
55                 return instance;
56         }
57         /**
58          * @param instance the instance to set
59          */
60         public void setInstance(String instance) {
61                 this.instance = instance;
62         }
63         /**
64          * @return the action
65          */
66         public String getAction() {
67                 return action;
68         }
69         /**
70          * @param action the action to set
71          */
72         public void setAction(String action) {
73                 this.action = action;
74         }
75
76         public String getDescription() {
77                 return description;
78         }
79
80         public void setDescription(String description) {
81                 this.description = description;
82         }
83
84
85         @Override
86         public int compareTo(Object obj){
87         ExternalAccessPerms other = (ExternalAccessPerms)obj;
88
89         String c1 = getInstance();
90         String c2 = other.getInstance();
91
92         return (c1 == null || c2 == null) ? 1 : c1.compareTo(c2);
93         }
94         
95         
96 }