1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.wiki.user; |
21 |
|
|
22 |
|
import org.apache.commons.lang3.builder.EqualsBuilder; |
23 |
|
import org.apache.commons.lang3.builder.HashCodeBuilder; |
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
@since |
29 |
|
@version |
30 |
|
|
|
|
| 80% |
Uncovered Elements: 4 (20) |
Complexity: 8 |
Complexity Density: 0.73 |
|
31 |
|
public class WikiUserConfiguration |
32 |
|
{ |
33 |
|
private UserScope userScope; |
34 |
|
|
35 |
|
private MembershipType membershipType; |
36 |
|
|
37 |
|
|
38 |
|
|
39 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
40 |
96 |
public WikiUserConfiguration()... |
41 |
|
{ |
42 |
|
|
43 |
96 |
setUserScope(UserScope.GLOBAL_ONLY); |
44 |
96 |
setMembershipType(MembershipType.INVITE); |
45 |
|
} |
46 |
|
|
47 |
|
|
48 |
|
@return |
49 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
50 |
66 |
public UserScope getUserScope()... |
51 |
|
{ |
52 |
66 |
return userScope; |
53 |
|
} |
54 |
|
|
55 |
|
|
56 |
|
@param |
57 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
58 |
160 |
public void setUserScope(UserScope scope)... |
59 |
|
{ |
60 |
160 |
this.userScope = scope; |
61 |
|
} |
62 |
|
|
63 |
|
|
64 |
|
@param |
65 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
66 |
160 |
public void setMembershipType(MembershipType type)... |
67 |
|
{ |
68 |
160 |
this.membershipType = type; |
69 |
|
} |
70 |
|
|
71 |
|
|
72 |
|
@return |
73 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
74 |
36 |
public MembershipType getMembershipType()... |
75 |
|
{ |
76 |
36 |
return membershipType; |
77 |
|
} |
78 |
|
|
|
|
| 66.7% |
Uncovered Elements: 2 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
79 |
6 |
@Override... |
80 |
|
public boolean equals(Object o) |
81 |
|
{ |
82 |
6 |
if (!(o instanceof WikiUserConfiguration)) { |
83 |
0 |
return false; |
84 |
|
} |
85 |
|
|
86 |
6 |
WikiUserConfiguration otherConfig = (WikiUserConfiguration) o; |
87 |
6 |
return new EqualsBuilder().append(this.membershipType, otherConfig.membershipType) |
88 |
|
.append(this.userScope, otherConfig.userScope).isEquals(); |
89 |
|
} |
90 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
91 |
0 |
@Override... |
92 |
|
public int hashCode() |
93 |
|
{ |
94 |
0 |
return new HashCodeBuilder().append(this.membershipType).append(this.userScope).toHashCode(); |
95 |
|
} |
96 |
|
} |