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