| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| LprService |
|
| 1.0;1 |
| 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 1.0 (Dev) | |
| 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 | * Retrieves LUI Person Relation for a particular type and specified LUI | |
| 213 | * | |
| 214 | * Example: Can be used to get all the people with a particular relationship to a | |
| 215 | * specified course offering. | |
| 216 | * | |
| 217 | * @param lprTypeKey LUI person relation type key | |
| 218 | * @param luiId Identifier for LUI | |
| 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 luiId not found | |
| 223 | * @throws InvalidParameterException invalid luiId | |
| 224 | * @throws MissingParameterException missing luiId | |
| 225 | * @throws OperationFailedException unable to complete request | |
| 226 | * @throws PermissionDeniedException authorization failure | |
| 227 | */ | |
| 228 | public List<LprInfo> getLprsByLuiAndType (@WebParam(name = "luiId") String luiId, | |
| 229 | @WebParam(name = "lprTypeKey") String lprTypeKey, | |
| 230 | @WebParam(name = "contextInfo") ContextInfo contextInfo) | |
| 231 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, | |
| 232 | OperationFailedException, PermissionDeniedException; | |
| 233 | ||
| 234 | /** | |
| 235 | * Retrieves a list of LPRs by person and ATP | |
| 236 | * | |
| 237 | * Example Use Case: Can be used to get a list of registrations or instructor assignments for a person and a term | |
| 238 | * | |
| 239 | * Note: the ATP is not stored on the LPR but on the Lui so the ATP specified is used | |
| 240 | * to select or filter the Lui ids that can appear on the LPRs that are returned. | |
| 241 | * | |
| 242 | * @param personId the person id | |
| 243 | * @param atpId the id of the academic time period | |
| 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> getLprsByPersonForAtp(@WebParam(name = "personId") String personId, | |
| 254 | @WebParam(name = "atpId") String atpId, | |
| 255 | @WebParam(name = "contextInfo") ContextInfo contextInfo) | |
| 256 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, | |
| 257 | OperationFailedException, PermissionDeniedException; | |
| 258 | ||
| 259 | /** | |
| 260 | * Retrieves a list of LPRs for a person and particular ATP by the type of | |
| 261 | * LPR. | |
| 262 | * | |
| 263 | * Example Use Case: Can be used to get a list of registrations for a person and a relation type | |
| 264 | * but making sure to exclude other types of relations the student may have | |
| 265 | * during that term such as also being an teaching assistant for a course. | |
| 266 | * | |
| 267 | * @param personId the person id | |
| 268 | * @param atpId the id of the academic time period | |
| 269 | * @param lprTypeKey LUI person relation type key | |
| 270 | * @param contextInfo Context information containing the principalId and locale | |
| 271 | * information about the caller of service operation | |
| 272 | * @return List of LUI Person Relation info | |
| 273 | * @throws DoesNotExistException luiId not found | |
| 274 | * @throws InvalidParameterException invalid luiId | |
| 275 | * @throws MissingParameterException missing luiId | |
| 276 | * @throws OperationFailedException unable to complete request | |
| 277 | * @throws PermissionDeniedException authorization failure | |
| 278 | * | |
| 279 | */ | |
| 280 | public List<LprInfo> getLprsByPersonAndTypeForAtp(@WebParam(name = "personId") String personId, | |
| 281 | @WebParam(name = "atpId") String atpId, | |
| 282 | @WebParam(name = "lprTypeKey") String lprTypeKey, | |
| 283 | @WebParam(name = "contextInfo") ContextInfo contextInfo) | |
| 284 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, | |
| 285 | OperationFailedException, PermissionDeniedException; | |
| 286 | ||
| 287 | /** | |
| 288 | * Gets the LPRs for a person and the type Lui. | |
| 289 | * | |
| 290 | * Example Use Case: Can be used to get a list of all the relations a person may have to a course | |
| 291 | * offering (which is a lui type). | |
| 292 | * | |
| 293 | * @param personId person identifier | |
| 294 | * @param luiTypeKey type of the LUI | |
| 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 | public List<LprInfo> getLprsByPersonAndLuiType(@WebParam(name = "personId") String personId, | |
| 305 | @WebParam(name = "luiTypeKey") String luiTypeKey, | |
| 306 | @WebParam(name = "contextInfo") ContextInfo contextInfo) | |
| 307 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, | |
| 308 | OperationFailedException, PermissionDeniedException; | |
| 309 | ||
| 310 | /** | |
| 311 | * Gets the the LPRs for a person and atp and Lui type. | |
| 312 | * | |
| 313 | * Example Use Case: Can be used to get the relations a person may have to a course offering | |
| 314 | * (which is a lui type) and a particular term (atpId) | |
| 315 | * | |
| 316 | * @param personId person identifier | |
| 317 | * @param atpId academic time period identifier | |
| 318 | * @param luiTypeKey type of the LUI | |
| 319 | * @param contextInfo Context information containing the principalId and locale | |
| 320 | * information about the caller of service operation | |
| 321 | * @return a List of Lui Person Relation Info | |
| 322 | * @throws DoesNotExistException luiId not found | |
| 323 | * @throws InvalidParameterException invalid luiId | |
| 324 | * @throws MissingParameterException missing luiId | |
| 325 | * @throws OperationFailedException unable to complete request | |
| 326 | * @throws PermissionDeniedException authorization failure | |
| 327 | */ | |
| 328 | public List<LprInfo> getLprsByPersonForAtpAndLuiType(@WebParam(name = "personId") String personId, | |
| 329 | @WebParam(name = "atpId") String atpId, | |
| 330 | @WebParam(name = "luiTypeKey") String luiTypeKey, | |
| 331 | @WebParam(name = "contextInfo") ContextInfo contextInfo) | |
| 332 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, | |
| 333 | OperationFailedException, PermissionDeniedException; | |
| 334 | ||
| 335 | /** | |
| 336 | * Validates the particular relation in a state for a Person and LUI | |
| 337 | * | |
| 338 | * @param validationType Identifier of the extent of validation | |
| 339 | * @param luiId the identifier of the lui | |
| 340 | * @param personId the identifier of the person | |
| 341 | * @param lprTypeKey the key to the type of the relationship | |
| 342 | * @param lprInfo lpr to be validated | |
| 343 | * @param contextInfo Context information containing the principalId and locale | |
| 344 | * information about the caller of service operation | |
| 345 | * @return list of validation results, list should be be zero length if no | |
| 346 | * validation results are generated | |
| 347 | * @throws DoesNotExistException lprInfo not found | |
| 348 | * @throws InvalidParameterException invalid lprInfo | |
| 349 | * relationState | |
| 350 | * @throws MissingParameterException missing lprInfo | |
| 351 | * @throws OperationFailedException unable to complete request | |
| 352 | * @throws PermissionDeniedException authorization failure | |
| 353 | */ | |
| 354 | public List<ValidationResultInfo> validateLpr(@WebParam(name = "validationType") String validationType, | |
| 355 | @WebParam (name="luiId") String luiId, | |
| 356 | @WebParam (name="personId") String personId, | |
| 357 | @WebParam (name="lprTypeKey") String lprTypeKey, | |
| 358 | @WebParam(name = "lprInfo") LprInfo lprInfo, | |
| 359 | @WebParam(name = "contextInfo") ContextInfo contextInfo) | |
| 360 | throws DoesNotExistException, InvalidParameterException, | |
| 361 | MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 362 | ||
| 363 | /** | |
| 364 | * Searches details of LUI Person Relation Ids | |
| 365 | * | |
| 366 | * @param criteria Criteria to be used for retrieval of multiple LUI Person | |
| 367 | * Relation identifiers | |
| 368 | * @param contextInfo Context information containing the principalId and locale | |
| 369 | * information about the caller of service operation | |
| 370 | * @return Simple list of LUI Person Relation identifiers | |
| 371 | * @throws InvalidParameterException invalid relation criteria | |
| 372 | * @throws MissingParameterException missing relation criteria | |
| 373 | * @throws OperationFailedException unable to complete request | |
| 374 | * @throws PermissionDeniedException authorization failure | |
| 375 | */ | |
| 376 | public List<String> searchForLprIds(@WebParam(name = "criteria") QueryByCriteria criteria, | |
| 377 | @WebParam(name = "contextInfo") ContextInfo contextInfo) | |
| 378 | throws InvalidParameterException, MissingParameterException, OperationFailedException, | |
| 379 | PermissionDeniedException; | |
| 380 | ||
| 381 | /** | |
| 382 | * Searches details of LUI Person Relation by search criteria | |
| 383 | * | |
| 384 | * @param criteria Criteria to be used for retrieval of multiple LUI Person | |
| 385 | * Relation identifiers | |
| 386 | * @param contextInfo Context information containing the principalId and locale | |
| 387 | * information about the caller of service operation | |
| 388 | * @return Simple list of LUI Person Relation identifiers | |
| 389 | * @throws InvalidParameterException invalid relation criteria | |
| 390 | * @throws MissingParameterException missing relation criteria | |
| 391 | * @throws OperationFailedException unable to complete request | |
| 392 | * @throws PermissionDeniedException authorization failure | |
| 393 | */ | |
| 394 | public List<LprInfo> searchForLprs(@WebParam(name = "criteria") QueryByCriteria criteria, | |
| 395 | @WebParam(name = "contextInfo") ContextInfo contextInfo) | |
| 396 | throws InvalidParameterException, | |
| 397 | MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 398 | ||
| 399 | /** | |
| 400 | * Creates relation between the specified Person and LUI | |
| 401 | * | |
| 402 | * @param personId Person Identifier | |
| 403 | * @param luiId LUI Identifier | |
| 404 | * @param lprTypeKey Type of LUI to Person Relation | |
| 405 | * @param lprInfo Information required to create the LUI | |
| 406 | * Person relation | |
| 407 | * @param contextInfo Context information containing the principalId and locale | |
| 408 | * information about the caller of service operation | |
| 409 | * @return Structure containing LUI Person relation identifiers | |
| 410 | * @throws DataValidationErrorException if lprInfo is not | |
| 411 | * valid | |
| 412 | * @throws DoesNotExistException personId, luiId, relationState, | |
| 413 | * lprTypeKey does not exist | |
| 414 | * @throws InvalidParameterException invalid personId, luiId, relationState, | |
| 415 | * lprTypeKey, lprInfo | |
| 416 | * @throws MissingParameterException missing personId, luiId, relationState, | |
| 417 | * lprTypeKey, lprInfo | |
| 418 | * @throws OperationFailedException unable to complete request | |
| 419 | * @throws PermissionDeniedException authorization failure | |
| 420 | * @throws ReadOnlyException attempt to update a read only attribute | |
| 421 | */ | |
| 422 | public LprInfo createLpr(@WebParam(name = "personId") String personId, | |
| 423 | @WebParam(name = "luiId") String luiId, | |
| 424 | @WebParam(name = "lprTypeKey") String lprTypeKey, | |
| 425 | @WebParam(name = "lprInfo") LprInfo lprInfo, | |
| 426 | @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DataValidationErrorException, | |
| 427 | DoesNotExistException, InvalidParameterException, | |
| 428 | MissingParameterException, OperationFailedException, | |
| 429 | PermissionDeniedException, ReadOnlyException; | |
| 430 | ||
| 431 | /** | |
| 432 | * Creates multiple LPRs for one specified person. This is an all or | |
| 433 | * nothing transaction - any error will invalidate the entire transaction. | |
| 434 | * | |
| 435 | * @param personId Identifier for Person | |
| 436 | * @param lprTypeKey Type of LUI Person relation | |
| 437 | * @param lprInfos List of Information required to create the LUI | |
| 438 | * Person relation | |
| 439 | * @param contextInfo Context information containing the principalId and locale | |
| 440 | * information about the caller of service operation | |
| 441 | * @return Structure containing status and LUI Person relation identifiers and message | |
| 442 | * @throws DataValidationErrorException if luiPersonsRelationInfo is not | |
| 443 | * valid | |
| 444 | * @throws DoesNotExistException personId, lprTypeKey does not exist | |
| 445 | * @throws InvalidParameterException invalid personId, lprTypeKey, lprInfo | |
| 446 | * @throws MissingParameterException missing personId, lprTypeKey, lprInfo | |
| 447 | * @throws OperationFailedException unable to complete request | |
| 448 | * @throws PermissionDeniedException authorization failure | |
| 449 | * @throws ReadOnlyException attempt to update a read only attribute | |
| 450 | */ | |
| 451 | public List<BulkStatusInfo> createLprsForPerson(@WebParam(name = "personId") String personId, | |
| 452 | @WebParam(name = "lprTypeKey") String lprTypeKey, | |
| 453 | @WebParam(name = "lprInfos") List<LprInfo> lprInfos, | |
| 454 | @WebParam(name = "contextInfo") ContextInfo contextInfo) | |
| 455 | throws DataValidationErrorException, | |
| 456 | DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, | |
| 457 | PermissionDeniedException, ReadOnlyException; | |
| 458 | ||
| 459 | /** | |
| 460 | * Creates multiple LPRs for one specified LUI. This is an all or | |
| 461 | * nothing transaction - any error will invalidate the entire transaction. | |
| 462 | * | |
| 463 | * @param luiId Identifier for Lui | |
| 464 | * @param lprTypeKey Type of LUI Person relation | |
| 465 | * @param lprInfos List of Information required to create the LUI | |
| 466 | * Person relation | |
| 467 | * @param contextInfo Context information containing the principalId and locale | |
| 468 | * information about the caller of service operation | |
| 469 | * @return Structure containing status and LUI Person relation identifiers and message | |
| 470 | * @throws DataValidationErrorException if luiPersonsRelationInfo is not | |
| 471 | * valid | |
| 472 | * @throws DoesNotExistException luiId, lprTypeKey does not exist | |
| 473 | * @throws InvalidParameterException invalid luiId, lprTypeKey, lprInfos | |
| 474 | * @throws MissingParameterException missing luiId, lprTypeKey, lprInfos | |
| 475 | * @throws OperationFailedException unable to complete request | |
| 476 | * @throws PermissionDeniedException authorization failure | |
| 477 | * @throws ReadOnlyException attempt to update a read only attribute | |
| 478 | */ | |
| 479 | public List<BulkStatusInfo> createLprsForLui(@WebParam(name = "luiId") String luiId, | |
| 480 | @WebParam(name = "lprTypeKey") String lprTypeKey, | |
| 481 | @WebParam(name = "lprInfos") List<LprInfo> lprInfos, | |
| 482 | @WebParam(name = "contextInfo") ContextInfo contextInfo) | |
| 483 | throws DataValidationErrorException, | |
| 484 | DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, | |
| 485 | PermissionDeniedException, ReadOnlyException; | |
| 486 | ||
| 487 | /** | |
| 488 | * Update relations between Person and LUI | |
| 489 | * | |
| 490 | * @param lprId Identifier for the LUI Person Relation | |
| 491 | * @param lprInfo Changed information about the LUI Person | |
| 492 | * Relation | |
| 493 | * @param contextInfo Context information containing the principalId and locale | |
| 494 | * information about the caller of service operation | |
| 495 | * @return Updated information about the LUI Person Relation | |
| 496 | * @throws DataValidationErrorException if lprInfo is not | |
| 497 | * valid | |
| 498 | * @throws DoesNotExistException lprId does not exist | |
| 499 | * @throws InvalidParameterException invalid lprId, | |
| 500 | * lprInfo | |
| 501 | * @throws MissingParameterException missing lprId, | |
| 502 | * lprInfo | |
| 503 | * @throws OperationFailedException unable to complete request | |
| 504 | * @throws PermissionDeniedException authorization failure | |
| 505 | * @throws ReadOnlyException attempt to update a read only attribute | |
| 506 | * @throws VersionMismatchException if optimistic lock version ind has | |
| 507 | * changed | |
| 508 | */ | |
| 509 | public LprInfo updateLpr(@WebParam(name = "lprId") String lprId, | |
| 510 | @WebParam(name = "lprInfo") LprInfo lprInfo, | |
| 511 | @WebParam(name = "contextInfo") ContextInfo contextInfo) | |
| 512 | throws DoesNotExistException, DataValidationErrorException, InvalidParameterException, | |
| 513 | MissingParameterException, | |
| 514 | OperationFailedException, PermissionDeniedException, ReadOnlyException, VersionMismatchException; | |
| 515 | ||
| 516 | /** | |
| 517 | * Deletes relation between the specified Person and LUI | |
| 518 | * | |
| 519 | * @param lprId Identifier for the LUI Person Relation | |
| 520 | * @param contextInfo Context information containing the principalId and locale | |
| 521 | * information about the caller of service operation | |
| 522 | * @return status of the operation (success, failed) | |
| 523 | * @throws DoesNotExistException lprId does not exist | |
| 524 | * @throws InvalidParameterException invalid lprId | |
| 525 | * @throws MissingParameterException missing lprId | |
| 526 | * @throws OperationFailedException unable to complete request | |
| 527 | * @throws PermissionDeniedException authorization failure | |
| 528 | */ | |
| 529 | public StatusInfo deleteLpr(@WebParam(name = "lprId") String lprId, | |
| 530 | @WebParam(name = "contextInfo") ContextInfo contextInfo) | |
| 531 | throws DoesNotExistException, | |
| 532 | InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 533 | ||
| 534 | ||
| 535 | /** | |
| 536 | * This method creates a LPR transaction of the specified type | |
| 537 | * | |
| 538 | * Validates the transaction generates a unique id for the request and | |
| 539 | * persists it in the back-end. | |
| 540 | * | |
| 541 | * @param lprTransactionInfo LPR transaction info | |
| 542 | * @param lprTransactionType LPR transaction type | |
| 543 | * @param contextInfo context info | |
| 544 | * @throws DataValidationErrorException if LprTransactionInfo fields are not | |
| 545 | * valid | |
| 546 | * @throws DoesNotExistException LUI or Person doesn't exist | |
| 547 | * @throws InvalidParameterException Invalid lprTransactionType, lprTransaction | |
| 548 | * @throws MissingParameterException Missing fields on LprTransactionInfo | |
| 549 | * @throws OperationFailedException unable to complete request | |
| 550 | * @throws PermissionDeniedException authorization failure | |
| 551 | */ | |
| 552 | public LprTransactionInfo createLprTransaction(@WebParam(name = "lprTransactionType") String lprTransactionType, | |
| 553 | @WebParam(name = "lprTransactionInfo") LprTransactionInfo lprTransactionInfo, | |
| 554 | @WebParam(name = "contextInfo") ContextInfo contextInfo) | |
| 555 | throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, | |
| 556 | MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 557 | ||
| 558 | /** | |
| 559 | * Creates a new Lpr Transaction from an existing LPR transaction | |
| 560 | * | |
| 561 | * Copies the transaction's Items as well. | |
| 562 | * | |
| 563 | * The new transaction has the same type as the existing transaction. | |
| 564 | * Since transactions can only be processed once this method was intended | |
| 565 | * to allow the application to easily create a new transaction with all of it's items | |
| 566 | * that the user be able to fix and update any problems that resulted from | |
| 567 | * processing the existing transaction. | |
| 568 | * | |
| 569 | * @param lprTransactionId LprTransaction identifier | |
| 570 | * @param contextInfo the context information | |
| 571 | * @throws DataValidationErrorException LprTransactionInfo is not valid | |
| 572 | * @throws DoesNotExistException lprTransactionId doesn't exist | |
| 573 | * @throws InvalidParameterException Invalid lprTransactionId | |
| 574 | * @throws MissingParameterException Missing lprTransactionId | |
| 575 | * @throws OperationFailedException unable to complete request | |
| 576 | * @throws PermissionDeniedException authorization failure | |
| 577 | */ | |
| 578 | public LprTransactionInfo createLprTransactionFromExisting(@WebParam(name = "lprTransactionId") String lprTransactionId, | |
| 579 | @WebParam(name = "contextInfo") ContextInfo contextInfo) | |
| 580 | throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, | |
| 581 | OperationFailedException, PermissionDeniedException; | |
| 582 | ||
| 583 | /** | |
| 584 | * This method updates an LPR Transaction and all of it's items. | |
| 585 | * | |
| 586 | * @param lprTransactionId The transaction identifier | |
| 587 | * @param lprTransactionInfo The updated Lpr Transaction | |
| 588 | * @param contextInfo | |
| 589 | * @throws DataValidationErrorException LprTransactionInfo is not valid | |
| 590 | * @throws DoesNotExistException lprTransactionId doesn't exist | |
| 591 | * @throws InvalidParameterException Invalid lprTransactionId or | |
| 592 | * lprTransactionInfo | |
| 593 | * @throws MissingParameterException Missing lprTransactionId or | |
| 594 | * lprTransactionInfo | |
| 595 | * @throws OperationFailedException unable to complete request | |
| 596 | * @throws PermissionDeniedException authorization failure | |
| 597 | * @throws VersionMismatchException for when Optimistic Locking encounters a version mis-match. | |
| 598 | */ | |
| 599 | public LprTransactionInfo updateLprTransaction(@WebParam(name = "lprTransactionId") String lprTransactionId, | |
| 600 | @WebParam(name = "lprTransactionInfo") LprTransactionInfo lprTransactionInfo, | |
| 601 | @WebParam(name = "contextInfo") ContextInfo contextInfo) | |
| 602 | throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, | |
| 603 | OperationFailedException, PermissionDeniedException, VersionMismatchException; | |
| 604 | ||
| 605 | /** | |
| 606 | * Retrieves the LPR Transactions based on it's identifier. | |
| 607 | * | |
| 608 | * @param lprTransactionId The transaction identifier | |
| 609 | * @param contextInfo the contextual information | |
| 610 | * @throws DoesNotExistException lprTransactionId doesn't exist | |
| 611 | * @throws InvalidParameterException Invalid lprTransactionId | |
| 612 | * @throws MissingParameterException Missing lprTransactionId | |
| 613 | * @throws OperationFailedException Unable to complete request | |
| 614 | * @throws PermissionDeniedException Authorization failure | |
| 615 | */ | |
| 616 | public LprTransactionInfo getLprTransaction(@WebParam(name = "lprTransactionId") String lprTransactionId, | |
| 617 | @WebParam(name = "contextInfo") ContextInfo contextInfo) | |
| 618 | throws DoesNotExistException, | |
| 619 | InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 620 | ||
| 621 | /** | |
| 622 | * Retrieves LPR Transactions with an item by Person and LUI | |
| 623 | * | |
| 624 | * Selects all transactions that have at least one item that matches the specified | |
| 625 | * person and either the existing or new lui. | |
| 626 | * | |
| 627 | * Note: this matches the person on the item not the person requesting the transaction | |
| 628 | * which is on the transaction. | |
| 629 | * | |
| 630 | * @param personId The person identifier | |
| 631 | * @param luiId The LUI id | |
| 632 | * @param contextInfo the context information | |
| 633 | * @throws DoesNotExistException personId or luiId doesn't exist | |
| 634 | * @throws InvalidParameterException Invalid personId or luiId | |
| 635 | * @throws MissingParameterException Missing personId or luiId | |
| 636 | * @throws OperationFailedException Unable to complete request | |
| 637 | * @throws PermissionDeniedException Authorization failure | |
| 638 | */ | |
| 639 | public List<LprTransactionItemInfo> getLprTransactionItemsByPersonAndLui(@WebParam(name = "personId") String personId, | |
| 640 | @WebParam(name = "luiId") String luiId, | |
| 641 | @WebParam(name = "contextInfo") ContextInfo contextInfo) | |
| 642 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, | |
| 643 | OperationFailedException, PermissionDeniedException; | |
| 644 | ||
| 645 | ||
| 646 | /** | |
| 647 | * Get lpr transactions for the specified list of transaction ids. | |
| 648 | * | |
| 649 | * @param lprTransactionIds the ids of the lpr transactions | |
| 650 | * @param contextInfo the context information | |
| 651 | * @throws DoesNotExistException personId or luiId doesn't exist | |
| 652 | * @throws InvalidParameterException Invalid personId or luiId | |
| 653 | * @throws MissingParameterException Missing personId or luiId | |
| 654 | * @throws OperationFailedException Unable to complete request | |
| 655 | * @throws PermissionDeniedException Authorization failure | |
| 656 | */ | |
| 657 | public List<LprTransactionInfo> getLprTransactionsByIds(@WebParam(name = "lprTransactionIds") List<String> lprTransactionIds, | |
| 658 | @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, | |
| 659 | InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 660 | ||
| 661 | /** | |
| 662 | * Retrieves LPR Transaction Items based on the resulting LPR. | |
| 663 | * | |
| 664 | * Selects all transaction items that have this resulting lpr | |
| 665 | * | |
| 666 | * @param lprId The resulting lpr | |
| 667 | * @param contextInfo the context info | |
| 668 | * @throws InvalidParameterException Invalid personId | |
| 669 | * @throws MissingParameterException Missing personId | |
| 670 | * @throws OperationFailedException Unable to complete request | |
| 671 | * @throws PermissionDeniedException Authorization failure | |
| 672 | */ | |
| 673 | public List<LprTransactionItemInfo> getLprTransactionItemsByResultingLpr(@WebParam(name = "lprId") String lprId, | |
| 674 | @WebParam(name = "contextInfo") ContextInfo contextInfo) | |
| 675 | throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 676 | ||
| 677 | /** | |
| 678 | * Retrieves LPR Transaction Items based on an item with the specified LUI. | |
| 679 | * | |
| 680 | * Selects all transaction items that where the specified LUI matches either | |
| 681 | * the existing or new lui | |
| 682 | * | |
| 683 | * @param luiId The LUI identifier | |
| 684 | * @param contextInfo the ontext info | |
| 685 | * @throws InvalidParameterException Invalid personId | |
| 686 | * @throws MissingParameterException Missing personId | |
| 687 | * @throws OperationFailedException Unable to complete request | |
| 688 | * @throws PermissionDeniedException Authorization failure | |
| 689 | */ | |
| 690 | public List<LprTransactionItemInfo> getLprTransactionItemsByLui(@WebParam(name = "luiId") String luiId, | |
| 691 | @WebParam(name = "contextInfo") ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 692 | ||
| 693 | /** | |
| 694 | * Retrieves transactions for the requesting person and the ATP. | |
| 695 | * | |
| 696 | * Unsubmitted transactions are those that have not been submitted (processed) yet. They can be found | |
| 697 | * by checking the state of transactions where state is "New" (see wiki). | |
| 698 | * | |
| 699 | * @param requestingPersonId The person identifier | |
| 700 | * @param atpId The ATP Id | |
| 701 | * @param contextInfo the context info | |
| 702 | * @throws InvalidParameterException Invalid personId or atpId | |
| 703 | * @throws MissingParameterException Missing personId or atpId | |
| 704 | * @throws OperationFailedException Unable to complete request | |
| 705 | * @throws PermissionDeniedException Authorization failure | |
| 706 | * @return | |
| 707 | */ | |
| 708 | public List<LprTransactionInfo> getUnsubmittedLprTransactionsByRequestingPersonAndAtp( | |
| 709 | @WebParam(name = "personId") String requestingPersonId, | |
| 710 | @WebParam(name = "atpId") String atpId, | |
| 711 | @WebParam(name = "contextInfo") ContextInfo contextInfo) throws InvalidParameterException, | |
| 712 | MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 713 | ||
| 714 | /** | |
| 715 | * Deletes an lpr Transaction based on Id. | |
| 716 | * | |
| 717 | * @param lprTransactionId LPR Transaction identifier | |
| 718 | * @param contextInfo the context info | |
| 719 | * @return | |
| 720 | * @throws DoesNotExistException lprTransactionId doesn't exist | |
| 721 | * @throws InvalidParameterException Invalid lprTransactionId | |
| 722 | * @throws MissingParameterException Missing lprTransactionId | |
| 723 | * @throws OperationFailedException Unable to complete request | |
| 724 | * @throws PermissionDeniedException Authorization failure | |
| 725 | */ | |
| 726 | public StatusInfo deleteLprTransaction(@WebParam(name = "lprTransactionId") String lprTransactionId, | |
| 727 | @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, | |
| 728 | InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 729 | ||
| 730 | /** | |
| 731 | * Submits a LPR transaction - validates the input and based on the type of | |
| 732 | * transaction creates, updates, cancels or removes LPRs. | |
| 733 | * | |
| 734 | * @param lprTransactionId the id for the LPR transaction | |
| 735 | * @param contextInfo | |
| 736 | * @throws AlreadyExistsException LPR is already present | |
| 737 | * @throws DataValidationErrorException Invalid lprTransaction | |
| 738 | * @throws DoesNotExistException lprTransactionId doesn't exist | |
| 739 | * @throws InvalidParameterException Invalid lprTransactionId | |
| 740 | * @throws MissingParameterException Missing lprTransactionId | |
| 741 | * @throws OperationFailedException Unable to complete request | |
| 742 | * @throws PermissionDeniedException Authorization failure | |
| 743 | */ | |
| 744 | public LprTransactionInfo processLprTransaction(@WebParam(name = "lprTransactionId") String lprTransactionId, | |
| 745 | @WebParam(name = "contextInfo") ContextInfo contextInfo) throws AlreadyExistsException, | |
| 746 | DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 747 | ||
| 748 | /** | |
| 749 | * Validate the LPR Transaction | |
| 750 | * | |
| 751 | * @param lprTransactionId the id of the transaction | |
| 752 | * @param contextInfo the context info | |
| 753 | * @return | |
| 754 | * @throws DataValidationErrorException Invalid lprTransaction | |
| 755 | * @throws DoesNotExistException lprTransactionId doesn't exist | |
| 756 | * @throws InvalidParameterException Invalid lprTransactionId | |
| 757 | * @throws MissingParameterException Missing lprTransactionId | |
| 758 | * @throws OperationFailedException Unable to complete request | |
| 759 | * @throws PermissionDeniedException Authorization failure | |
| 760 | */ | |
| 761 | public List<ValidationResultInfo> verifyLprTransaction(@WebParam(name = "lprTransactionId") String lprTransactionId, | |
| 762 | @WebParam(name = "contextInfo") ContextInfo contextInfo) | |
| 763 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, | |
| 764 | OperationFailedException, PermissionDeniedException; | |
| 765 | ||
| 766 | /** | |
| 767 | * search for matching LPR transactions | |
| 768 | * | |
| 769 | * @param criteria | |
| 770 | * @param contextInfo | |
| 771 | * @return | |
| 772 | * @throws InvalidParameterException | |
| 773 | * @throws MissingParameterException | |
| 774 | * @throws OperationFailedException | |
| 775 | * @throws PermissionDeniedException | |
| 776 | */ | |
| 777 | public List<LprTransactionInfo> searchForLprTransactions(@WebParam(name = "criteria") QueryByCriteria criteria, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws InvalidParameterException, | |
| 778 | MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 779 | ||
| 780 | /** | |
| 781 | * Search for matching LPR transactions returning their ids | |
| 782 | * | |
| 783 | * @param criteria | |
| 784 | * @param contextInfo | |
| 785 | * @return | |
| 786 | * @throws InvalidParameterException | |
| 787 | * @throws MissingParameterException | |
| 788 | * @throws OperationFailedException | |
| 789 | * @throws PermissionDeniedException | |
| 790 | */ | |
| 791 | public List<String> searchForLprTransactionIds(@WebParam(name = "criteria") QueryByCriteria criteria, | |
| 792 | @WebParam(name = "contextInfo") ContextInfo contextInfo) throws InvalidParameterException, | |
| 793 | MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 794 | ||
| 795 | ||
| 796 | } |