Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
HoldService |
|
| 1.0;1 |
1 | /** | |
2 | * Copyright 2010 The Kuali Foundation Licensed under the | |
3 | * Educational Community License, Version 2.0 (the "License"); you may | |
4 | * not use this file except in compliance with the License. You may | |
5 | * obtain a copy of the License at | |
6 | * | |
7 | * http://www.osedu.org/licenses/ECL-2.0 | |
8 | * | |
9 | * Unless required by applicable law or agreed to in writing, | |
10 | * software distributed under the License is distributed on an "AS IS" | |
11 | * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | |
12 | * or implied. See the License for the specific language governing | |
13 | * permissions and limitations under the License. | |
14 | */ | |
15 | ||
16 | package org.kuali.student.enrollment.hold.service; | |
17 | ||
18 | import java.util.List; | |
19 | ||
20 | import javax.jws.WebParam; | |
21 | import javax.jws.WebService; | |
22 | import javax.jws.soap.SOAPBinding; | |
23 | ||
24 | import org.kuali.rice.core.api.criteria.QueryByCriteria; | |
25 | ||
26 | import org.kuali.student.enrollment.hold.dto.HoldInfo; | |
27 | import org.kuali.student.enrollment.hold.dto.IssueInfo; | |
28 | import org.kuali.student.enrollment.hold.dto.RestrictionInfo; | |
29 | ||
30 | import org.kuali.student.r2.common.dto.ContextInfo; | |
31 | import org.kuali.student.r2.common.dto.StatusInfo; | |
32 | import org.kuali.student.r2.common.dto.ValidationResultInfo; | |
33 | ||
34 | import org.kuali.student.r2.common.service.StateService; | |
35 | import org.kuali.student.r2.common.service.TypeService; | |
36 | import org.kuali.student.r2.common.datadictionary.service.DataDictionaryService; | |
37 | ||
38 | import org.kuali.student.r2.common.exceptions.AlreadyExistsException; | |
39 | import org.kuali.student.r2.common.exceptions.DataValidationErrorException; | |
40 | import org.kuali.student.r2.common.exceptions.DoesNotExistException; | |
41 | import org.kuali.student.r2.common.exceptions.InvalidParameterException; | |
42 | import org.kuali.student.r2.common.exceptions.MissingParameterException; | |
43 | import org.kuali.student.r2.common.exceptions.OperationFailedException; | |
44 | import org.kuali.student.r2.common.exceptions.PermissionDeniedException; | |
45 | import org.kuali.student.r2.common.exceptions.VersionMismatchException; | |
46 | import org.kuali.student.r2.common.util.constants.HoldServiceConstants; | |
47 | ||
48 | /** | |
49 | * Version: DRAFT - NOT READY FOR RELEASE. | |
50 | * | |
51 | * The Hold Service defines a service to manage Restrictions on a | |
52 | * Person by Person basis. Restrictions are a way to put a "stop" on | |
53 | * an action implemented by another service, such as registration for | |
54 | * a course. | |
55 | * | |
56 | * A Restriction is made up of Issues. A Restriction for course | |
57 | * registration may be based on payment of tuition and current | |
58 | * immunization. An Issue can be defined by the Bursar for non-payment | |
59 | * of tuition and by Medical for lack of immunization. Both these | |
60 | * Issues can be mapped to a Restriction. | |
61 | * | |
62 | * The Hold is a relation between a Person and an Issue. A person is | |
63 | * "restricted" if any active Hold exists for any Issue related to a | |
64 | * Restriction. An inactive Hold is one that has been released or | |
65 | * cancelled. The state of the Hold needs to be checked to determine | |
66 | * if a restriction exists. | |
67 | * | |
68 | * Holds can be designated as a warning Hold. A warning Hold is a | |
69 | * non-blocking Hold where a warning message should be displayed to a | |
70 | * Person instead of blocking the action. A Person may not be | |
71 | * restricted but have active warning Holds. | |
72 | * | |
73 | * @author tom | |
74 | * @since Sun May 1 14:22:34 EDT 2011 | |
75 | */ | |
76 | ||
77 | @WebService(name = "HoldService", targetNamespace = HoldServiceConstants.NAMESPACE) | |
78 | @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) | |
79 | public interface HoldService extends DataDictionaryService, StateService, TypeService { | |
80 | ||
81 | /** | |
82 | * Tests if the given person has a Restriction. A person is | |
83 | * restricted if any active non-warning blocking hold exists for | |
84 | * the Person on any Issue related to the given Restriction. | |
85 | * | |
86 | * @param restrictionKey a unique key of the Restriction | |
87 | * @param personId a unique Id of the Person | |
88 | * @param context Context information containing the principalId | |
89 | * and locale information about the caller of service | |
90 | * operation | |
91 | * @return true if a restriction exists, false otherwise | |
92 | * @throws DoesNotExistException restrictionKey or personId not found | |
93 | * @throws InvalidParameterException invalid parameter | |
94 | * @throws MissingParameterException missing parameter | |
95 | * @throws OperationFailedException unable to complete request | |
96 | * @throws PermissionDeniedException authorization failure | |
97 | */ | |
98 | public Boolean isPersonRestricted(@WebParam(name = "restrictionKey") String restrictionKey, @WebParam(name = "personId") String personId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
99 | ||
100 | /** | |
101 | * Gets a list of Person Ids that are restricted. A list of people | |
102 | * with any active non-warning blocking hold exists on any Issue | |
103 | * related to the given Restriction. | |
104 | * | |
105 | * @param restrictionKey a unique key of the Restriction | |
106 | * @param context Context information containing the principalId | |
107 | * and locale information about the caller of service | |
108 | * operation | |
109 | * @return a list of Holds | |
110 | * @throws DoesNotExistException restrictionKey not found | |
111 | * @throws InvalidParameterException invalid holdId | |
112 | * @throws MissingParameterException missing holdId | |
113 | * @throws OperationFailedException unable to complete request | |
114 | * @throws PermissionDeniedException authorization failure | |
115 | */ | |
116 | public List<String> getRestrictedPersons(@WebParam(name = "restrictionKey") String restrictionKey, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
117 | ||
118 | /** | |
119 | * Gets a list of holds for a Person and Restriction. The returned | |
120 | * list includes all Holds for the Person for any Issue related to | |
121 | * the given Restriction. | |
122 | * | |
123 | * @param restrictionKey a unique key of the Restriction | |
124 | * @param personId a unique Id of the Person | |
125 | * @param context Context information containing the principalId | |
126 | * and locale information about the caller of service | |
127 | * operation | |
128 | * @return a list of Holds | |
129 | * @throws DoesNotExistException rstrictionKey or personId not found | |
130 | * @throws InvalidParameterException invalid holdId | |
131 | * @throws MissingParameterException missing holdId | |
132 | * @throws OperationFailedException unable to complete request | |
133 | * @throws PermissionDeniedException authorization failure | |
134 | */ | |
135 | public List<HoldInfo> getHoldsByRestrictionForPerson(@WebParam(name = "restrictionKey") String restrictionKey, @WebParam(name = "personId") String personId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
136 | ||
137 | /** | |
138 | * Gets a list of holds for a Person and Restriction. The returned | |
139 | * list includes only active Holds, both warning and blocking, for | |
140 | * the Person for any Issue related to the given Restriction. An | |
141 | * active Hold is any open Hold that has had not been released or | |
142 | * cancelled. | |
143 | * | |
144 | * @param restrictionKey a unique key of the Restriction | |
145 | * @param personId a unique Id of the Person | |
146 | * @param context Context information containing the principalId | |
147 | * and locale information about the caller of service | |
148 | * operation | |
149 | * @return a list of Holds | |
150 | * @throws DoesNotExistException restrictionKey not found | |
151 | * @throws InvalidParameterException invalid holdId | |
152 | * @throws MissingParameterException missing holdId | |
153 | * @throws OperationFailedException unable to complete request | |
154 | * @throws PermissionDeniedException authorization failure | |
155 | */ | |
156 | public List<HoldInfo> getActiveHoldsByRestrForPerson(@WebParam(name = "restrictionKey") String restrictionKey, @WebParam(name = "personId") String personId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
157 | ||
158 | /** | |
159 | * Retrieves the details of a single Hold by a hold Id. | |
160 | * | |
161 | * @param holdId Unique Id of the Hold to be retrieved | |
162 | * @param context Context information containing the principalId | |
163 | * and locale information about the caller of service | |
164 | * operation | |
165 | * @return the details of the Hold requested | |
166 | * @throws DoesNotExistException holdId not found | |
167 | * @throws InvalidParameterException invalid holdId | |
168 | * @throws MissingParameterException missing holdId | |
169 | * @throws OperationFailedException unable to complete request | |
170 | * @throws PermissionDeniedException authorization failure | |
171 | */ | |
172 | public HoldInfo getHold(@WebParam(name = "holdId") String holdId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
173 | ||
174 | /** | |
175 | * Retrieves a list Holds corresponding to a list of | |
176 | * hold Ids. | |
177 | * | |
178 | * @param holdIdList list of unique Ids of the | |
179 | * Hold to be retrieved | |
180 | * @param context Context information containing the principalId | |
181 | * and locale information about the caller of service | |
182 | * operation | |
183 | * @return a list of Holds | |
184 | * @throws DoesNotExistException a holdId in list not found | |
185 | * @throws InvalidParameterException invalid holdId in list | |
186 | * @throws MissingParameterException missing holdIdList | |
187 | * @throws OperationFailedException unable to complete request | |
188 | * @throws PermissionDeniedException authorization failure | |
189 | */ | |
190 | public List<HoldInfo> getHoldsByIdList(@WebParam(name = "holdIdList") List<String> holdIdList, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
191 | ||
192 | /** | |
193 | * Retrieves a list of Holds by Issue. | |
194 | * | |
195 | * @param issueId an Id of an Issue | |
196 | * @param context Context information containing the principalId | |
197 | * and locale information about the caller of service | |
198 | * operation | |
199 | * @return a list of Holds | |
200 | * @throws InvalidParameterException invalid parameter | |
201 | * @throws MissingParameterException missing parameter | |
202 | * @throws OperationFailedException unable to complete request | |
203 | * @throws PermissionDeniedException authorization failure | |
204 | */ | |
205 | public List<HoldInfo> getHoldsByIssue(@WebParam(name = "issueId") String issueId, @WebParam(name = "context") ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
206 | ||
207 | /** | |
208 | * Retrieves a list of all Holds that pertain to the given Person. | |
209 | * | |
210 | * @param personId an Id of a Person | |
211 | * @param context Context information containing the principalId | |
212 | * and locale information about the caller of service | |
213 | * operation | |
214 | * @return a list of Holds | |
215 | * @throws InvalidParameterException invalid parameter | |
216 | * @throws MissingParameterException missing parameter | |
217 | * @throws OperationFailedException unable to complete request | |
218 | * @throws PermissionDeniedException authorization failure | |
219 | */ | |
220 | public List<HoldInfo> getHoldsForPerson(@WebParam(name = "personId") String personId, @WebParam(name = "context") ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
221 | ||
222 | /** | |
223 | * Retrieves a list of active Holds, both warning and blocking, | |
224 | * that pertain to the given Person. An active Hold is any open | |
225 | * Hold that has had not been released or cancelled. | |
226 | * | |
227 | * @param personId an Id of a Person | |
228 | * @param context Context information containing the principalId | |
229 | * and locale information about the caller of service | |
230 | * operation | |
231 | * @return a list of Holds | |
232 | * @throws InvalidParameterException invalid parameter | |
233 | * @throws MissingParameterException missing parameter | |
234 | * @throws OperationFailedException unable to complete request | |
235 | * @throws PermissionDeniedException authorization failure | |
236 | */ | |
237 | public List<HoldInfo> getActiveHoldsForPerson(@WebParam(name = "personId") String personId, @WebParam(name = "context") ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
238 | ||
239 | /** | |
240 | * Retrieves a list of all Holds by Issue for a Person. | |
241 | * | |
242 | * @param issueId an Issue | |
243 | * @param personId Id of a person | |
244 | * @param context Context information containing the principalId | |
245 | * and locale information about the caller of service | |
246 | * operation | |
247 | * @return a list of Holds | |
248 | * @throws InvalidParameterException invalid parameter | |
249 | * @throws MissingParameterException missing parameter | |
250 | * @throws OperationFailedException unable to complete request | |
251 | * @throws PermissionDeniedException authorization failure | |
252 | */ | |
253 | public List<HoldInfo> getHoldsByIssueForPerson(@WebParam(name = "issueId") String issueId, @WebParam(name = "personId") String personId, @WebParam(name = "context") ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
254 | ||
255 | /** | |
256 | * Retrieves a list of active Holds, both warning and blocking, by | |
257 | * Issue for a Person. An active Hold is any open Hold that has | |
258 | * had not been released or cancelled. | |
259 | * | |
260 | * @param issueId an Issue | |
261 | * @param personId Id of a person | |
262 | * @param context Context information containing the principalId | |
263 | * and locale information about the caller of service | |
264 | * operation | |
265 | * @return a list of Holds | |
266 | * @throws InvalidParameterException invalid parameter | |
267 | * @throws MissingParameterException missing parameter | |
268 | * @throws OperationFailedException unable to complete request | |
269 | * @throws PermissionDeniedException authorization failure | |
270 | */ | |
271 | public List<HoldInfo> getActiveHoldsByIssueForPerson(@WebParam(name = "issueId") String issueId, @WebParam(name = "personId") String personId, @WebParam(name = "context") ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
272 | ||
273 | /** | |
274 | * Searches for Holds based on the criteria and returns a list | |
275 | * of Hold identifiers which match the search criteria. | |
276 | * | |
277 | * @param criteria the search criteria | |
278 | * @param context Context information containing the principalId | |
279 | * and locale information about the caller of service | |
280 | * operation | |
281 | * @return list of Hold Ids | |
282 | * @throws InvalidParameterException invalid parameter | |
283 | * @throws MissingParameterException parameter is missing | |
284 | * @throws OperationFailedException unable to complete request | |
285 | * @throws PermissionDeniedException authorization failure | |
286 | */ | |
287 | public List<String> searchForHoldIds(@WebParam(name = "criteria") QueryByCriteria criteria, @WebParam(name = "context") ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
288 | ||
289 | /** | |
290 | * Searches for Holds based on the criteria and returns a list of | |
291 | * Holds which match the search criteria. | |
292 | * | |
293 | * @param criteria the search criteria | |
294 | * @param context Context information containing the principalId | |
295 | * and locale information about the caller of service | |
296 | * operation | |
297 | * @return list of Holds | |
298 | * @throws InvalidParameterException invalid parameter | |
299 | * @throws MissingParameterException parameter is missing | |
300 | * @throws OperationFailedException unable to complete request | |
301 | * @throws PermissionDeniedException authorization failure | |
302 | */ | |
303 | public List<HoldInfo> searchForHolds(@WebParam(name = "criteria") QueryByCriteria criteria, @WebParam(name = "context") ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
304 | ||
305 | /** | |
306 | * Validates a Hold. Depending on the value of validationType, | |
307 | * this validation could be limited to tests on just the current | |
308 | * object and its directly contained subobjects or expanded to | |
309 | * perform all tests related to this object. If an identifier is | |
310 | * present for the hold and a record is found for that identifier, | |
311 | * the validation checks if the hold can be shifted to the new | |
312 | * values. If a record cannot be found for the identifier, it is | |
313 | * assumed that the record does not exist and as such, the checks | |
314 | * performed will be much shallower, typically mimicking those | |
315 | * performed by setting the validationType to the current | |
316 | * object. This is a slightly different pattern from the standard | |
317 | * validation as the caller provides the identifier in the create | |
318 | * statement instead of the server assigning an identifier. | |
319 | * | |
320 | * @param validationTypeKey Identifier of the extent of validation | |
321 | * @param holdInfo the hold information to be tested. | |
322 | * @param context Context information containing the principalId | |
323 | * and locale information about the caller of service | |
324 | * operation | |
325 | * @return the results from performing the validation | |
326 | * @throws DoesNotExistException validationTypeKey not found | |
327 | * @throws InvalidParameterException invalid validationTypeKey, holdInfo | |
328 | * @throws MissingParameterException missing validationTypeKey, holdInfo | |
329 | * @throws OperationFailedException unable to complete request | |
330 | */ | |
331 | public List<ValidationResultInfo> validateHold(@WebParam(name = "validationTypeKey") String validationTypeKey, @WebParam(name = "holdInfo") HoldInfo holdInfo, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; | |
332 | ||
333 | /** | |
334 | * Creates a new Hold. | |
335 | * | |
336 | * @param holdInfo Details of the Hold to be created | |
337 | * @param context Context information containing the principalId | |
338 | * and locale information about the caller of service | |
339 | * operation | |
340 | * @return the details of the Hold just created | |
341 | * @throws AlreadyExistsException the Hold being created already exists | |
342 | * @throws DataValidationErrorException One or more values invalid for | |
343 | * this operation | |
344 | * @throws InvalidParameterException One or more parameters invalid | |
345 | * @throws MissingParameterException One or more parameters missing | |
346 | * @throws OperationFailedException unable to complete request | |
347 | * @throws PermissionDeniedException authorization failure | |
348 | */ | |
349 | public HoldInfo createHold(@WebParam(name = "holdInfo") HoldInfo holdInfo, @WebParam(name = "context") ContextInfo context) throws AlreadyExistsException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
350 | ||
351 | /** | |
352 | * Updates an existing Hold. | |
353 | * | |
354 | * @param holdId Id of Hold to be updated | |
355 | * @param holdInfo Details of updates to the Hold | |
356 | * being updated | |
357 | * @param context Context information containing the principalId | |
358 | * and locale information about the caller of service | |
359 | * operation | |
360 | * @return the details of Hold just updated | |
361 | * @throws DataValidationErrorException One or more values invalid for this | |
362 | * operation | |
363 | * @throws DoesNotExistException the Hold does not exist | |
364 | * @throws InvalidParameterException One or more parameters invalid | |
365 | * @throws MissingParameterException One or more parameters missing | |
366 | * @throws OperationFailedException unable to complete request | |
367 | * @throws PermissionDeniedException authorization failure | |
368 | * @throws VersionMismatchException The action was attempted on an out of date | |
369 | * version. | |
370 | */ | |
371 | public HoldInfo updateHold(@WebParam(name = "holdId") String holdId, @WebParam(name = "holdInfo") HoldInfo holdInfo, @WebParam(name = "context") ContextInfo context) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException; | |
372 | ||
373 | /** | |
374 | * Releases a Hold. A release preserves the record and marks the | |
375 | * State as released and sets the released date. A Hold should be | |
376 | * released instead of deleted when the record needs to be | |
377 | * preserved. | |
378 | * | |
379 | * @param holdId a hold | |
380 | * @param context Context information containing the principalId | |
381 | * and locale information about the caller of service | |
382 | * operation | |
383 | * @return the modified HoldInfo | |
384 | * @throws DoesNotExistException the Hold does not exist | |
385 | * @throws InvalidParameterException invalid parameter | |
386 | * @throws MissingParameterException missing parameter | |
387 | * @throws OperationFailedException unable to complete request | |
388 | * @throws PermissionDeniedException authorization failure | |
389 | */ | |
390 | public HoldInfo releaseHold(@WebParam(name = "holdId") String holdId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
391 | ||
392 | /** | |
393 | * Deletes an existing Hold record. | |
394 | * | |
395 | * @param holdId the Id of the Hold to be deleted | |
396 | * @param context Context information containing the principalId | |
397 | * and locale information about the caller of service | |
398 | * operation | |
399 | * @return status of the operation (success, failed) | |
400 | * @throws DoesNotExistException the Hold does not exist | |
401 | * @throws InvalidParameterException One or more parameters invalid | |
402 | * @throws MissingParameterException One or more parameters missing | |
403 | * @throws OperationFailedException unable to complete request | |
404 | * @throws PermissionDeniedException authorization failure | |
405 | */ | |
406 | public StatusInfo deleteHold(@WebParam(name = "holdId") String holdId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
407 | ||
408 | /** | |
409 | * Retrieves the details of a single Issue by an issue Id. | |
410 | * | |
411 | * @param issueId Unique Id of the Issue to be retrieved | |
412 | * @param context Context information containing the principalId | |
413 | * and locale information about the caller of service | |
414 | * operation | |
415 | * @return the details of the Issue requested | |
416 | * @throws DoesNotExistException issueId not found | |
417 | * @throws InvalidParameterException invalid issueId | |
418 | * @throws MissingParameterException missing issueId | |
419 | * @throws OperationFailedException unable to complete request | |
420 | * @throws PermissionDeniedException authorization failure | |
421 | */ | |
422 | public IssueInfo getIssue(@WebParam(name = "issueId") String issueId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
423 | ||
424 | /** | |
425 | * Retrieves a list Issues corresponding to a list of issue Ids. | |
426 | * | |
427 | * @param issueIdList list of unique Ids of the | |
428 | * Issue to be retrieved | |
429 | * @param context Context information containing the principalId | |
430 | * and locale information about the caller of service | |
431 | * operation | |
432 | * @return a list of Issues | |
433 | * @throws DoesNotExistException a issueId in list not found | |
434 | * @throws InvalidParameterException invalid issueId in list | |
435 | * @throws MissingParameterException missing issueIdList | |
436 | * @throws OperationFailedException unable to complete request | |
437 | * @throws PermissionDeniedException authorization failure | |
438 | */ | |
439 | public List<IssueInfo> getIssuesByIdList(@WebParam(name = "issueIdList") List<String> issueIdList, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
440 | ||
441 | /** | |
442 | * Retrieves a list of Issues by Type. | |
443 | * | |
444 | * @param issueTypeKey a Type of the Issue to be retrieved | |
445 | * @param context Context information containing the principalId | |
446 | * and locale information about the caller of service | |
447 | * operation | |
448 | * @return a list of Issues of the given Type | |
449 | * @throws InvalidParameterException invalid parameter | |
450 | * @throws MissingParameterException missing parameter | |
451 | * @throws OperationFailedException unable to complete request | |
452 | * @throws PermissionDeniedException authorization failure | |
453 | */ | |
454 | public List<String> getIssueIdsByType(@WebParam(name = "issueTypeKey") String issueTypeKey, @WebParam(name = "context") ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
455 | ||
456 | /** | |
457 | * Retrieves a list of Issues that pertain to the given | |
458 | * organization. | |
459 | * | |
460 | * @param organizationId a unique Id of an organoization | |
461 | * @param context Context information containing the principalId | |
462 | * and locale information about the caller of service | |
463 | * operation | |
464 | * @return a list of Issues | |
465 | * @throws InvalidParameterException invalid parameter | |
466 | * @throws MissingParameterException missing parameter | |
467 | * @throws OperationFailedException unable to complete request | |
468 | * @throws PermissionDeniedException authorization failure | |
469 | */ | |
470 | public List<IssueInfo> getIssuesByOrg(@WebParam(name = "organizationId") String organizationId, @WebParam(name = "context") ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
471 | ||
472 | /** | |
473 | * Retrieves a list of Issues that are related to the given | |
474 | * Restriction. | |
475 | * | |
476 | * @param restrictionKey a unique key for a Restriction | |
477 | * @param context Context information containing the principalId | |
478 | * and locale information about the caller of service | |
479 | * operation | |
480 | * @return a list of Issues | |
481 | * @throws InvalidParameterException invalid parameter | |
482 | * @throws MissingParameterException missing parameter | |
483 | * @throws OperationFailedException unable to complete request | |
484 | * @throws PermissionDeniedException authorization failure | |
485 | */ | |
486 | public List<IssueInfo> getIssuesByRestriction(@WebParam(name = "restrictionKey") String restrictionKey, @WebParam(name = "context") ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
487 | ||
488 | /** | |
489 | * Searches for Issues based on the criteria and returns a list | |
490 | * of Issue identifiers which match the search criteria. | |
491 | * | |
492 | * @param criteria the search criteria | |
493 | * @param context Context information containing the principalId | |
494 | * and locale information about the caller of service | |
495 | * operation | |
496 | * @return list of Issue Ids | |
497 | * @throws InvalidParameterException invalid parameter | |
498 | * @throws MissingParameterException parameter is missing | |
499 | * @throws OperationFailedException unable to complete request | |
500 | * @throws PermissionDeniedException authorization failure | |
501 | */ | |
502 | public List<String> searchForIssueIds(@WebParam(name = "criteria") QueryByCriteria criteria, @WebParam(name = "context") ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
503 | ||
504 | /** | |
505 | * Searches for Issues based on the criteria and returns a list of | |
506 | * Issues which match the search criteria. | |
507 | * | |
508 | * @param criteria the search criteria | |
509 | * @param context Context information containing the principalId | |
510 | * and locale information about the caller of service | |
511 | * operation | |
512 | * @return list of IssueIds | |
513 | * @throws InvalidParameterException invalid parameter | |
514 | * @throws MissingParameterException parameter is missing | |
515 | * @throws OperationFailedException unable to complete request | |
516 | * @throws PermissionDeniedException authorization failure | |
517 | */ | |
518 | public List<IssueInfo> searchForIssues(@WebParam(name = "criteria") QueryByCriteria criteria, @WebParam(name = "context") ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
519 | ||
520 | /** | |
521 | * Adds an Issue to a Restriction. | |
522 | * | |
523 | * @param restrictionKey a unique key for a Restriction | |
524 | * @param issueId a unique Id of an Issue to be added | |
525 | * @param context Context information containing the principalId | |
526 | * and locale information about the caller of service | |
527 | * operation | |
528 | * @return StatusInfo | |
529 | * @throws InvalidParameterException invalid parameter | |
530 | * @throws MissingParameterException missing parameter | |
531 | * @throws OperationFailedException unable to complete request | |
532 | * @throws PermissionDeniedException authorization failure | |
533 | */ | |
534 | public StatusInfo addIssueToRestriction(@WebParam(name = "restrictionKey") String restrictionKey, @WebParam(name = "issueId") String issueId, @WebParam(name = "context") ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
535 | ||
536 | /** | |
537 | * Removes an Issue to a Restriction. | |
538 | * | |
539 | * @param restrictionKey a unique key for a Restriction | |
540 | * @param issueId a unique Id of an Issue to be removed | |
541 | * @param context Context information containing the principalId | |
542 | * and locale information about the caller of service | |
543 | * operation | |
544 | * @return StatusInfo | |
545 | * @throws InvalidParameterException invalid parameter | |
546 | * @throws MissingParameterException missing parameter | |
547 | * @throws OperationFailedException unable to complete request | |
548 | * @throws PermissionDeniedException authorization failure | |
549 | */ | |
550 | public StatusInfo removeIssueFromRestriction(@WebParam(name = "restrictionKey") String restrictionKey, @WebParam(name = "issueId") String issueId, @WebParam(name = "context") ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
551 | ||
552 | /** | |
553 | * Validates an issue. Depending on the value of validationType, | |
554 | * this validation could be limited to tests on just the current | |
555 | * object and its directly contained subobjects or expanded to | |
556 | * perform all tests related to this object. If an identifier is | |
557 | * present for the issue and a record is found for that | |
558 | * identifier, the validation checks if the issue can be | |
559 | * shifted to the new values. If a record cannot be found for the | |
560 | * identifier, it is assumed that the record does not exist and as | |
561 | * such, the checks performed will be much shallower, typically | |
562 | * mimicking those performed by setting the validationType to the | |
563 | * current object. This is a slightly different pattern from the | |
564 | * standard validation as the caller provides the identifier in | |
565 | * the create statement instead of the server assigning an | |
566 | * identifier. | |
567 | * | |
568 | * @param validationTypeKey Identifier of the extent of validation | |
569 | * @param issueInfo the issue information to be tested. | |
570 | * @param context Context information containing the principalId | |
571 | * and locale information about the caller of service | |
572 | * operation | |
573 | * @return the results from performing the validation | |
574 | * @throws DoesNotExistException validationTypeKey not found | |
575 | * @throws InvalidParameterException invalid validationTypeKey, issueInfo | |
576 | * @throws MissingParameterException missing validationTypeKey, issueInfo | |
577 | * @throws OperationFailedException unable to complete request | |
578 | */ | |
579 | public List<ValidationResultInfo> validateIssue(@WebParam(name = "validationTypeKey") String validationTypeKey, @WebParam(name = "issueInfo") IssueInfo issueInfo, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; | |
580 | ||
581 | /** | |
582 | * Creates a new Issue. | |
583 | * | |
584 | * @param issueInfo Details of the Issue to be created | |
585 | * @param context Context information containing the principalId | |
586 | * and locale information about the caller of service | |
587 | * operation | |
588 | * @return the details of the Issue just created | |
589 | * @throws AlreadyExistsException the Issue being created already exists | |
590 | * @throws DataValidationErrorException One or more values invalid for this operation | |
591 | * @throws InvalidParameterException One or more parameters invalid | |
592 | * @throws MissingParameterException One or more parameters missing | |
593 | * @throws OperationFailedException unable to complete request | |
594 | * @throws PermissionDeniedException authorization failure | |
595 | */ | |
596 | public IssueInfo createIssue(@WebParam(name = "issueInfo") IssueInfo issueInfo, @WebParam(name = "context") ContextInfo context) throws AlreadyExistsException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
597 | ||
598 | /** | |
599 | * Updates an existing Issue. | |
600 | * | |
601 | * @param issueId Id of the Issue to be updated | |
602 | * @param issueInfo Details of updates to the Issue | |
603 | * being updated | |
604 | * @param context Context information containing the principalId | |
605 | * and locale information about the caller of service | |
606 | * operation | |
607 | * @return the details of the Issue just updated | |
608 | * @throws DataValidationErrorException One or more values invalid for this | |
609 | * operation | |
610 | * @throws DoesNotExistException the Issue does not exist | |
611 | * @throws InvalidParameterException One or more parameters invalid | |
612 | * @throws MissingParameterException One or more parameters missing | |
613 | * @throws OperationFailedException unable to complete request | |
614 | * @throws PermissionDeniedException authorization failure | |
615 | * @throws VersionMismatchException The action was attempted on an out of date | |
616 | * version. | |
617 | */ | |
618 | public IssueInfo updateIssue(@WebParam(name = "issueId") String issueId, @WebParam(name = "issueInfo") IssueInfo issueInfo, @WebParam(name = "context") ContextInfo context) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException; | |
619 | ||
620 | /** | |
621 | * Deletes an existing Issue. | |
622 | * | |
623 | * @param issueId the Id of the Issue to | |
624 | * be deleted | |
625 | * @param context Context information containing the principalId | |
626 | * and locale information about the caller of service | |
627 | * operation | |
628 | * @return status of the operation (success, failed) | |
629 | * @throws DoesNotExistException the Issue does not exist | |
630 | * @throws InvalidParameterException One or more parameters invalid | |
631 | * @throws MissingParameterException One or more parameters missing | |
632 | * @throws OperationFailedException unable to complete request | |
633 | * @throws PermissionDeniedException authorization failure | |
634 | */ | |
635 | public StatusInfo deleteIssue(@WebParam(name = "issueId") String issueId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
636 | ||
637 | /** | |
638 | * Retrieves the details of a single Restriction by a restriction key. | |
639 | * | |
640 | * @param restrictionKey Unique Key of the Restriction to be retrieved | |
641 | * @param context Context information containing the principalId | |
642 | * and locale information about the caller of service | |
643 | * operation | |
644 | * @return the details of the Restriction requested | |
645 | * @throws DoesNotExistException restrictionKey not found | |
646 | * @throws InvalidParameterException invalid parameter | |
647 | * @throws MissingParameterException missing parameter | |
648 | * @throws OperationFailedException unable to complete request | |
649 | * @throws PermissionDeniedException authorization failure | |
650 | */ | |
651 | public RestrictionInfo getRestriction(@WebParam(name = "restrictionKey") String restrictionKey, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
652 | ||
653 | /** | |
654 | * Retrieves a list Restrictions corresponding to a list of | |
655 | * restriction keys. | |
656 | * | |
657 | * @param restrictionKeyList list of unique keys of the | |
658 | * Restriction to be retrieved | |
659 | * @param context Context information containing the principalId | |
660 | * and locale information about the caller of service | |
661 | * operation | |
662 | * @return a list of Restrictions | |
663 | * @throws DoesNotExistException a restrictionKey in list not found | |
664 | * @throws InvalidParameterException invalid restrictionKey in list | |
665 | * @throws MissingParameterException missing parameter | |
666 | * @throws OperationFailedException unable to complete request | |
667 | * @throws PermissionDeniedException authorization failure | |
668 | */ | |
669 | public List<RestrictionInfo> getRestrictionsByKeyList(@WebParam(name = "restrictionKeyList") List<String> restrictionKeyList, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
670 | ||
671 | /** | |
672 | * Retrieves a list of Restrictions by Type. | |
673 | * | |
674 | * @param restrictionTypeKey a Type of the Restriction to be retrieved | |
675 | * @param context Context information containing the principalId | |
676 | * and locale information about the caller of service | |
677 | * operation | |
678 | * @return a list of Restrictions of the given Type | |
679 | * @throws InvalidParameterException invalid parameter | |
680 | * @throws MissingParameterException missing parameter | |
681 | * @throws OperationFailedException unable to complete request | |
682 | * @throws PermissionDeniedException authorization failure | |
683 | */ | |
684 | public List<String> getRestrictionKeysByType(@WebParam(name = "restrictionTypeKey") String restrictionTypeKey, @WebParam(name = "context") ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
685 | ||
686 | /** | |
687 | * Retrieves a list Restrictions mapped to an Issue. | |
688 | * | |
689 | * @param issueId a unique Id of an Issue | |
690 | * @param context Context information containing the principalId | |
691 | * and locale information about the caller of service | |
692 | * operation | |
693 | * @return a list of Restrictions | |
694 | * @throws DoesNotExistException issueId does not exist | |
695 | * @throws InvalidParameterException invalid parameter | |
696 | * @throws MissingParameterException missing parameter | |
697 | * @throws OperationFailedException unable to complete request | |
698 | * @throws PermissionDeniedException authorization failure | |
699 | */ | |
700 | public List<RestrictionInfo> getRestrictionsByIssue(@WebParam(name = "issueId") String issueId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
701 | ||
702 | /** | |
703 | * Searches for Restrictions based on the criteria and returns a | |
704 | * list of Restriction identifiers which match the search | |
705 | * criteria. | |
706 | * | |
707 | * @param criteria the search criteria | |
708 | * @param context Context information containing the principalId | |
709 | * and locale information about the caller of service | |
710 | * operation | |
711 | * @return list of Restriction Keys | |
712 | * @throws InvalidParameterException invalid parameter | |
713 | * @throws MissingParameterException parameter is missing | |
714 | * @throws OperationFailedException unable to complete request | |
715 | * @throws PermissionDeniedException authorization failure | |
716 | */ | |
717 | public List<String> searchForRestrictionKeys(@WebParam(name = "criteria") QueryByCriteria criteria, @WebParam(name = "context") ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
718 | ||
719 | /** | |
720 | * Searches for Restrictions based on the criteria and returns a | |
721 | * list of Restrictions which match the search criteria. | |
722 | * | |
723 | * @param criteria the search criteria | |
724 | * @param context Context information containing the principalId | |
725 | * and locale information about the caller of service | |
726 | * operation | |
727 | * @return list of Restrictions | |
728 | * @throws InvalidParameterException invalid parameter | |
729 | * @throws MissingParameterException parameter is missing | |
730 | * @throws OperationFailedException unable to complete request | |
731 | * @throws PermissionDeniedException authorization failure | |
732 | */ | |
733 | public List<RestrictionInfo> searchForRestrictions(@WebParam(name = "criteria") QueryByCriteria criteria, @WebParam(name = "context") ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
734 | ||
735 | /** | |
736 | * Validates a restriction. Depending on the value of validationType, | |
737 | * this validation could be limited to tests on just the current | |
738 | * object and its directly contained subobjects or expanded to | |
739 | * perform all tests related to this object. If an identifier is | |
740 | * present for the restriction and a record is found for that | |
741 | * identifier, the validation checks if the restriction can be | |
742 | * shifted to the new values. If a record cannot be found for the | |
743 | * identifier, it is assumed that the record does not exist and as | |
744 | * such, the checks performed will be much shallower, typically | |
745 | * mimicking those performed by setting the validationType to the | |
746 | * current object. This is a slightly different pattern from the | |
747 | * standard validation as the caller provides the identifier in | |
748 | * the create statement instead of the server assigning an | |
749 | * identifier. | |
750 | * | |
751 | * @param validationTypeKey Identifier of the extent of validation | |
752 | * @param restrictionInfo the restriction information to be tested. | |
753 | * @param context Context information containing the principalId | |
754 | * and locale information about the caller of service | |
755 | * operation | |
756 | * @return the results from performing the validation | |
757 | * @throws DoesNotExistException validationTypeKey not found | |
758 | * @throws InvalidParameterException invalid validationTypeKey, restrictionInfo | |
759 | * @throws MissingParameterException missing validationTypeKey, restrictionInfo | |
760 | * @throws OperationFailedException unable to complete request | |
761 | */ | |
762 | public List<ValidationResultInfo> validateRestriction(@WebParam(name = "validationTypeKey") String validationTypeKey, @WebParam(name = "restrictionInfo") RestrictionInfo restrictionInfo, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; | |
763 | ||
764 | /** | |
765 | * Creates a new Restriction. | |
766 | * | |
767 | * @param restrictionKey a unique key for the restriction | |
768 | * @param restrictionInfo Details of the Restriction to be created | |
769 | * @param context Context information containing the principalId | |
770 | * and locale information about the caller of service | |
771 | * operation | |
772 | * @return the details of the Restriction just created | |
773 | * @throws AlreadyExistsException the Restriction being created already exists | |
774 | * @throws DataValidationErrorException One or more values invalid for this operation | |
775 | * @throws InvalidParameterException One or more parameters invalid | |
776 | * @throws MissingParameterException One or more parameters missing | |
777 | * @throws OperationFailedException unable to complete request | |
778 | * @throws PermissionDeniedException authorization failure | |
779 | */ | |
780 | public RestrictionInfo createRestriction(@WebParam(name = "restrictionKey") String restrictionKey, @WebParam(name = "restrictionInfo") RestrictionInfo restrictionInfo, @WebParam(name = "context") ContextInfo context) throws AlreadyExistsException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
781 | ||
782 | /** | |
783 | * Updates an existing Restriction. | |
784 | * | |
785 | * @param restrictionKey the key of the Restriction to be updated | |
786 | * @param restrictionInfo Details of updates to the Restriction | |
787 | * being updated | |
788 | * @param context Context information containing the principalId | |
789 | * and locale information about the caller of service | |
790 | * operation | |
791 | * @return the details of the Restriction just updated | |
792 | * @throws DataValidationErrorException One or more values invalid for this | |
793 | * operation | |
794 | * @throws DoesNotExistException the Restriction does not exist | |
795 | * @throws InvalidParameterException One or more parameters invalid | |
796 | * @throws MissingParameterException One or more parameters missing | |
797 | * @throws OperationFailedException unable to complete request | |
798 | * @throws PermissionDeniedException authorization failure | |
799 | * @throws VersionMismatchException The action was attempted on an out of date | |
800 | * version. | |
801 | */ | |
802 | public RestrictionInfo updateRestriction(@WebParam(name = "restrictionKey") String restrictionKey, @WebParam(name = "restrictionInfo") RestrictionInfo restrictionInfo, @WebParam(name = "context") ContextInfo context) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException; | |
803 | ||
804 | /** | |
805 | * Deletes an existing Restriction. | |
806 | * | |
807 | * @param restrictionKey the key of the Restriction to | |
808 | * be deleted | |
809 | * @param context Context information containing the principalId | |
810 | * and locale information about the caller of service | |
811 | * operation | |
812 | * @return status of the operation (success, failed) | |
813 | * @throws DoesNotExistException the Restriction does not exist | |
814 | * @throws InvalidParameterException One or more parameters invalid | |
815 | * @throws MissingParameterException One or more parameters missing | |
816 | * @throws OperationFailedException unable to complete request | |
817 | * @throws PermissionDeniedException authorization failure | |
818 | */ | |
819 | public StatusInfo deleteRestriction(@WebParam(name = "restrictionKey") String restrictionKey, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
820 | } |