summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/ExternalRoleDetails.java
blob: e30b5d36b8fd5c8dc09ce2658e694cd9ec3032a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
package org.openecomp.portalapp.portal.domain;

import java.util.List;

public class ExternalRoleDetails implements Comparable {

	
	private String  name;
    private boolean active;
    private Integer priority;
    
    private Long appId;     // used by ECOMP only 
    private Long appRoleId; // used by ECOMP only

	private List<EPAppRoleFunction> perms;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public boolean isActive() {
		return active;
	}

	public void setActive(boolean active) {
		this.active = active;
	}

	public Integer getPriority() {
		return priority;
	}

	public void setPriority(Integer priority) {
		this.priority = priority;
	}

	public Long getAppId() {
		return appId;
	}

	public void setAppId(Long appId) {
		this.appId = appId;
	}

	public Long getAppRoleId() {
		return appRoleId;
	}

	public void setAppRoleId(Long appRoleId) {
		this.appRoleId = appRoleId;
	}



	public List<EPAppRoleFunction> getPerms() {
		return perms;
	}

	public void setPerms(List<EPAppRoleFunction> perms) {
		this.perms = perms;
	}

	@Override
	public int compareTo(Object obj) {
		EPRole other = (EPRole)obj;

    	String c1 = getName();
    	String c2 = other.getName();

    	return (c1 == null || c2 == null) ? 1 : c1.compareTo(c2);
	}

	
}