1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
package org.kuali.student.enrollment.class1.lui.service.decorators; |
18 | |
|
19 | |
import java.util.List; |
20 | |
|
21 | |
import org.kuali.rice.core.api.criteria.QueryByCriteria; |
22 | |
|
23 | |
import org.kuali.student.enrollment.lui.dto.LuiInfo; |
24 | |
import org.kuali.student.enrollment.lui.dto.LuiLuiRelationInfo; |
25 | |
import org.kuali.student.enrollment.lui.dto.LuiCapacityInfo; |
26 | |
|
27 | |
import org.kuali.student.enrollment.lui.service.LuiService; |
28 | |
import org.kuali.student.r2.common.dto.ContextInfo; |
29 | |
import org.kuali.student.r2.common.dto.StatusInfo; |
30 | |
import org.kuali.student.r2.common.dto.ValidationResultInfo; |
31 | |
|
32 | |
import org.kuali.student.r2.common.exceptions.CircularRelationshipException; |
33 | |
import org.kuali.student.r2.common.exceptions.DataValidationErrorException; |
34 | |
import org.kuali.student.r2.common.exceptions.DependentObjectsExistException; |
35 | |
import org.kuali.student.r2.common.exceptions.DoesNotExistException; |
36 | |
import org.kuali.student.r2.common.exceptions.InvalidParameterException; |
37 | |
import org.kuali.student.r2.common.exceptions.MissingParameterException; |
38 | |
import org.kuali.student.r2.common.exceptions.OperationFailedException; |
39 | |
import org.kuali.student.r2.common.exceptions.PermissionDeniedException; |
40 | |
import org.kuali.student.r2.common.exceptions.ReadOnlyException; |
41 | |
import org.kuali.student.r2.common.exceptions.VersionMismatchException; |
42 | |
|
43 | |
|
44 | 0 | public class LuiServiceDecorator |
45 | |
implements LuiService { |
46 | |
|
47 | |
private LuiService nextDecorator; |
48 | |
|
49 | |
public LuiService getNextDecorator() |
50 | |
throws OperationFailedException { |
51 | 0 | if (null == nextDecorator) { |
52 | 0 | throw new OperationFailedException("Misconfigured application: nextDecorator is null"); |
53 | |
} |
54 | |
|
55 | 0 | return nextDecorator; |
56 | |
} |
57 | |
|
58 | |
public void setNextDecorator(LuiService nextDecorator) { |
59 | 0 | this.nextDecorator = nextDecorator; |
60 | 0 | } |
61 | |
|
62 | |
@Override |
63 | |
public LuiInfo getLui(String luiId, ContextInfo contextInfo) |
64 | |
throws DoesNotExistException, InvalidParameterException, |
65 | |
MissingParameterException, OperationFailedException, |
66 | |
PermissionDeniedException { |
67 | |
|
68 | 0 | return getNextDecorator().getLui(luiId, contextInfo); |
69 | |
} |
70 | |
|
71 | |
@Override |
72 | |
public List<LuiInfo> getLuisByIds(List<String> luiIds, ContextInfo contextInfo) |
73 | |
throws DoesNotExistException, InvalidParameterException, |
74 | |
MissingParameterException, OperationFailedException, |
75 | |
PermissionDeniedException { |
76 | |
|
77 | 0 | return getNextDecorator().getLuisByIds(luiIds, contextInfo); |
78 | |
} |
79 | |
|
80 | |
@Override |
81 | |
public List<String> getLuiIdsByType(String luiTypeKey, ContextInfo contextInfo) |
82 | |
throws InvalidParameterException, MissingParameterException, |
83 | |
OperationFailedException, PermissionDeniedException { |
84 | |
|
85 | 0 | return getNextDecorator().getLuiIdsByType(luiTypeKey, contextInfo); |
86 | |
} |
87 | |
|
88 | |
@Override |
89 | |
public List<String> getLuiIdsByClu(String cluId, ContextInfo contextInfo) |
90 | |
throws InvalidParameterException, MissingParameterException, |
91 | |
OperationFailedException, PermissionDeniedException { |
92 | |
|
93 | 0 | return getNextDecorator().getLuiIdsByClu(cluId, contextInfo); |
94 | |
} |
95 | |
|
96 | |
@Override |
97 | |
public List<String> getLuiIdsByAtpAndType(String atpId, String typeKey, ContextInfo contextInfo) |
98 | |
throws InvalidParameterException, MissingParameterException, |
99 | |
OperationFailedException, PermissionDeniedException { |
100 | |
|
101 | 0 | return getNextDecorator().getLuiIdsByAtpAndType(atpId, typeKey, contextInfo); |
102 | |
} |
103 | |
|
104 | |
@Override |
105 | |
public List<String> getLuiIdsByAtpAndClu(String cluId, String atpId, ContextInfo contextInfo) |
106 | |
throws InvalidParameterException, MissingParameterException, |
107 | |
OperationFailedException, PermissionDeniedException { |
108 | |
|
109 | 0 | return getNextDecorator().getLuiIdsByAtpAndClu(cluId, atpId, contextInfo); |
110 | |
} |
111 | |
|
112 | |
@Override |
113 | |
public List<LuiInfo> getLuisByAtpAndClu(String cluId, String atpId, ContextInfo contextInfo) |
114 | |
throws InvalidParameterException, MissingParameterException, |
115 | |
OperationFailedException, PermissionDeniedException { |
116 | |
|
117 | 0 | return getNextDecorator().getLuisByAtpAndClu(cluId, atpId, contextInfo); |
118 | |
} |
119 | |
|
120 | |
@Override |
121 | |
public List<String> searchForLuiIds(QueryByCriteria criteria, ContextInfo contextInfo) |
122 | |
throws InvalidParameterException, MissingParameterException, |
123 | |
OperationFailedException, PermissionDeniedException { |
124 | |
|
125 | 0 | return getNextDecorator().searchForLuiIds(criteria, contextInfo); |
126 | |
} |
127 | |
|
128 | |
@Override |
129 | |
public List<LuiInfo> searchForLuis(QueryByCriteria criteria, ContextInfo contextInfo) |
130 | |
throws InvalidParameterException, MissingParameterException, |
131 | |
OperationFailedException, PermissionDeniedException { |
132 | |
|
133 | 0 | return getNextDecorator().searchForLuis(criteria, contextInfo); |
134 | |
} |
135 | |
|
136 | |
@Override |
137 | |
public List<ValidationResultInfo> validateLui(String validationTypeKey, String cluId, |
138 | |
String atpId, String luiTypeKey, |
139 | |
LuiInfo luiInfo, ContextInfo contextInfo) |
140 | |
throws DoesNotExistException, InvalidParameterException, |
141 | |
MissingParameterException, OperationFailedException, |
142 | |
PermissionDeniedException { |
143 | |
|
144 | 0 | return getNextDecorator().validateLui(validationTypeKey, cluId, atpId, luiTypeKey, luiInfo, contextInfo); |
145 | |
} |
146 | |
|
147 | |
@Override |
148 | |
public LuiInfo createLui(String cluId, String atpId, String luiTypeKey, LuiInfo luiInfo, ContextInfo contextInfo) |
149 | |
throws DataValidationErrorException, |
150 | |
DoesNotExistException, InvalidParameterException, |
151 | |
MissingParameterException, OperationFailedException, |
152 | |
PermissionDeniedException, ReadOnlyException { |
153 | |
|
154 | 0 | return getNextDecorator().createLui(cluId, atpId, luiTypeKey, luiInfo, contextInfo); |
155 | |
} |
156 | |
|
157 | |
@Override |
158 | |
public LuiInfo updateLui(String luiId, LuiInfo luiInfo, ContextInfo contextInfo) |
159 | |
throws DataValidationErrorException, DoesNotExistException, |
160 | |
InvalidParameterException, MissingParameterException, |
161 | |
OperationFailedException, PermissionDeniedException, |
162 | |
ReadOnlyException, VersionMismatchException { |
163 | |
|
164 | 0 | return getNextDecorator().updateLui(luiId,luiInfo, contextInfo); |
165 | |
} |
166 | |
|
167 | |
@Override |
168 | |
public StatusInfo deleteLui(String luiId, ContextInfo contextInfo) |
169 | |
throws DependentObjectsExistException, DoesNotExistException, |
170 | |
InvalidParameterException, MissingParameterException, |
171 | |
OperationFailedException, PermissionDeniedException { |
172 | |
|
173 | 0 | return getNextDecorator().deleteLui(luiId, contextInfo); |
174 | |
} |
175 | |
|
176 | |
@Override |
177 | |
public LuiLuiRelationInfo getLuiLuiRelation(String luiLuiRelationId, ContextInfo contextInfo) |
178 | |
throws DoesNotExistException, InvalidParameterException, |
179 | |
MissingParameterException, OperationFailedException, |
180 | |
PermissionDeniedException { |
181 | |
|
182 | 0 | return getNextDecorator().getLuiLuiRelation(luiLuiRelationId, contextInfo); |
183 | |
} |
184 | |
|
185 | |
@Override |
186 | |
public List<LuiLuiRelationInfo> getLuiLuiRelationsByIds(List<String> luiLuiRelationIds, ContextInfo contextInfo) |
187 | |
throws DoesNotExistException, InvalidParameterException, |
188 | |
MissingParameterException, OperationFailedException, |
189 | |
PermissionDeniedException { |
190 | |
|
191 | 0 | return getNextDecorator().getLuiLuiRelationsByIds(luiLuiRelationIds, contextInfo); |
192 | |
} |
193 | |
|
194 | |
@Override |
195 | |
public List<String> getLuiLuiRelationIdsByType(String luiLuiRelationTypeKey, ContextInfo contextInfo) |
196 | |
throws InvalidParameterException, MissingParameterException, |
197 | |
OperationFailedException, PermissionDeniedException { |
198 | |
|
199 | 0 | return getNextDecorator().getLuiLuiRelationIdsByType(luiLuiRelationTypeKey, contextInfo); |
200 | |
} |
201 | |
|
202 | |
@Override |
203 | |
public List<LuiLuiRelationInfo> getLuiLuiRelationsByLui(String luiId, ContextInfo contextInfo) |
204 | |
throws InvalidParameterException, MissingParameterException, |
205 | |
OperationFailedException, PermissionDeniedException { |
206 | |
|
207 | 0 | return getNextDecorator().getLuiLuiRelationsByLui(luiId, contextInfo); |
208 | |
} |
209 | |
|
210 | |
@Override |
211 | |
public List<LuiLuiRelationInfo> getLuiLuiRelationsByLuis(String luiId, String relatedLuiId, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
212 | |
|
213 | 0 | return getNextDecorator().getLuiLuiRelationsByLuis(luiId, relatedLuiId, contextInfo); |
214 | |
} |
215 | |
|
216 | |
@Override |
217 | |
public List<LuiInfo> getLuiLuiRelationsByLuiAndLuiType(String luiId, String relatedLuiTypeKey, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException { |
218 | |
|
219 | 0 | return getNextDecorator().getLuiLuiRelationsByLuiAndLuiType(luiId, relatedLuiTypeKey, contextInfo); |
220 | |
} |
221 | |
|
222 | |
@Override |
223 | |
public List<LuiInfo> getLuisByRelatedLuiAndRelationType(String relatedLuiId, String luiLuiRelationTypeKey, ContextInfo contextInfo) |
224 | |
throws InvalidParameterException, MissingParameterException, |
225 | |
OperationFailedException, PermissionDeniedException { |
226 | |
|
227 | 0 | return getNextDecorator().getLuisByRelatedLuiAndRelationType(relatedLuiId, luiLuiRelationTypeKey, contextInfo); |
228 | |
} |
229 | |
|
230 | |
@Override |
231 | |
public List<String> getLuiIdsByRelation(String relatedLuiId, String luiLuiRelationTypeKey, ContextInfo contextInfo) |
232 | |
throws InvalidParameterException, MissingParameterException, |
233 | |
OperationFailedException, PermissionDeniedException { |
234 | |
|
235 | 0 | return getNextDecorator().getLuiIdsByRelation(relatedLuiId, luiLuiRelationTypeKey, contextInfo); |
236 | |
} |
237 | |
|
238 | |
@Override |
239 | |
public List<LuiInfo> getRelatedLuisByLuiAndRelationType(String luiId, String luiLuiRelationTypeKey, ContextInfo contextInfo) |
240 | |
throws InvalidParameterException, MissingParameterException, |
241 | |
OperationFailedException, PermissionDeniedException { |
242 | |
|
243 | 0 | return getNextDecorator().getRelatedLuisByLuiAndRelationType(luiId, luiLuiRelationTypeKey, contextInfo); |
244 | |
} |
245 | |
|
246 | |
@Override |
247 | |
public List<String> getLuiIdsByRelatedLuiAndRelationType(String luiId, String luiLuiRelationTypeKey, ContextInfo contextInfo) |
248 | |
throws InvalidParameterException, MissingParameterException, |
249 | |
OperationFailedException, PermissionDeniedException { |
250 | |
|
251 | 0 | return getNextDecorator().getLuiIdsByRelatedLuiAndRelationType(luiId, luiLuiRelationTypeKey, contextInfo); |
252 | |
} |
253 | |
|
254 | |
@Override |
255 | |
public List<String> searchForLuiLuiRelationIds(QueryByCriteria criteria, ContextInfo contextInfo) |
256 | |
throws InvalidParameterException, MissingParameterException, |
257 | |
OperationFailedException, PermissionDeniedException { |
258 | |
|
259 | 0 | return getNextDecorator().searchForLuiLuiRelationIds(criteria, contextInfo); |
260 | |
} |
261 | |
|
262 | |
@Override |
263 | |
public List<LuiLuiRelationInfo> searchForLuiLuiRelations(QueryByCriteria criteria, ContextInfo contextInfo) |
264 | |
throws InvalidParameterException, MissingParameterException, |
265 | |
OperationFailedException, PermissionDeniedException { |
266 | |
|
267 | 0 | return getNextDecorator().searchForLuiLuiRelations(criteria, contextInfo); |
268 | |
} |
269 | |
|
270 | |
@Override |
271 | |
public List<ValidationResultInfo> validateLuiLuiRelation(String validationTypeKey, String luiId, String relatedLuiId, String luiLuiRelationTypeKey, LuiLuiRelationInfo luiLuiRelationInfo, ContextInfo contextInfo) |
272 | |
throws DoesNotExistException, InvalidParameterException, |
273 | |
MissingParameterException, OperationFailedException, |
274 | |
PermissionDeniedException { |
275 | |
|
276 | 0 | return getNextDecorator().validateLuiLuiRelation(validationTypeKey, luiId, relatedLuiId, luiLuiRelationTypeKey, luiLuiRelationInfo, contextInfo); |
277 | |
} |
278 | |
|
279 | |
@Override |
280 | |
public LuiLuiRelationInfo createLuiLuiRelation(String luiId, String relatedLuiId, String luiLuiRelationTypeKey, LuiLuiRelationInfo luiLuiRelationInfo, ContextInfo contextInfo) |
281 | |
throws CircularRelationshipException, |
282 | |
DataValidationErrorException, DoesNotExistException, |
283 | |
InvalidParameterException, MissingParameterException, |
284 | |
OperationFailedException, PermissionDeniedException, |
285 | |
ReadOnlyException { |
286 | |
|
287 | 0 | return getNextDecorator().createLuiLuiRelation(luiId, relatedLuiId, luiLuiRelationTypeKey, luiLuiRelationInfo, contextInfo); |
288 | |
} |
289 | |
|
290 | |
@Override |
291 | |
public LuiLuiRelationInfo updateLuiLuiRelation(String luiLuiRelationId, LuiLuiRelationInfo luiLuiRelationInfo, ContextInfo contextInfo) |
292 | |
throws DataValidationErrorException, DoesNotExistException, |
293 | |
InvalidParameterException, MissingParameterException, |
294 | |
OperationFailedException, PermissionDeniedException, |
295 | |
ReadOnlyException, VersionMismatchException { |
296 | |
|
297 | 0 | return getNextDecorator().updateLuiLuiRelation(luiLuiRelationId, luiLuiRelationInfo, contextInfo); |
298 | |
} |
299 | |
|
300 | |
@Override |
301 | |
public StatusInfo deleteLuiLuiRelation(String luiLuiRelationId, ContextInfo contextInfo) |
302 | |
throws DoesNotExistException, InvalidParameterException, |
303 | |
MissingParameterException, OperationFailedException, |
304 | |
PermissionDeniedException { |
305 | |
|
306 | 0 | return getNextDecorator().deleteLuiLuiRelation(luiLuiRelationId, contextInfo); |
307 | |
} |
308 | |
|
309 | |
@Override |
310 | |
public LuiCapacityInfo getLuiCapacity(String luiCapacityId, ContextInfo contextInfo) |
311 | |
throws DoesNotExistException, InvalidParameterException, |
312 | |
MissingParameterException, OperationFailedException, |
313 | |
PermissionDeniedException { |
314 | |
|
315 | 0 | return getNextDecorator().getLuiCapacity(luiCapacityId, contextInfo); |
316 | |
} |
317 | |
|
318 | |
@Override |
319 | |
public List<LuiCapacityInfo> getLuiCapacitiesByIds(List<String> luiCapacityIds, ContextInfo contextInfo) |
320 | |
throws DoesNotExistException, InvalidParameterException, |
321 | |
MissingParameterException, OperationFailedException, |
322 | |
PermissionDeniedException { |
323 | |
|
324 | 0 | return getNextDecorator().getLuiCapacitiesByIds(luiCapacityIds, contextInfo); |
325 | |
} |
326 | |
|
327 | |
@Override |
328 | |
public List<LuiCapacityInfo> getLuiCapacitiesByLui(String luiId, ContextInfo contextInfo) |
329 | |
throws InvalidParameterException, MissingParameterException, |
330 | |
OperationFailedException, PermissionDeniedException { |
331 | 0 | return getNextDecorator().getLuiCapacitiesByLui(luiId, contextInfo); |
332 | |
} |
333 | |
|
334 | |
|
335 | |
|
336 | |
@Override |
337 | |
public List<String> getLuiCapacityIdsByType(String luiCapacityTypeKey, ContextInfo contextInfo) |
338 | |
throws InvalidParameterException, MissingParameterException, |
339 | |
OperationFailedException, PermissionDeniedException { |
340 | |
|
341 | 0 | return getNextDecorator().getLuiCapacityIdsByType(luiCapacityTypeKey, contextInfo); |
342 | |
} |
343 | |
|
344 | |
@Override |
345 | |
public List<String> searchForLuiCapacityIds(QueryByCriteria criteria, ContextInfo contextInfo) |
346 | |
throws InvalidParameterException, MissingParameterException, |
347 | |
OperationFailedException, PermissionDeniedException { |
348 | |
|
349 | 0 | return getNextDecorator().searchForLuiCapacityIds(criteria, contextInfo); |
350 | |
} |
351 | |
|
352 | |
@Override |
353 | |
public List<LuiCapacityInfo> searchForLuiCapacities(QueryByCriteria criteria, ContextInfo contextInfo) |
354 | |
throws InvalidParameterException, MissingParameterException, |
355 | |
OperationFailedException, PermissionDeniedException { |
356 | |
|
357 | 0 | return getNextDecorator().searchForLuiCapacities(criteria, contextInfo); |
358 | |
} |
359 | |
|
360 | |
@Override |
361 | |
public List<ValidationResultInfo> validateLuiCapacity(String validationTypeKey, String luiCapacityTypeKey, LuiCapacityInfo luiCapacityInfo, ContextInfo contextInfo) |
362 | |
throws DoesNotExistException, InvalidParameterException, |
363 | |
MissingParameterException, OperationFailedException, |
364 | |
PermissionDeniedException { |
365 | |
|
366 | 0 | return getNextDecorator().validateLuiCapacity(validationTypeKey, luiCapacityTypeKey,luiCapacityInfo, contextInfo); |
367 | |
} |
368 | |
|
369 | |
@Override |
370 | |
public LuiCapacityInfo createLuiCapacity(String luiCapacityTypeKey, LuiCapacityInfo luiCapacityInfo, ContextInfo contextInfo) |
371 | |
throws DataValidationErrorException, |
372 | |
DoesNotExistException, InvalidParameterException, |
373 | |
MissingParameterException, OperationFailedException, |
374 | |
PermissionDeniedException, ReadOnlyException { |
375 | |
|
376 | 0 | return getNextDecorator().createLuiCapacity(luiCapacityTypeKey, luiCapacityInfo, contextInfo); |
377 | |
} |
378 | |
|
379 | |
@Override |
380 | |
public LuiCapacityInfo updateLuiCapacity(String luiCapacityId, LuiCapacityInfo luiCapacityInfo, ContextInfo contextInfo) |
381 | |
throws DataValidationErrorException, DoesNotExistException, |
382 | |
InvalidParameterException, MissingParameterException, |
383 | |
OperationFailedException, PermissionDeniedException, |
384 | |
ReadOnlyException, VersionMismatchException { |
385 | |
|
386 | 0 | return getNextDecorator().updateLuiCapacity(luiCapacityId, luiCapacityInfo, contextInfo); |
387 | |
} |
388 | |
|
389 | |
@Override |
390 | |
public StatusInfo deleteLuiCapacity(String luiCapacityId, ContextInfo contextInfo) |
391 | |
throws DoesNotExistException, InvalidParameterException, |
392 | |
MissingParameterException, OperationFailedException, |
393 | |
PermissionDeniedException { |
394 | |
|
395 | 0 | return getNextDecorator().deleteLuiCapacity(luiCapacityId, contextInfo); |
396 | |
} |
397 | |
} |