View Javadoc

1   /*
2    * Copyright 2009 The Kuali Foundation Licensed under the Educational Community
3    * License, Version 1.0 (the "License"); you may not use this file except in
4    * compliance with the License. You may obtain a copy of the License at
5    * http://www.opensource.org/licenses/ecl1.php Unless required by applicable law
6    * or agreed to in writing, software distributed under the License is
7    * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8    * KIND, either express or implied. See the License for the specific language
9    * governing permissions and limitations under the License.
10   */
11  package org.kuali.student.enrollment.lpr.service;
12  
13  import org.kuali.rice.core.api.criteria.QueryByCriteria;
14  import org.kuali.student.enrollment.lpr.dto.*;
15  import org.kuali.student.r2.common.dto.BulkStatusInfo;
16  import org.kuali.student.r2.common.dto.ContextInfo;
17  import org.kuali.student.r2.common.dto.StatusInfo;
18  import org.kuali.student.r2.common.dto.ValidationResultInfo;
19  import org.kuali.student.r2.common.exceptions.*;
20  import org.kuali.student.r2.common.util.constants.LprServiceConstants;
21  
22  import javax.jws.WebParam;
23  import javax.jws.WebService;
24  import javax.jws.soap.SOAPBinding;
25  import java.util.List;
26  
27  /**
28   * The Lui Person Relationship (LPR) Service Maintains the relationship between
29   * a Learning Unit Instance and a Person. Depending on the type this service
30   * maintains relationships such as:
31   * <ul>
32   * <li>a student's registration in a course
33   * <li>a student's enrollment in a program (major or minor)
34   * <li>an instructor's assignment to teach a course
35   * <li>a faculty member's assignment as an advisor for a program
36   * </ul>
37   * @version 0.0.7
38   *
39   * @Author Kamal
40   * @Since Tue Mar 01 15:53:51 PST 2011
41   */
42  @WebService(name = "LprService", serviceName = "LprService", portName = "LprService",targetNamespace = LprServiceConstants.NAMESPACE)
43  @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
44  public interface LprService {
45  
46      /**
47       * Retrieves the Relation for the specified LUI Person Relation id
48       *
49       * @param lprId Identifier for the LUI Person Relation
50       * @param contextInfo             Context information containing the principalId and locale
51       *                            information about the caller of service operation
52       * @return LUI Person Relation information
53       * @throws DoesNotExistException     lprId not found
54       * @throws InvalidParameterException invalid lprId
55       * @throws MissingParameterException missing lprId
56       * @throws OperationFailedException  unable to complete request
57       * @throws PermissionDeniedException authorization failure
58       */
59      public LprInfo getLpr(@WebParam(name = "lprId") String lprId,
60              @WebParam(name = "contextInfo") ContextInfo contextInfo)
61              throws DoesNotExistException,
62              InvalidParameterException, MissingParameterException, OperationFailedException,
63              PermissionDeniedException;
64  
65      /**
66       * Retrieves the Relation for the specified list of LUI Person Relation Ids
67       *
68       * @param lprIds List of identifiers for LUI Person
69       *                                Relations
70       * @param contextInfo                 Context information containing the principalId and locale
71       *                                information about the caller of service operation
72       * @return List of LUI Person Relation information
73       * @throws DoesNotExistException     One or more lprIds not found
74       * @throws InvalidParameterException One or more invalid
75       *                                   lprIds
76       * @throws MissingParameterException missing lprIds
77       * @throws OperationFailedException  unable to complete request
78       * @throws PermissionDeniedException authorization failure
79       */
80      public List<LprInfo> getLprsByIds(@WebParam(name = "lprIds") List<String> lprIds,
81              @WebParam(name = "contextInfo") ContextInfo contextInfo)
82              throws DoesNotExistException, InvalidParameterException, MissingParameterException,
83              OperationFailedException, PermissionDeniedException;
84  
85      /**
86       * Retrieves the LUI Ids for Person, type and state.
87       * 
88       * Example Use Case: This would allow you to get all the active (state) courses 
89       * (type=registration) for a student.
90       *
91       * @param personId                 Identifier for the Person 
92       * @param lprTypeKey Type of LUI Person Relation
93       * @param relationState            Relation State
94       * @param contextInfo                  Context information containing the principalId and locale
95       *                                 information about the caller of service operation
96       * @return Simple list of LUI Ids
97       * @throws DoesNotExistException       personId, lprTypeKey,
98       *                                     relationState, person to LUI relationship not found
99       * @throws InvalidParameterException   invalid personId,
100      *                                     lprTypeKey, relationState
101      * @throws MissingParameterException   missing personId,
102      *                                     lprTypeKey, relationState
103      * @throws OperationFailedException    unable to complete request
104      * @throws PermissionDeniedException   authorization failure
105      */
106     public List<String> getLuiIdsByPersonAndTypeAndState(@WebParam(name = "personId") String personId,
107                 @WebParam(name = "lprTypeKey") String lprTypeKey,
108                 @WebParam(name = "relationState") String relationState,
109                 @WebParam(name = "contextInfo") ContextInfo contextInfo)
110         throws DoesNotExistException, InvalidParameterException, MissingParameterException, 
111             OperationFailedException, PermissionDeniedException;
112 
113     /**
114      * Retrieves Person Ids related to the specified LUI, type and state
115      * 
116      * This would allow you to get a list of people who are active (state) students (type=registration) 
117      * for a particular course (luiId) 
118      * 
119      * Example Use Case: get all students in a course.
120      * 
121      * @param luiId                    Identifier for the LUI
122      * @param lprTypeKey               Type of LUI Person Relation
123      * @param relationState            Relation State
124      * @param contextInfo                  Context information containing the principalId and locale
125      *                                 information about the caller of service operation
126      * @return Simple list of Person Ids
127      * @throws DoesNotExistException     luiId, lprTypeKey,
128      *                                   relationState, LUI to person relationship not found
129      * @throws InvalidParameterException invalid luiId,
130      *                                   lprTypeKey, relationState
131      * @throws MissingParameterException missing luiId,
132      *                                   lprTypeKey, relationState
133      * @throws OperationFailedException  unable to complete request
134      * @throws PermissionDeniedException authorization failure
135      */
136     public List<String> getPersonIdsByLuiAndTypeAndState(@WebParam(name = "luiId") String luiId,
137             @WebParam(name = "lprTypeKey") String lprTypeKey,
138             @WebParam(name = "relationState") String relationState,
139             @WebParam(name = "contextInfo") ContextInfo contextInfo)
140         throws DoesNotExistException, InvalidParameterException,
141             MissingParameterException, OperationFailedException, PermissionDeniedException;
142 
143     /**
144      * Retrieves Person Relation for person and LUI
145      *
146      * Example Use Case: Can be used to get course registrations for a person in a particular course.
147      * Although this would typically only return one registration for each set of values, but
148      * if a person adds a course then drops it then adds it again you could get multiple registrations.
149      *
150      * @param personId Identifier for person
151      * @param luiId    Identifier for LUI
152      * @param contextInfo  Context information containing the principalId and locale
153      *                     information about the caller of service operation
154      * @return List of LUI Person Relation info
155      * @throws DoesNotExistException       personId, luiId not found
156      * @throws InvalidParameterException   invalid personId, luiId
157      * @throws MissingParameterException   missing personId, luiId
158      * @throws OperationFailedException    unable to complete request
159      * @throws PermissionDeniedException   authorization failure
160      */
161     public List<LprInfo> getLprsByPersonAndLui(@WebParam(name = "personId") String personId,
162             @WebParam(name = "luiId") String luiId,
163             @WebParam(name = "contextInfo") ContextInfo contextInfo)
164         throws DoesNotExistException, InvalidParameterException, MissingParameterException, 
165             OperationFailedException, PermissionDeniedException;
166 
167     /**
168      * Retrieves LUI Person Relations for Person
169      * 
170      * Example Use Case: Can be used to get all the course registrations for a person for as long as
171      * they have been at the school, but please note it could include student registrations
172      * in things that are not courses OR student's acting as teaching assistants
173      * to courses.
174      * 
175      * @param personId Identifier for person
176      * @param contextInfo  Context information containing the principalId and locale
177      *                 information about the caller of service operation
178      * @return List of LUI Person Relation info
179      * @throws DoesNotExistException       personId not found
180      * @throws InvalidParameterException   invalid personId
181      * @throws MissingParameterException   missing personId
182      * @throws OperationFailedException    unable to complete request
183      * @throws PermissionDeniedException   authorization failure
184      */
185     public List<LprInfo> getLprsByPerson(@WebParam(name = "personId") String personId,
186             @WebParam(name = "contextInfo") ContextInfo contextInfo)
187             throws DoesNotExistException, InvalidParameterException, MissingParameterException,
188             OperationFailedException, PermissionDeniedException;
189 
190     /**
191      * Retrieves LUI Person Relation for a specified LUI
192      * 
193      * Example Use Case: Can be used to get all the people and their relationships to a particular
194      * course offering.
195      *
196      * @param luiId   Identifier for LUI
197      * @param contextInfo Context information containing the principalId and locale
198      *                information about the caller of service operation
199      * @return List of LUI Person Relation info
200      * @throws DoesNotExistException     luiId not found
201      * @throws InvalidParameterException invalid luiId
202      * @throws MissingParameterException missing luiId
203      * @throws OperationFailedException  unable to complete request
204      * @throws PermissionDeniedException authorization failure
205      */
206     public List<LprInfo> getLprsByLui(@WebParam(name = "luiId") String luiId,
207             @WebParam(name = "contextInfo") ContextInfo contextInfo)
208             throws DoesNotExistException, InvalidParameterException,
209             MissingParameterException, OperationFailedException, PermissionDeniedException;
210 
211     
212     /**
213      * Retrieves LUI Person Relations for a list of Lui ids
214      * 
215      * Example Use Case: Can be used to get all the people and their relationships to a particular
216      * list of course offering's.
217      *
218      * @param luiIds   Identifiers for LUI's that we want to load the related LPR's 
219      * @param contextInfo Context information containing the principalId and locale
220      *                information about the caller of service operation
221      * @return List of LUI Person Relation info
222      * @throws DoesNotExistException     one or more of the provided luiId's are not found
223      * @throws InvalidParameterException invalid luiIds or contextInfo
224      * @throws MissingParameterException one or more missing parameters.
225      * @throws OperationFailedException  unable to complete request
226      * @throws PermissionDeniedException authorization failure
227      */
228     public List<LprInfo> getLprsByLuis(@WebParam (name="luiIds")List<String>luiIds, 
229     								   @WebParam(name = "contextInfo") ContextInfo contextInfo) 
230     										   throws DoesNotExistException, 
231     										          InvalidParameterException,
232     										          MissingParameterException,
233     										          OperationFailedException, 
234     										          PermissionDeniedException;
235     
236     /**
237      * Retrieves LUI Person Relation for a particular type and specified LUI
238      *
239      * Example: Can be used to get all the people with a particular relationship to a
240      * specified course offering.
241      * 
242      * @param lprTypeKey LUI person relation type key
243      * @param luiId         Identifier for LUI
244      * @param contextInfo  Context information containing the principalId and locale
245      *                information about the caller of service operation
246      * @return List of LUI Person Relation info
247      * @throws DoesNotExistException     luiId not found
248      * @throws InvalidParameterException invalid luiId
249      * @throws MissingParameterException missing luiId
250      * @throws OperationFailedException  unable to complete request
251      * @throws PermissionDeniedException authorization failure
252      */
253     public List<LprInfo> getLprsByLuiAndType (@WebParam(name = "luiId") String luiId,
254             @WebParam(name = "lprTypeKey") String lprTypeKey,
255             @WebParam(name = "contextInfo") ContextInfo contextInfo)
256             throws DoesNotExistException, InvalidParameterException, MissingParameterException,
257             OperationFailedException, PermissionDeniedException;
258 
259     /**
260      * Retrieves a list of LPRs by person and ATP
261      *
262      * Example Use Case: Can be used to get a list of registrations or instructor assignments for a person and a term
263      * 
264      * Note: the ATP is not stored on the LPR but on the Lui so the ATP specified is used
265      * to select or filter the Lui ids that can appear on the LPRs that are returned.
266      * 
267      * @param personId  the person id
268      * @param atpId     the id of the academic time period
269      * @param contextInfo  Context information containing the principalId and locale
270      *                information about the caller of service operation
271      * @return List of LUI Person Relation info
272      * @throws DoesNotExistException     luiId not found
273      * @throws InvalidParameterException invalid luiId
274      * @throws MissingParameterException missing luiId
275      * @throws OperationFailedException  unable to complete request
276      * @throws PermissionDeniedException authorization failure
277      */
278     public List<LprInfo> getLprsByPersonForAtp(@WebParam(name = "personId") String personId,
279             @WebParam(name = "atpId") String atpId,
280             @WebParam(name = "contextInfo") ContextInfo contextInfo)
281             throws DoesNotExistException, InvalidParameterException, MissingParameterException,
282             OperationFailedException, PermissionDeniedException;
283 
284     /**
285      * Retrieves a list of LPRs for a person and particular ATP by the type of
286      * LPR.
287      *
288      * Example Use Case: Can be used to get a list of registrations for a person and a relation type
289      * but making sure to exclude other types of relations the student may have 
290      * during that term such as also being an teaching assistant for a course.
291      *
292      * @param personId  the person id
293      * @param atpId     the id of the academic time period
294      * @param lprTypeKey LUI person relation type key
295      * @param contextInfo  Context information containing the principalId and locale
296      *                information about the caller of service operation
297      * @return List of LUI Person Relation info
298      * @throws DoesNotExistException     luiId not found
299      * @throws InvalidParameterException invalid luiId
300      * @throws MissingParameterException missing luiId
301      * @throws OperationFailedException  unable to complete request
302      * @throws PermissionDeniedException authorization failure
303      *
304      */
305     public List<LprInfo> getLprsByPersonAndTypeForAtp(@WebParam(name = "personId") String personId,
306             @WebParam(name = "atpId") String atpId,
307             @WebParam(name = "lprTypeKey") String lprTypeKey,
308             @WebParam(name = "contextInfo") ContextInfo contextInfo)
309         throws DoesNotExistException, InvalidParameterException, MissingParameterException,
310             OperationFailedException, PermissionDeniedException;
311 
312     /**
313      * Gets the LPRs for a person and the type Lui.
314      * 
315      * Example Use Case: Can be used to get a list of all the relations a person may have to a course
316      * offering (which is a lui type).
317      *
318      * @param personId   person identifier
319      * @param luiTypeKey type of the LUI
320      * @param contextInfo  Context information containing the principalId and locale
321      *                information about the caller of service operation
322      * @return List of LUI Person Relation info
323      * @throws DoesNotExistException     luiId not found
324      * @throws InvalidParameterException invalid luiId
325      * @throws MissingParameterException missing luiId
326      * @throws OperationFailedException  unable to complete request
327      * @throws PermissionDeniedException authorization failure
328      */
329     public List<LprInfo> getLprsByPersonAndLuiType(@WebParam(name = "personId") String personId,
330             @WebParam(name = "luiTypeKey") String luiTypeKey,
331             @WebParam(name = "contextInfo") ContextInfo contextInfo)
332             throws DoesNotExistException, InvalidParameterException, MissingParameterException,
333             OperationFailedException, PermissionDeniedException;
334 
335     /**
336      * Gets the the LPRs for a person and atp and Lui type.
337      * 
338      * Example Use Case: Can be used to get the relations a person may have to a course offering
339      * (which is a lui type) and a particular term (atpId)
340      *
341      * @param personId   person identifier
342      * @param atpId academic time period identifier
343      * @param luiTypeKey type of the LUI
344      * @param contextInfo       Context information containing the principalId and locale
345      *                information about the caller of service operation
346      * @return a List of Lui Person Relation Info
347      * @throws DoesNotExistException     luiId not found
348      * @throws InvalidParameterException invalid luiId
349      * @throws MissingParameterException missing luiId
350      * @throws OperationFailedException  unable to complete request
351      * @throws PermissionDeniedException authorization failure
352      */
353     public List<LprInfo> getLprsByPersonForAtpAndLuiType(@WebParam(name = "personId") String personId,
354             @WebParam(name = "atpId") String atpId,
355             @WebParam(name = "luiTypeKey") String luiTypeKey,
356             @WebParam(name = "contextInfo") ContextInfo contextInfo)
357         throws DoesNotExistException, InvalidParameterException, MissingParameterException,
358             OperationFailedException, PermissionDeniedException;
359 
360     /**
361      * Validates the particular relation in a state for a Person and LUI
362      *
363      * @param validationType        Identifier of the extent of validation
364      * @param luiId                 the identifier of the lui
365      * @param personId              the identifier of the person
366      * @param lprTypeKey       the key to the type of the relationship
367      * @param lprInfo   lpr to be validated
368      * @param contextInfo               Context information containing the principalId and locale
369      *                              information about the caller of service operation
370      * @return list of validation results, list should be be zero length if no
371      *         validation results are generated
372      * @throws DoesNotExistException     lprInfo not found
373      * @throws InvalidParameterException invalid lprInfo
374      *                                   relationState
375      * @throws MissingParameterException missing lprInfo
376      * @throws OperationFailedException  unable to complete request
377      * @throws PermissionDeniedException authorization failure
378      */
379     public List<ValidationResultInfo> validateLpr(@WebParam(name = "validationType") String validationType,
380             @WebParam (name="luiId") String luiId,
381             @WebParam (name="personId") String personId,
382             @WebParam (name="lprTypeKey")  String lprTypeKey,
383             @WebParam(name = "lprInfo") LprInfo lprInfo,
384             @WebParam(name = "contextInfo") ContextInfo contextInfo)
385             throws DoesNotExistException, InvalidParameterException,
386             MissingParameterException, OperationFailedException, PermissionDeniedException;
387 
388     /**
389      * Searches details of LUI Person Relation Ids
390      *
391      * @param criteria Criteria to be used for retrieval of multiple LUI Person
392      *                 Relation identifiers
393      * @param contextInfo  Context information containing the principalId and locale
394      *                 information about the caller of service operation
395      * @return Simple list of LUI Person Relation identifiers
396      * @throws InvalidParameterException invalid relation criteria
397      * @throws MissingParameterException missing relation criteria
398      * @throws OperationFailedException  unable to complete request
399      * @throws PermissionDeniedException authorization failure
400      */
401     public List<String> searchForLprIds(@WebParam(name = "criteria") QueryByCriteria criteria,
402             @WebParam(name = "contextInfo") ContextInfo contextInfo)
403         throws InvalidParameterException, MissingParameterException, OperationFailedException,
404             PermissionDeniedException;
405 
406     /**
407      * Searches details of LUI Person Relation by search criteria
408      *
409      * @param criteria Criteria to be used for retrieval of multiple LUI Person
410      *                 Relation identifiers
411      * @param contextInfo  Context information containing the principalId and locale
412      *                 information about the caller of service operation
413      * @return Simple list of LUI Person Relation identifiers
414      * @throws InvalidParameterException invalid relation criteria
415      * @throws MissingParameterException missing relation criteria
416      * @throws OperationFailedException  unable to complete request
417      * @throws PermissionDeniedException authorization failure
418      */
419     public List<LprInfo> searchForLprs(@WebParam(name = "criteria") QueryByCriteria criteria,
420             @WebParam(name = "contextInfo") ContextInfo contextInfo)
421             throws InvalidParameterException,
422             MissingParameterException, OperationFailedException, PermissionDeniedException;
423 
424     /**
425      * Creates relation between the specified Person and LUI
426      *
427      * @param personId                 Person Identifier
428      * @param luiId                    LUI Identifier
429      * @param lprTypeKey Type of LUI to Person Relation
430      * @param lprInfo    Information required to create the LUI
431      *                                 Person relation
432      * @param contextInfo                  Context information containing the principalId and locale
433      *                                 information about the caller of service operation
434      * @return Structure containing LUI Person relation identifiers
435      * @throws DataValidationErrorException if lprInfo is not
436      *                                      valid
437      * @throws DoesNotExistException        personId, luiId, relationState,
438      *                                      lprTypeKey does not exist
439      * @throws InvalidParameterException    invalid personId, luiId, relationState,
440      *                                      lprTypeKey, lprInfo
441      * @throws MissingParameterException    missing personId, luiId, relationState,
442      *                                      lprTypeKey, lprInfo
443      * @throws OperationFailedException     unable to complete request
444      * @throws PermissionDeniedException    authorization failure
445      * @throws ReadOnlyException            attempt to update a read only attribute
446      */
447     public LprInfo createLpr(@WebParam(name = "personId") String personId,
448             @WebParam(name = "luiId") String luiId,
449             @WebParam(name = "lprTypeKey") String lprTypeKey,
450             @WebParam(name = "lprInfo") LprInfo lprInfo,
451             @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DataValidationErrorException,
452             DoesNotExistException, InvalidParameterException,
453             MissingParameterException, OperationFailedException,
454             PermissionDeniedException, ReadOnlyException;
455 
456     /**
457      * Creates multiple LPRs for one specified person. This is an all or
458      * nothing transaction - any error will invalidate the entire transaction.
459      *
460      * @param personId                 Identifier for Person
461      * @param lprTypeKey                Type of LUI Person relation
462      * @param lprInfos                  List of Information required to create the LUI
463      *                                 Person relation
464      * @param contextInfo                  Context information containing the principalId and locale
465      *                                 information about the caller of service operation
466      * @return Structure containing status and LUI Person relation identifiers and message
467      * @throws DataValidationErrorException if luiPersonsRelationInfo is not
468      *                                      valid
469      * @throws DoesNotExistException        personId, lprTypeKey does not exist
470      * @throws InvalidParameterException    invalid personId, lprTypeKey, lprInfo
471      * @throws MissingParameterException    missing personId, lprTypeKey, lprInfo
472      * @throws OperationFailedException     unable to complete request
473      * @throws PermissionDeniedException    authorization failure
474      * @throws ReadOnlyException            attempt to update a read only attribute
475      */
476     public List<BulkStatusInfo> createLprsForPerson(@WebParam(name = "personId") String personId,
477             @WebParam(name = "lprTypeKey") String lprTypeKey,
478             @WebParam(name = "lprInfos") List<LprInfo> lprInfos,
479             @WebParam(name = "contextInfo") ContextInfo contextInfo)
480         throws DataValidationErrorException,
481             DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException,
482             PermissionDeniedException, ReadOnlyException;
483 
484     /**
485      * Creates multiple LPRs for one specified LUI. This is an all or
486      * nothing transaction - any error will invalidate the entire transaction.
487      *
488      * @param luiId                    Identifier for Lui
489      * @param lprTypeKey                Type of LUI Person relation
490      * @param lprInfos                  List of Information required to create the LUI
491      *                                 Person relation
492      * @param contextInfo                  Context information containing the principalId and locale
493      *                                 information about the caller of service operation
494      * @return Structure containing status and LUI Person relation identifiers and message
495      * @throws DataValidationErrorException if luiPersonsRelationInfo is not
496      *                                      valid
497      * @throws DoesNotExistException        luiId, lprTypeKey does not exist
498      * @throws InvalidParameterException    invalid luiId, lprTypeKey, lprInfos
499      * @throws MissingParameterException    missing luiId, lprTypeKey, lprInfos
500      * @throws OperationFailedException     unable to complete request
501      * @throws PermissionDeniedException    authorization failure
502      * @throws ReadOnlyException            attempt to update a read only attribute
503      */
504     public List<BulkStatusInfo> createLprsForLui(@WebParam(name = "luiId") String luiId,
505             @WebParam(name = "lprTypeKey") String lprTypeKey,
506             @WebParam(name = "lprInfos") List<LprInfo> lprInfos,
507             @WebParam(name = "contextInfo") ContextInfo contextInfo)
508             throws DataValidationErrorException,
509             DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException,
510             PermissionDeniedException, ReadOnlyException;
511 
512     /**
513      * Update relations between Person and LUI
514      *
515      * @param lprId   Identifier for the LUI Person Relation
516      * @param lprInfo Changed information about the LUI Person
517      *                              Relation
518      * @param contextInfo               Context information containing the principalId and locale
519      *                              information about the caller of service operation
520      * @return Updated information about the LUI Person Relation
521      * @throws DataValidationErrorException if lprInfo is not
522      *                                      valid
523      * @throws DoesNotExistException        lprId does not exist
524      * @throws InvalidParameterException    invalid lprId,
525      *                                      lprInfo
526      * @throws MissingParameterException    missing lprId,
527      *                                      lprInfo
528      * @throws OperationFailedException     unable to complete request
529      * @throws PermissionDeniedException    authorization failure
530      * @throws ReadOnlyException            attempt to update a read only attribute
531      * @throws VersionMismatchException     if optimistic lock version ind has
532      *                                      changed
533      */
534     public LprInfo updateLpr(@WebParam(name = "lprId") String lprId,
535             @WebParam(name = "lprInfo") LprInfo lprInfo,
536             @WebParam(name = "contextInfo") ContextInfo contextInfo)
537             throws DoesNotExistException, DataValidationErrorException, InvalidParameterException,
538             MissingParameterException,
539             OperationFailedException, PermissionDeniedException, ReadOnlyException, VersionMismatchException;
540 
541     /**
542      * Deletes relation between the specified Person and LUI
543      *
544      * @param lprId Identifier for the LUI Person Relation
545      * @param contextInfo             Context information containing the principalId and locale
546      *                            information about the caller of service operation
547      * @return status of the operation (success, failed)
548      * @throws DoesNotExistException     lprId does not exist
549      * @throws InvalidParameterException invalid lprId
550      * @throws MissingParameterException missing lprId
551      * @throws OperationFailedException  unable to complete request
552      * @throws PermissionDeniedException authorization failure
553      */
554     public StatusInfo deleteLpr(@WebParam(name = "lprId") String lprId,
555             @WebParam(name = "contextInfo") ContextInfo contextInfo)
556             throws DoesNotExistException,
557             InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
558 
559 
560     /**
561      * This method creates a LPR transaction of the specified type
562      * 
563      * Validates the transaction generates a unique id for the request and 
564      * persists it in the back-end.
565      *
566      * @param lprTransactionInfo LPR transaction info
567      * @param lprTransactionType LPR transaction type
568      * @param contextInfo context info
569      * @throws DataValidationErrorException if LprTransactionInfo fields are not
570      *                                      valid
571      * @throws DoesNotExistException        LUI or Person doesn't exist
572      * @throws InvalidParameterException    Invalid lprTransactionType, lprTransaction
573      * @throws MissingParameterException    Missing fields on LprTransactionInfo
574      * @throws OperationFailedException     unable to complete request
575      * @throws PermissionDeniedException    authorization failure
576      */
577     public LprTransactionInfo createLprTransaction(@WebParam(name = "lprTransactionType") String lprTransactionType,
578             @WebParam(name = "lprTransactionInfo") LprTransactionInfo lprTransactionInfo,
579             @WebParam(name = "contextInfo") ContextInfo contextInfo)
580         throws DataValidationErrorException, DoesNotExistException, InvalidParameterException,
581             MissingParameterException, OperationFailedException, PermissionDeniedException;
582 
583     /**
584      * Creates a new Lpr Transaction from an existing LPR transaction
585      *
586      * Copies the transaction's Items as well.
587      * 
588      * The new transaction has the same type as the existing transaction.
589      * Since transactions can only be processed once this method was intended
590      * to allow the application to easily create a new transaction with all of it's items 
591      * that the user be able to fix and update any problems that resulted from 
592      * processing the existing transaction. 
593      * 
594      * @param lprTransactionId LprTransaction identifier
595      * @param contextInfo the context information
596      * @throws DataValidationErrorException LprTransactionInfo is not valid
597      * @throws DoesNotExistException        lprTransactionId doesn't exist
598      * @throws InvalidParameterException    Invalid lprTransactionId
599      * @throws MissingParameterException    Missing lprTransactionId
600      * @throws OperationFailedException     unable to complete request
601      * @throws PermissionDeniedException    authorization failure
602      */
603     public LprTransactionInfo createLprTransactionFromExisting(@WebParam(name = "lprTransactionId") String lprTransactionId,
604             @WebParam(name = "contextInfo") ContextInfo contextInfo)
605             throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException,
606             OperationFailedException, PermissionDeniedException;
607 
608     /**
609      * This method updates an LPR Transaction and all of it's items.
610      *
611      * @param lprTransactionId   The transaction identifier
612      * @param lprTransactionInfo The updated Lpr Transaction
613      * @param contextInfo
614      * @throws DataValidationErrorException LprTransactionInfo is not valid
615      * @throws DoesNotExistException        lprTransactionId doesn't exist
616      * @throws InvalidParameterException    Invalid lprTransactionId or
617      *                                      lprTransactionInfo
618      * @throws MissingParameterException    Missing lprTransactionId or
619      *                                      lprTransactionInfo
620      * @throws OperationFailedException     unable to complete request
621      * @throws PermissionDeniedException    authorization failure
622      * @throws VersionMismatchException     for when Optimistic Locking encounters a version mis-match.
623      */
624     public LprTransactionInfo updateLprTransaction(@WebParam(name = "lprTransactionId") String lprTransactionId,
625             @WebParam(name = "lprTransactionInfo") LprTransactionInfo lprTransactionInfo,
626             @WebParam(name = "contextInfo") ContextInfo contextInfo)
627             throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException,
628             OperationFailedException, PermissionDeniedException, VersionMismatchException;
629 
630     /**
631      * Retrieves the LPR Transactions based on it's identifier.
632      *
633      * @param lprTransactionId The transaction identifier
634      * @param contextInfo       the contextual information
635      * @throws DoesNotExistException     lprTransactionId doesn't exist
636      * @throws InvalidParameterException Invalid lprTransactionId
637      * @throws MissingParameterException Missing lprTransactionId
638      * @throws OperationFailedException  Unable to complete request
639      * @throws PermissionDeniedException Authorization failure
640      */
641     public LprTransactionInfo getLprTransaction(@WebParam(name = "lprTransactionId") String lprTransactionId,
642             @WebParam(name = "contextInfo") ContextInfo contextInfo)
643             throws DoesNotExistException,
644             InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
645 
646     /**
647      * Retrieves LPR Transactions with an item by Person and LUI
648      * 
649      * Selects all transactions that have at least one item that matches the specified 
650      * person and either the existing or new lui.
651      * 
652      * Note: this matches the person on the item not the person requesting the transaction 
653      * which is on the transaction.
654      *
655      * @param personId The person identifier
656      * @param luiId    The LUI id
657      * @param contextInfo the context information
658      * @throws DoesNotExistException     personId or luiId doesn't exist
659      * @throws InvalidParameterException Invalid personId or luiId
660      * @throws MissingParameterException Missing personId or luiId
661      * @throws OperationFailedException  Unable to complete request
662      * @throws PermissionDeniedException Authorization failure
663      */
664     public List<LprTransactionItemInfo> getLprTransactionItemsByPersonAndLui(@WebParam(name = "personId") String personId,
665             @WebParam(name = "luiId") String luiId,
666             @WebParam(name = "contextInfo") ContextInfo contextInfo)
667             throws DoesNotExistException, InvalidParameterException, MissingParameterException,
668             OperationFailedException, PermissionDeniedException;
669 
670 
671     /**
672      * Get lpr transactions for the specified list of transaction ids.
673      *
674      * @param lprTransactionIds the ids of the lpr transactions
675      * @param contextInfo the context information
676      * @throws DoesNotExistException     personId or luiId doesn't exist
677      * @throws InvalidParameterException Invalid personId or luiId
678      * @throws MissingParameterException Missing personId or luiId
679      * @throws OperationFailedException  Unable to complete request
680      * @throws PermissionDeniedException Authorization failure
681      */
682     public List<LprTransactionInfo> getLprTransactionsByIds(@WebParam(name = "lprTransactionIds") List<String> lprTransactionIds,
683             @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException,
684             InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
685 
686     /**
687      * Retrieves LPR Transaction Items based on the resulting LPR.
688      * 
689      * Selects all transaction items that have this resulting lpr
690      *
691      * @param lprId   The resulting lpr
692      * @param contextInfo the context info
693      * @throws InvalidParameterException Invalid personId
694      * @throws MissingParameterException Missing personId
695      * @throws OperationFailedException  Unable to complete request
696      * @throws PermissionDeniedException Authorization failure
697      */
698     public List<LprTransactionItemInfo> getLprTransactionItemsByResultingLpr(@WebParam(name = "lprId") String lprId,
699             @WebParam(name = "contextInfo") ContextInfo contextInfo)
700         throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
701 
702     /**
703      * Retrieves LPR Transaction Items based on an item with the specified LUI.
704      *
705      * Selects all transaction items that where the specified LUI matches either
706      * the existing or new lui
707      *
708      * @param luiId   The LUI identifier
709      * @param contextInfo the  ontext info
710      * @throws InvalidParameterException Invalid personId
711      * @throws MissingParameterException Missing personId
712      * @throws OperationFailedException  Unable to complete request
713      * @throws PermissionDeniedException Authorization failure
714      */
715     public List<LprTransactionItemInfo> getLprTransactionItemsByLui(@WebParam(name = "luiId") String luiId,
716             @WebParam(name = "contextInfo") ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
717 
718     /**
719      * Retrieves transactions for the requesting person and the ATP.
720      *
721      * Unsubmitted transactions are those that have not been submitted (processed) yet. They can be found
722      * by checking the state of transactions where state is "New" (see wiki).
723      *
724      * @param requestingPersonId The person identifier
725      * @param atpId   The ATP Id
726      * @param contextInfo the context info
727      * @throws InvalidParameterException Invalid personId or atpId
728      * @throws MissingParameterException Missing personId or atpId
729      * @throws OperationFailedException  Unable to complete request
730      * @throws PermissionDeniedException Authorization failure
731      * @return
732      */
733     public List<LprTransactionInfo> getUnsubmittedLprTransactionsByRequestingPersonAndAtp(
734             @WebParam(name = "personId") String requestingPersonId,
735             @WebParam(name = "atpId") String atpId,
736             @WebParam(name = "contextInfo") ContextInfo contextInfo) throws InvalidParameterException,
737             MissingParameterException, OperationFailedException, PermissionDeniedException;
738 
739     /**
740      * Deletes an lpr Transaction based on Id.
741      *
742      * @param lprTransactionId LPR Transaction identifier
743      * @param contextInfo the context info
744      * @return
745      * @throws DoesNotExistException     lprTransactionId doesn't exist
746      * @throws InvalidParameterException Invalid lprTransactionId
747      * @throws MissingParameterException Missing lprTransactionId
748      * @throws OperationFailedException  Unable to complete request
749      * @throws PermissionDeniedException Authorization failure
750      */
751     public StatusInfo deleteLprTransaction(@WebParam(name = "lprTransactionId") String lprTransactionId,
752             @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException,
753             InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
754 
755     /**
756      * Submits a LPR transaction - validates the input and based on the type of
757      * transaction creates, updates, cancels or removes LPRs.
758      *
759      * @param lprTransactionId the id for the LPR transaction
760      * @param contextInfo
761      * @throws AlreadyExistsException       LPR is already present
762      * @throws DataValidationErrorException Invalid lprTransaction
763      * @throws DoesNotExistException        lprTransactionId doesn't exist
764      * @throws InvalidParameterException    Invalid lprTransactionId
765      * @throws MissingParameterException    Missing lprTransactionId
766      * @throws OperationFailedException     Unable to complete request
767      * @throws PermissionDeniedException    Authorization failure
768      */
769     public LprTransactionInfo processLprTransaction(@WebParam(name = "lprTransactionId") String lprTransactionId,
770             @WebParam(name = "contextInfo") ContextInfo contextInfo) throws AlreadyExistsException,
771             DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
772 
773     
774     /**
775      * Validates the specific Lpr provided.
776      *
777      * @param validationType        Identifier of the extent of validation
778      * @param lprTransactionType    The type of the LprTransaction.
779      * @param lprTransactionInfo   The lprTransaction to be validated
780      * @param contextInfo               Context information containing the principalId and locale
781      *                              information about the caller of service operation
782      * @return list of validation results, list should be be zero length if no
783      *         validation results are generated
784      * @throws DoesNotExistException     lprInfo not found
785      * @throws InvalidParameterException invalid lprInfo
786      *                                   relationState
787      * @throws MissingParameterException missing lprInfo
788      * @throws OperationFailedException  unable to complete request
789      * @throws PermissionDeniedException authorization failure
790      */
791     public List<ValidationResultInfo> validateLprTransaction(@WebParam(name = "validationType") String validationType,
792             @WebParam(name = "lprTransactionType") String lprTransactionType,
793             @WebParam(name = "lprTransactionInfo") LprTransactionInfo lprTransactionInfo,
794             @WebParam(name = "contextInfo") ContextInfo contextInfo)
795             throws DoesNotExistException, InvalidParameterException,
796             MissingParameterException, OperationFailedException, PermissionDeniedException;
797     
798     /**
799      * Validate the LPR Transaction
800      *
801      * @param lprTransactionId the id of the transaction
802      * @param contextInfo the context info
803      * @return
804      * @throws DataValidationErrorException Invalid lprTransaction
805      * @throws DoesNotExistException        lprTransactionId doesn't exist
806      * @throws InvalidParameterException    Invalid lprTransactionId
807      * @throws MissingParameterException    Missing lprTransactionId
808      * @throws OperationFailedException     Unable to complete request
809      * @throws PermissionDeniedException    Authorization failure
810      */
811     public List<ValidationResultInfo> verifyLprTransaction(@WebParam(name = "lprTransactionId") String lprTransactionId,
812                                                              @WebParam(name = "contextInfo") ContextInfo contextInfo)
813             throws DoesNotExistException, InvalidParameterException, MissingParameterException,
814             OperationFailedException, PermissionDeniedException;
815 
816     /**
817      * search for matching LPR transactions
818      *
819      * @param criteria
820      * @param contextInfo
821      * @return
822      * @throws InvalidParameterException
823      * @throws MissingParameterException
824      * @throws OperationFailedException
825      * @throws PermissionDeniedException
826      */
827     public List<LprTransactionInfo> searchForLprTransactions(@WebParam(name = "criteria") QueryByCriteria criteria, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws InvalidParameterException,
828             MissingParameterException, OperationFailedException, PermissionDeniedException;
829 
830     /**
831      * Search for matching LPR transactions returning their ids
832      *
833      * @param criteria
834      * @param contextInfo
835      * @return
836      * @throws InvalidParameterException
837      * @throws MissingParameterException
838      * @throws OperationFailedException
839      * @throws PermissionDeniedException
840      */
841     public List<String> searchForLprTransactionIds(@WebParam(name = "criteria") QueryByCriteria criteria,
842             @WebParam(name = "contextInfo") ContextInfo contextInfo) throws InvalidParameterException,
843             MissingParameterException, OperationFailedException, PermissionDeniedException;
844 
845 
846 }