1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.wiki.provisioning; |
21 |
|
|
22 |
|
import java.util.List; |
23 |
|
|
24 |
|
import org.apache.commons.lang3.builder.EqualsBuilder; |
25 |
|
import org.apache.commons.lang3.builder.HashCodeBuilder; |
26 |
|
import org.xwiki.job.AbstractRequest; |
27 |
|
import org.xwiki.model.reference.DocumentReference; |
28 |
|
|
29 |
|
|
30 |
|
@link |
31 |
|
|
32 |
|
@since |
33 |
|
@version |
34 |
|
|
|
|
| 59.5% |
Uncovered Elements: 15 (37) |
Complexity: 12 |
Complexity Density: 0.52 |
|
35 |
|
public class WikiProvisioningJobRequest extends AbstractRequest |
36 |
|
{ |
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
public static final String PROPERTY_WIKI_ID = "wikiprovisioning.wikiId"; |
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
public static final String PROPERTY_PROVISIONING_JOB_PARAMETER = "wikiprovisioning.parameter"; |
46 |
|
|
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
public static final String PROPERTY_PROVISIONING_USER = "wikiprovisioning.user"; |
51 |
|
|
52 |
|
|
53 |
|
|
54 |
|
@param |
55 |
|
@param |
56 |
|
@param |
57 |
|
@deprecated@link |
58 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
59 |
0 |
@Deprecated... |
60 |
|
public WikiProvisioningJobRequest(List<String> id, String wikiId, Object parameter) |
61 |
|
{ |
62 |
0 |
setId(id); |
63 |
0 |
setWikiId(wikiId); |
64 |
0 |
setProvisioningJobParameter(parameter); |
65 |
|
} |
66 |
|
|
67 |
|
|
68 |
|
|
69 |
|
@param |
70 |
|
@param |
71 |
|
@param |
72 |
|
@param |
73 |
|
@since |
74 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
75 |
2 |
public WikiProvisioningJobRequest(List<String> id, String wikiId, Object parameter,... |
76 |
|
DocumentReference provisioningUser) |
77 |
|
{ |
78 |
2 |
setId(id); |
79 |
2 |
setWikiId(wikiId); |
80 |
2 |
setProvisioningJobParameter(parameter); |
81 |
2 |
setProvisioningUser(provisioningUser); |
82 |
|
} |
83 |
|
|
84 |
|
|
85 |
|
@param |
86 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
87 |
2 |
public void setWikiId(String wikiId)... |
88 |
|
{ |
89 |
2 |
setProperty(PROPERTY_WIKI_ID, wikiId); |
90 |
|
} |
91 |
|
|
92 |
|
|
93 |
|
@return |
94 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
95 |
4 |
public String getWikiId()... |
96 |
|
{ |
97 |
4 |
return getProperty(PROPERTY_WIKI_ID); |
98 |
|
} |
99 |
|
|
100 |
|
|
101 |
|
@param |
102 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
103 |
2 |
public void setProvisioningJobParameter(Object parameter)... |
104 |
|
{ |
105 |
2 |
setProperty(PROPERTY_PROVISIONING_JOB_PARAMETER, parameter); |
106 |
|
} |
107 |
|
|
108 |
|
|
109 |
|
@return |
110 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
111 |
4 |
public Object getProvisioningJobParameter()... |
112 |
|
{ |
113 |
4 |
return getProperty(PROPERTY_PROVISIONING_JOB_PARAMETER); |
114 |
|
} |
115 |
|
|
116 |
|
|
117 |
|
@param |
118 |
|
@since |
119 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
120 |
2 |
public void setProvisioningUser(DocumentReference userReference)... |
121 |
|
{ |
122 |
2 |
setProperty(PROPERTY_PROVISIONING_USER, userReference); |
123 |
|
} |
124 |
|
|
125 |
|
|
126 |
|
@return |
127 |
|
@since |
128 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
129 |
0 |
public DocumentReference getProvisioningUser()... |
130 |
|
{ |
131 |
0 |
return getProperty(PROPERTY_PROVISIONING_USER); |
132 |
|
} |
133 |
|
|
|
|
| 60% |
Uncovered Elements: 4 (10) |
Complexity: 3 |
Complexity Density: 0.5 |
|
134 |
2 |
@Override... |
135 |
|
public boolean equals(Object o) |
136 |
|
{ |
137 |
2 |
if (this == o) { |
138 |
0 |
return true; |
139 |
|
} |
140 |
|
|
141 |
2 |
if (!(o instanceof WikiProvisioningJobRequest)) { |
142 |
0 |
return false; |
143 |
|
} |
144 |
|
|
145 |
2 |
WikiProvisioningJobRequest r = (WikiProvisioningJobRequest) o; |
146 |
2 |
return new EqualsBuilder().append(r.getId(), getId()).append(r.getWikiId(), getWikiId()).append( |
147 |
|
r.getProvisioningJobParameter(), getProvisioningJobParameter()).isEquals(); |
148 |
|
} |
149 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
150 |
0 |
@Override... |
151 |
|
public int hashCode() |
152 |
|
{ |
153 |
0 |
HashCodeBuilder builder = new HashCodeBuilder(); |
154 |
0 |
builder.append(getId()); |
155 |
0 |
builder.append(getWikiId()).append(getProvisioningJobParameter()); |
156 |
0 |
return builder.hashCode(); |
157 |
|
} |
158 |
|
|
159 |
|
} |