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