1 | |
package org.kuali.student.r2.core.class1.atp.service.decorators; |
2 | |
|
3 | |
import java.util.Date; |
4 | |
import java.util.List; |
5 | |
|
6 | |
import org.kuali.rice.core.api.criteria.QueryByCriteria; |
7 | |
|
8 | |
import org.kuali.student.r2.common.exceptions.*; |
9 | |
import org.kuali.student.r2.core.atp.dto.AtpAtpRelationInfo; |
10 | |
import org.kuali.student.r2.core.atp.dto.AtpInfo; |
11 | |
import org.kuali.student.r2.core.atp.dto.MilestoneInfo; |
12 | |
import org.kuali.student.r2.core.atp.service.AtpService; |
13 | |
|
14 | |
import org.kuali.student.r2.common.dto.ContextInfo; |
15 | |
import org.kuali.student.r2.common.dto.StatusInfo; |
16 | |
import org.kuali.student.r2.common.dto.ValidationResultInfo; |
17 | |
|
18 | |
import javax.jws.WebParam; |
19 | |
|
20 | 0 | public class AtpServiceDecorator implements AtpService { |
21 | |
|
22 | |
private AtpService nextDecorator; |
23 | |
|
24 | |
public AtpService getNextDecorator() throws OperationFailedException { |
25 | 0 | if (null == nextDecorator) { |
26 | 0 | throw new OperationFailedException("Misconfigured application: nextDecorator is null"); |
27 | |
} |
28 | |
|
29 | 0 | return nextDecorator; |
30 | |
} |
31 | |
|
32 | |
public void setNextDecorator(AtpService nextDecorator) { |
33 | 0 | this.nextDecorator = nextDecorator; |
34 | 0 | } |
35 | |
|
36 | |
@Override |
37 | |
public AtpInfo getAtp(String atpId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
38 | |
|
39 | 0 | return getNextDecorator().getAtp(atpId, context); |
40 | |
} |
41 | |
|
42 | |
@Override |
43 | |
public List<AtpInfo> getAtpsByIds(List<String> atpIds, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, |
44 | |
PermissionDeniedException { |
45 | |
|
46 | 0 | return getNextDecorator().getAtpsByIds(atpIds, context); |
47 | |
} |
48 | |
|
49 | |
@Override |
50 | |
public List<String> getAtpIdsByType(String atpTypeKey, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
51 | |
|
52 | 0 | return getNextDecorator().getAtpIdsByType(atpTypeKey, context); |
53 | |
} |
54 | |
|
55 | |
@Override |
56 | |
public List<AtpInfo> getAtpsByDate(Date searchDate, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
57 | |
|
58 | 0 | return getNextDecorator().getAtpsByDate(searchDate, context); |
59 | |
} |
60 | |
|
61 | |
@Override |
62 | |
public List<AtpInfo> getAtpsByDateAndType(Date searchDate, String searchTypeKey, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, |
63 | |
PermissionDeniedException { |
64 | |
|
65 | 0 | return getNextDecorator().getAtpsByDateAndType(searchDate, searchTypeKey, context); |
66 | |
} |
67 | |
|
68 | |
@Override |
69 | |
public List<AtpInfo> getAtpsByDates(Date startDate, Date endDate, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, |
70 | |
PermissionDeniedException { |
71 | |
|
72 | 0 | return getNextDecorator().getAtpsByDates(startDate, endDate, context); |
73 | |
} |
74 | |
|
75 | |
@Override |
76 | |
public List<AtpInfo> getAtpsByDatesAndType(Date startDate, Date endDate, String searchTypeKey, ContextInfo context) throws InvalidParameterException, MissingParameterException, |
77 | |
OperationFailedException, PermissionDeniedException { |
78 | |
|
79 | 0 | return getNextDecorator().getAtpsByDatesAndType(startDate, endDate, searchTypeKey, context); |
80 | |
} |
81 | |
|
82 | |
@Override |
83 | |
public List<AtpInfo> getAtpsByStartDateRange(Date searchDateRangeStart, Date searchDateRangeEnd, ContextInfo context) throws InvalidParameterException, MissingParameterException, |
84 | |
OperationFailedException, PermissionDeniedException { |
85 | |
|
86 | 0 | return getNextDecorator().getAtpsByStartDateRange(searchDateRangeStart, searchDateRangeEnd, context); |
87 | |
} |
88 | |
|
89 | |
@Override |
90 | |
public List<AtpInfo> getAtpsByStartDateRangeAndType(Date searchDateRangeStart, Date searchDateRangeEnd, String searchTypeKey, ContextInfo context) throws InvalidParameterException, |
91 | |
MissingParameterException, OperationFailedException, PermissionDeniedException { |
92 | |
|
93 | 0 | return getNextDecorator().getAtpsByStartDateRangeAndType(searchDateRangeStart, searchDateRangeEnd, searchTypeKey, context); |
94 | |
} |
95 | |
|
96 | |
@Override |
97 | |
public List<AtpInfo> getAtpsByCode(String code, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
98 | 0 | return getNextDecorator().getAtpsByCode(code, contextInfo); |
99 | |
} |
100 | |
|
101 | |
@Override |
102 | |
public MilestoneInfo getMilestone(String milestoneId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, |
103 | |
PermissionDeniedException { |
104 | |
|
105 | 0 | return getNextDecorator().getMilestone(milestoneId, context); |
106 | |
} |
107 | |
|
108 | |
@Override |
109 | |
public List<MilestoneInfo> getMilestonesByIds(List<String> milestoneIds, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
110 | |
OperationFailedException, PermissionDeniedException { |
111 | |
|
112 | 0 | return getNextDecorator().getMilestonesByIds(milestoneIds, context); |
113 | |
} |
114 | |
|
115 | |
@Override |
116 | |
public List<String> getMilestoneIdsByType(String milestoneTypeKey, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, |
117 | |
PermissionDeniedException { |
118 | |
|
119 | 0 | return getNextDecorator().getMilestoneIdsByType(milestoneTypeKey, context); |
120 | |
} |
121 | |
|
122 | |
@Override |
123 | |
public List<MilestoneInfo> getMilestonesForAtp(String atpId, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
124 | |
|
125 | 0 | return getNextDecorator().getMilestonesForAtp(atpId, context); |
126 | |
} |
127 | |
|
128 | |
@Override |
129 | |
public List<MilestoneInfo> getMilestonesByDatesForAtp(@WebParam(name = "atpId") String atpId, @WebParam(name = "startDate") Date startDate, @WebParam(name = "endDate") Date endDate, |
130 | |
@WebParam(name = "contextInfo") ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
131 | 0 | return getNextDecorator().getMilestonesByDatesForAtp(atpId, startDate, endDate, contextInfo); |
132 | |
} |
133 | |
|
134 | |
@Override |
135 | |
public List<MilestoneInfo> getMilestonesByTypeForAtp(@WebParam(name = "atpId") String atpId, @WebParam(name = "milestoneTypeKey") String milestoneTypeKey, |
136 | |
@WebParam(name = "contextInfo") ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
137 | 0 | return getNextDecorator().getMilestonesByTypeForAtp(atpId, milestoneTypeKey, contextInfo); |
138 | |
} |
139 | |
|
140 | |
@Override |
141 | |
public List<MilestoneInfo> getMilestonesByDates(Date startDate, Date endDate, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, |
142 | |
PermissionDeniedException { |
143 | |
|
144 | 0 | return getNextDecorator().getMilestonesByDates(startDate, endDate, context); |
145 | |
} |
146 | |
|
147 | |
@Override |
148 | |
public List<String> searchForAtpIds(QueryByCriteria criteria, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, |
149 | |
PermissionDeniedException { |
150 | |
|
151 | 0 | return getNextDecorator().searchForAtpIds(criteria, context); |
152 | |
} |
153 | |
|
154 | |
@Override |
155 | |
public List<AtpInfo> searchForAtps(QueryByCriteria criteria, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
156 | |
|
157 | 0 | return getNextDecorator().searchForAtps(criteria, context); |
158 | |
} |
159 | |
|
160 | |
@Override |
161 | |
public List<ValidationResultInfo> validateAtp(String validationType, String atpTypeKey, AtpInfo atpInfo, ContextInfo context) throws DoesNotExistException, InvalidParameterException, |
162 | |
MissingParameterException, OperationFailedException, PermissionDeniedException { |
163 | |
|
164 | 0 | return getNextDecorator().validateAtp(validationType, atpTypeKey, atpInfo, context); |
165 | |
} |
166 | |
|
167 | |
@Override |
168 | |
public AtpInfo createAtp(String atpTypeKey, AtpInfo atpInfo, ContextInfo context) throws DataValidationErrorException, InvalidParameterException, MissingParameterException, |
169 | |
OperationFailedException, PermissionDeniedException, ReadOnlyException { |
170 | |
|
171 | 0 | return getNextDecorator().createAtp(atpTypeKey, atpInfo, context); |
172 | |
} |
173 | |
|
174 | |
@Override |
175 | |
public AtpInfo updateAtp(String atpId, AtpInfo atpInfo, ContextInfo context) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, |
176 | |
OperationFailedException, PermissionDeniedException, VersionMismatchException, ReadOnlyException { |
177 | |
|
178 | 0 | return getNextDecorator().updateAtp(atpId, atpInfo, context); |
179 | |
} |
180 | |
|
181 | |
@Override |
182 | |
public StatusInfo deleteAtp(String atpId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, |
183 | |
PermissionDeniedException { |
184 | |
|
185 | 0 | return getNextDecorator().deleteAtp(atpId, context); |
186 | |
} |
187 | |
|
188 | |
@Override |
189 | |
public List<MilestoneInfo> getImpactedMilestones(String milestoneId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
190 | 0 | return getNextDecorator().getImpactedMilestones(milestoneId, contextInfo); |
191 | |
} |
192 | |
|
193 | |
@Override |
194 | |
public List<String> searchForMilestoneIds(QueryByCriteria criteria, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, |
195 | |
PermissionDeniedException { |
196 | |
|
197 | 0 | return getNextDecorator().searchForMilestoneIds(criteria, context); |
198 | |
} |
199 | |
|
200 | |
@Override |
201 | |
public List<MilestoneInfo> searchForMilestones(QueryByCriteria criteria, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, |
202 | |
PermissionDeniedException { |
203 | |
|
204 | 0 | return getNextDecorator().searchForMilestones(criteria, context); |
205 | |
} |
206 | |
|
207 | |
@Override |
208 | |
public List<ValidationResultInfo> validateMilestone(String validationType, MilestoneInfo milestoneInfo, ContextInfo context) throws DoesNotExistException, InvalidParameterException, |
209 | |
MissingParameterException, OperationFailedException, PermissionDeniedException { |
210 | |
|
211 | 0 | return getNextDecorator().validateMilestone(validationType, milestoneInfo, context); |
212 | |
} |
213 | |
|
214 | |
@Override |
215 | |
public MilestoneInfo createMilestone(String milestoneTypeKey, MilestoneInfo milestoneInfo, ContextInfo context) throws DataValidationErrorException, InvalidParameterException, MissingParameterException, |
216 | |
OperationFailedException, PermissionDeniedException, ReadOnlyException { |
217 | |
|
218 | 0 | return getNextDecorator().createMilestone(milestoneTypeKey, milestoneInfo, context); |
219 | |
} |
220 | |
|
221 | |
@Override |
222 | |
public MilestoneInfo updateMilestone(String milestoneId, MilestoneInfo milestoneInfo, ContextInfo context) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, |
223 | |
MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException, ReadOnlyException { |
224 | |
|
225 | 0 | return getNextDecorator().updateMilestone(milestoneId, milestoneInfo, context); |
226 | |
} |
227 | |
|
228 | |
@Override |
229 | |
public StatusInfo deleteMilestone(String milestoneId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, |
230 | |
PermissionDeniedException { |
231 | |
|
232 | 0 | return getNextDecorator().deleteMilestone(milestoneId, context); |
233 | |
} |
234 | |
|
235 | |
@Override |
236 | |
public MilestoneInfo calculateMilestone(String milestoneId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
237 | 0 | return getNextDecorator().calculateMilestone(milestoneId, contextInfo); |
238 | |
} |
239 | |
|
240 | |
@Override |
241 | |
public StatusInfo addMilestoneToAtp(@WebParam(name = "milestoneId") String milestoneId, @WebParam(name = "atpId") String atpId, @WebParam(name = "contextInfo") ContextInfo contextInfo) |
242 | |
throws AlreadyExistsException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
243 | 0 | return getNextDecorator().addMilestoneToAtp(milestoneId, atpId, contextInfo); |
244 | |
} |
245 | |
|
246 | |
@Override |
247 | |
public StatusInfo removeMilestoneFromAtp(@WebParam(name = "milestoneId") String milestoneId, @WebParam(name = "atpId") String atpId, @WebParam(name = "contextInfo") ContextInfo contextInfo) |
248 | |
throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
249 | 0 | return getNextDecorator().removeMilestoneFromAtp(milestoneId, atpId, contextInfo); |
250 | |
} |
251 | |
|
252 | |
@Override |
253 | |
public AtpAtpRelationInfo getAtpAtpRelation(String atpAtpRelationId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
254 | |
OperationFailedException, PermissionDeniedException { |
255 | |
|
256 | 0 | return getNextDecorator().getAtpAtpRelation(atpAtpRelationId, context); |
257 | |
} |
258 | |
|
259 | |
@Override |
260 | |
public List<AtpAtpRelationInfo> getAtpAtpRelationsByIds(List<String> atpAtpRelationIds, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, |
261 | |
MissingParameterException, OperationFailedException, PermissionDeniedException { |
262 | 0 | return getNextDecorator().getAtpAtpRelationsByIds(atpAtpRelationIds, contextInfo); |
263 | |
} |
264 | |
|
265 | |
@Override |
266 | |
public List<AtpAtpRelationInfo> getAtpAtpRelationsByAtp(String atpId, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, |
267 | |
PermissionDeniedException { |
268 | |
|
269 | 0 | return getNextDecorator().getAtpAtpRelationsByAtp(atpId, context); |
270 | |
} |
271 | |
|
272 | |
@Override |
273 | |
public List<AtpAtpRelationInfo> getAtpAtpRelationsByAtps(@WebParam(name = "atpId") String atpId, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws InvalidParameterException, |
274 | |
MissingParameterException, OperationFailedException, PermissionDeniedException { |
275 | 0 | return getNextDecorator().getAtpAtpRelationsByAtps(atpId, contextInfo); |
276 | |
} |
277 | |
|
278 | |
@Override |
279 | |
public AtpAtpRelationInfo createAtpAtpRelation(String atpId, |
280 | |
String relatedAtpId, |
281 | |
String atpAtpRelationTypeKey, |
282 | |
AtpAtpRelationInfo atpAtpRelationInfo, |
283 | |
ContextInfo contextInfo) |
284 | |
throws DoesNotExistException, |
285 | |
DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException { |
286 | |
|
287 | 0 | return getNextDecorator().createAtpAtpRelation(atpId, relatedAtpId, atpAtpRelationTypeKey, atpAtpRelationInfo, contextInfo); |
288 | |
} |
289 | |
|
290 | |
@Override |
291 | |
public AtpAtpRelationInfo updateAtpAtpRelation(String atpAtpRelationId, AtpAtpRelationInfo atpAtpRelationInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, |
292 | |
InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException, VersionMismatchException { |
293 | 0 | return getNextDecorator().updateAtpAtpRelation(atpAtpRelationId, atpAtpRelationInfo, contextInfo); |
294 | |
} |
295 | |
|
296 | |
@Override |
297 | |
public List<ValidationResultInfo> validateAtpAtpRelation(String validationTypeKey, String atpId, String atpPeerKey, String atpAtpRelationTypeKey, AtpAtpRelationInfo atpAtpRelationInfo, |
298 | |
ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
299 | |
|
300 | 0 | return getNextDecorator().validateAtpAtpRelation(validationTypeKey, atpId, atpPeerKey, atpAtpRelationTypeKey, atpAtpRelationInfo, contextInfo); |
301 | |
} |
302 | |
|
303 | |
@Override |
304 | |
public List<AtpAtpRelationInfo> getAtpAtpRelationsByTypeAndAtp(String atpId, String relationType, ContextInfo context) throws InvalidParameterException, MissingParameterException, |
305 | |
OperationFailedException, PermissionDeniedException { |
306 | 0 | return getNextDecorator().getAtpAtpRelationsByTypeAndAtp(atpId, relationType, context); |
307 | |
} |
308 | |
|
309 | |
@Override |
310 | |
public List<String> getAtpAtpRelationIdsByType(String atpAtpRelationTypeKey, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, |
311 | |
PermissionDeniedException { |
312 | 0 | return getNextDecorator().getAtpAtpRelationIdsByType(atpAtpRelationTypeKey, contextInfo); |
313 | |
} |
314 | |
|
315 | |
@Override |
316 | |
public List<AtpAtpRelationInfo> searchForAtpAtpRelations(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, |
317 | |
PermissionDeniedException { |
318 | 0 | return getNextDecorator().searchForAtpAtpRelations(criteria, contextInfo); |
319 | |
} |
320 | |
|
321 | |
@Override |
322 | |
public StatusInfo deleteAtpAtpRelation(String atpAtpRelationId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, |
323 | |
OperationFailedException, PermissionDeniedException { |
324 | 0 | return getNextDecorator().deleteAtpAtpRelation(atpAtpRelationId, contextInfo); |
325 | |
} |
326 | |
|
327 | |
@Override |
328 | |
public List<String> searchForAtpAtpRelationIds(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, |
329 | |
PermissionDeniedException { |
330 | 0 | return getNextDecorator().searchForAtpAtpRelationIds(criteria, contextInfo); |
331 | |
} |
332 | |
|
333 | |
} |