1
|
package eu.dnetlib.domain.enabling;
|
2
|
|
3
|
import eu.dnetlib.domain.DriverResource;
|
4
|
|
5
|
import java.util.ArrayList;
|
6
|
import java.util.List;
|
7
|
|
8
|
/**
|
9
|
*
|
10
|
* The domain object for the SecurityProfile resource data structure
|
11
|
*
|
12
|
*/
|
13
|
public class SecurityProfile extends DriverResource{
|
14
|
private static final long serialVersionUID = 6533097295469183688L;
|
15
|
|
16
|
private String driverResourceId;
|
17
|
private List<String> identities = new ArrayList<String>();
|
18
|
private String password = null;
|
19
|
|
20
|
public SecurityProfile() {
|
21
|
this.setResourceKind("SecurityProfileDSResources");
|
22
|
this.setResourceType("SecurityProfileDSResourceType");
|
23
|
}
|
24
|
|
25
|
@Deprecated
|
26
|
public String getId() {
|
27
|
return this.getResourceId();
|
28
|
}
|
29
|
|
30
|
@Deprecated
|
31
|
public void setId(String id) {
|
32
|
this.setResourceId(id);
|
33
|
}
|
34
|
|
35
|
public List<String> getIdentities() {
|
36
|
return identities;
|
37
|
}
|
38
|
|
39
|
public void setIdentities(List<String> identities) {
|
40
|
this.identities = identities;
|
41
|
}
|
42
|
|
43
|
public String getDriverResourceId() {
|
44
|
return driverResourceId;
|
45
|
}
|
46
|
|
47
|
public void setDriverResourceId(String recourceId) {
|
48
|
this.driverResourceId = recourceId;
|
49
|
}
|
50
|
|
51
|
public String getPassword() {
|
52
|
return password;
|
53
|
}
|
54
|
|
55
|
public void setPassword(String password) {
|
56
|
this.password = password;
|
57
|
}
|
58
|
|
59
|
@Override
|
60
|
public int hashCode() {
|
61
|
final int prime = 31;
|
62
|
int result = super.hashCode();
|
63
|
result = prime
|
64
|
* result
|
65
|
+ ((driverResourceId == null) ? 0 : driverResourceId.hashCode());
|
66
|
result = prime * result
|
67
|
+ ((identities == null) ? 0 : identities.hashCode());
|
68
|
result = prime * result
|
69
|
+ ((password == null) ? 0 : password.hashCode());
|
70
|
return result;
|
71
|
}
|
72
|
|
73
|
@Override
|
74
|
public boolean equals(Object obj) {
|
75
|
if (this == obj)
|
76
|
return true;
|
77
|
if (!super.equals(obj))
|
78
|
return false;
|
79
|
if (getClass() != obj.getClass())
|
80
|
return false;
|
81
|
SecurityProfile other = (SecurityProfile) obj;
|
82
|
if (driverResourceId == null) {
|
83
|
if (other.driverResourceId != null)
|
84
|
return false;
|
85
|
} else if (!driverResourceId.equals(other.driverResourceId))
|
86
|
return false;
|
87
|
if (identities == null) {
|
88
|
if (other.identities != null)
|
89
|
return false;
|
90
|
} else if (!identities.equals(other.identities))
|
91
|
return false;
|
92
|
if (password == null) {
|
93
|
if (other.password != null)
|
94
|
return false;
|
95
|
} else if (!password.equals(other.password))
|
96
|
return false;
|
97
|
return true;
|
98
|
}
|
99
|
}
|