Coverage Report - org.kuali.student.enrollment.exemption.service.ExemptionService
 
Classes in this File Line Coverage Branch Coverage Complexity
ExemptionService
N/A
N/A
1
 
 1  
 /**
 2  
  * Copyright 2010 The Kuali Foundation Licensed under the
 3  
  * Educational Community License, Version 2.0 (the "License"); you may
 4  
  * not use this file except in compliance with the License. You may
 5  
  * obtain a copy of the License at
 6  
  *
 7  
  * http://www.osedu.org/licenses/ECL-2.0
 8  
  *
 9  
  * Unless required by applicable law or agreed to in writing,
 10  
  * software distributed under the License is distributed on an "AS IS"
 11  
  * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 12  
  * or implied. See the License for the specific language governing
 13  
  * permissions and limitations under the License.
 14  
  */
 15  
 
 16  
 package org.kuali.student.enrollment.exemption.service;
 17  
 
 18  
 import java.util.List;
 19  
 
 20  
 import javax.jws.WebParam;
 21  
 import javax.jws.WebService;
 22  
 import javax.jws.soap.SOAPBinding;
 23  
 
 24  
 import org.kuali.student.enrollment.exemption.dto.ExemptionInfo;
 25  
 import org.kuali.student.enrollment.exemption.dto.ExemptionRequestInfo;
 26  
 
 27  
 import org.kuali.student.r2.common.service.StateService;
 28  
 import org.kuali.student.r2.common.service.TypeService;
 29  
 import org.kuali.student.r2.common.datadictionary.service.DataDictionaryService;
 30  
 
 31  
 import org.kuali.student.r2.common.dto.ContextInfo;
 32  
 import org.kuali.student.r2.common.dto.StatusInfo;
 33  
 import org.kuali.student.r2.common.dto.ValidationResultInfo;
 34  
 
 35  
 import org.kuali.student.r2.common.exceptions.AlreadyExistsException;
 36  
 import org.kuali.student.r2.common.exceptions.DataValidationErrorException;
 37  
 import org.kuali.student.r2.common.exceptions.DoesNotExistException;
 38  
 import org.kuali.student.r2.common.exceptions.InvalidParameterException;
 39  
 import org.kuali.student.r2.common.exceptions.MissingParameterException;
 40  
 import org.kuali.student.r2.common.exceptions.OperationFailedException;
 41  
 import org.kuali.student.r2.common.exceptions.PermissionDeniedException;
 42  
 import org.kuali.student.r2.common.exceptions.VersionMismatchException;
 43  
 import org.kuali.student.r2.common.util.constants.ExemptionServiceConstants;
 44  
 
 45  
 /**
 46  
  * Version: DRAFT - NOT READY FOR RELEASE. 
 47  
  *
 48  
  * The Exemption service stores information to permit a person to be
 49  
  * exempted from the enforcement of a restriction, deadline, or
 50  
  * statement.
 51  
  *
 52  
  * The service begins with creating an ExemptionRequest for a
 53  
  * person. On approval of an ExemptionRequest, one or more Exemptions
 54  
  * are created. There are several types of Exemptions. Exemption types
 55  
  * govern what data is stored in the Exemption structure. Current
 56  
  * types include:
 57  
  *
 58  
  *     Restriction Exemption: overrides a Restriction in the Hold Service
 59  
  *     Statement Exemption: overrides a Statement in the Statement Service to true
 60  
  *     Date Exemption: overrides a Milestone in ATP with a Date
 61  
  *     Milestone Exemption: overrides a Milestone in ATP with another Milestone
 62  
  *
 63  
  * The Exemption stores the fact that an exemption has been
 64  
  * granted. The interpretation and enforcment of the exemption is
 65  
  * performed by the caller of this service. The Exemption service
 66  
  * provides the information to override a specific check that occurs
 67  
  * somewhere in the system based on one of the above Exemption
 68  
  * types. 
 69  
  *
 70  
  * A code example that demonstrates a way to check for Exemptions
 71  
  * while performing a task with restrictions, deadlines, and statement
 72  
  * evaluations:
 73  
  *
 74  
  * <pre>
 75  
  * pretendToRegisterStudentInCourse(String personId, RegstrationGroup regGrp) {
 76  
  *     Collection<Exemption> usedExemptions = new HashSet<Exemption>();
 77  
  *
 78  
  *     String courseId = regGrp.getCourseOffering().getCourse().getId();
 79  
  *
 80  
  *     // check for registration restrictions
 81  
  *     String restrictionKey = "course registration";
 82  
  *     if (HoldService.isPersonRestricted("course registration", personId, context)) {
 83  
  *         try {
 84  
  *             Exemption e = ExemptionService.retrieveRestrictionExemption(personId, restrictionKey, courseObjectType, courseId, context);
 85  
  *             usedExemptions.add(e);
 86  
  *         } catch (NotFoundException nfe) {
 87  
  *             throw new YouCantDoThisException("If I were a nice person, I'd fetch the restriction and tell you what it is.");
 88  
  *         }
 89  
  *     }
 90  
  *
 91  
  *     // check for registration deadlines
 92  
  *     String regDeadlineCheckKey = "kualu.courseregistration.check.deadline";
 93  
  *     String milestoneKey = "this term's drop/add date milestone key";
 94  
  *     Milestone deadline = AtpService.getMilestone(milestoneKey, context);
 95  
  *     if (now > deadline.getStartDate().getTime()) {
 96  
  *         boolean hasDeadline = true;
 97  
  *         try {
 98  
  *             // there are two kinds of milestone exsmptions. first check
 99  
  *             // for an overriding milestone
 100  
  *             Exemption e = ExemptionService.retrieveMilestoneExemption(regDeadlineCheckKey, personId, milestoneKey, courseObjectType, courseId, context);
 101  
  *             Milestone m = AtpService.getMilestone(e.getMilestoneOverride().getEffectiveMilestoneKey()), context);
 102  
  *             if (now < m.getStartDate().getTime()) {
 103  
  *                 hasDeadline = false;
 104  
  *                 usedExemptions.add(e);
 105  
  *             }
 106  
  *         } catch (NotFoundException nfe) {
 107  
  *             try {
 108  
  *                 // check for a date override to the milestone
 109  
  *                 Exemption e = ExemptionService.retrieveDateExemption(personId, milestoneKey, courseObjectType, courseId, context);
 110  
  *                 if (now < e.getDateOverride().getEndDate().getTime()) {
 111  
  *                     hasDeadline = false;
 112  
  *                     usedExemptions.add(e);
 113  
  *                 }
 114  
  *             } catch (NotFoundException nfe2) {
 115  
  *                 // hasDeadline still true
 116  
  *             }
 117  
  *         }
 118  
  *
 119  
  *         if (hasDeadline) {
 120  
  *              throw new YouMissedItException("try again next year");
 121  
  *         }
 122  
  *     }
 123  
  *
 124  
  *     // check for course prereqs
 125  
  *     String coursePrereqCheckKey = "kualu.courseregistration.check.course.prereq";
 126  
  *     for (RefStatementRelationInfo relation : StatementService.getRefStatementRelationsByRef(COURSE_TYPE, courseId)) {
 127  
  *         if (relation.getType().equals("kuali.student.statement.relation.clu.prerequisites")) {
 128  
  *             try {
 129  
  *                 Exemption e = ExemptionService.retrieveStatementExemption(coursePrereqCheckKey, personId, relation.getStatementId(), courseId, courseObjectType, courseId, context))
 130  
  *                 usedExemptions.add(e);
 131  
  *             } catch (NotFoundException nfe2) {
 132  
  *                 throw new YouDontMeetARequirementException("read the requirements");
 133  
  *             }
 134  
  *         }
 135  
  *     }
 136  
  *
 137  
  *     // proceed with registration. If registration is successful, 
 138  
  *     // add the usage to all the exemptions used.
 139  
  *     persistRegistration();
 140  
  *     for (Exemption e : usedExemptions) {
 141  
  *         ExemptionService.addUseToExemption(e.getId());
 142  
  *     }
 143  
  * }
 144  
  * </pre>   
 145  
  *
 146  
  * Finally... there are two additional exemption types. 
 147  
  *
 148  
  *    Hold Exemption: records that a Hold was overidden in the Hold
 149  
  *                    service. Overriding a Hold effects the
 150  
  *                    Restriction in the Hold service. Hold Exemptions
 151  
  *                    should not be checked to determine the fate of a
 152  
  *                    Restriction.
 153  
  *
 154  
  *    Learning Result Exception: records the fact that an LRR was
 155  
  *                               created. Creating an LRR changes the
 156  
  *                               academic record and may have numerous
 157  
  *                               impacts throughout the
 158  
  *                               system. Nothing should be making a
 159  
  *                               determination based on the existence
 160  
  *                               of a Learning Result Exception.
 161  
  *                               
 162  
  * Exemptions are abbreviated Exmpts in very long method names.
 163  
  *
 164  
  * @author tom
 165  
  * @since Tue Jun 21 14:22:34 EDT 2011
 166  
  */
 167  
 
 168  
 @WebService(name = "ExemptionService", targetNamespace = ExemptionServiceConstants.NAMESPACE)
 169  
 @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
 170  
 
 171  
 public interface ExemptionService extends DataDictionaryService, StateService, TypeService {
 172  
 
 173  
     /*
 174  
      * This section defines methods used to retrieve an exemption to
 175  
      * perform overrides on various checks. A separate set of methods
 176  
      * are defined to examine all exemptions that exist.
 177  
      */
 178  
 
 179  
     /** 
 180  
      * Retrieves an active effective exemption for a person to
 181  
      * override a Restriction. An effective exemption is one with an
 182  
      * active state, the current date falls within the effective
 183  
      * date range, and the use count is less than the use limit.
 184  
      *
 185  
      * Exemptions may have a qualifier which serves to scope the
 186  
      * Exemption. An Exemption that is unqualified is global such that
 187  
      * any Exemption that is related to the person and restriction may
 188  
      * be returned. Otherwise, the qualifier and qualifier type in the
 189  
      * Exemption must match the given qualifier and qualifier type.
 190  
      *
 191  
      * In the case multiple Exemptions meet the criteria, the
 192  
      * implementation chooses the one that expires the soonest.
 193  
      *
 194  
      * The Check to which the Exemption applies is implied by the
 195  
      * Restriction.
 196  
      *
 197  
      * @param personId a unique Id of the Person
 198  
      * @param restrictionKey a unique key for the restriction to exempt
 199  
      * @param qualifierTypeKey the key for a qualifier type
 200  
      * @param qualifierId the Id for a qualifier
 201  
      * @param context Context information containing the principalId
 202  
      *                and locale information about the caller of service
 203  
      *                operation
 204  
      * @return an Exemption if one exists
 205  
      * @throws DoesNotExistException no valid exemption exists
 206  
      * @throws InvalidParameterException invalid parameter
 207  
      * @throws MissingParameterException missing parameter
 208  
      * @throws OperationFailedException unable to complete request
 209  
      * @throws PermissionDeniedException authorization failure
 210  
      */
 211  
      ExemptionInfo retrieveRestrictionExemption(@WebParam(name="personId") String personId, @WebParam(name = "restrictionKey") String restrictionKey, @WebParam(name = "qualifierTypeKey") String qualifierTypeKey, @WebParam(name = "qualifierId") String qualifierId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 212  
 
 213  
     /** 
 214  
      * Retrieves an active effective exemption for a person to
 215  
      * override a Milestone. An effective exemption is one with an
 216  
      * active state, the current date falls within the effective
 217  
      * date range, and the use count is less than the use limit.
 218  
      *
 219  
      * The MilestoneOverride returns a new milstone.
 220  
      *     
 221  
      * Exemptions may have a qualifier which serves to scope the
 222  
      * Exemption. An Exemption that is unqualified is global such that
 223  
      * any Exemption that is related to the person and restriction may
 224  
      * be returned. Otherwise, the qualifier and qualifier type in the
 225  
      * Exemption must match the given qualifier and qualifier type.
 226  
      *
 227  
      * In the case multiple Exemptions meet the criteria, the
 228  
      * implementation chooses the one that expires the soonest.
 229  
      *
 230  
      * @param checkKey a key indicating the check to which the
 231  
      *        exemption applies
 232  
      * @param personId a unique Id of the Person
 233  
      * @param milestoneKey a unique key for milestone to exempt
 234  
      * @param qualifierTypeKey the key for a qualifier type
 235  
      * @param qualifierId the Id for a qualifier
 236  
      * @param context Context information containing the principalId
 237  
      *                and locale information about the caller of service
 238  
      *                operation
 239  
      * @return an Exemption if one exists
 240  
      * @throws DoesNotExistException no valid exemption exists
 241  
      * @throws InvalidParameterException invalid parameter
 242  
      * @throws MissingParameterException missing parameter
 243  
      * @throws OperationFailedException unable to complete request
 244  
      * @throws PermissionDeniedException authorization failure
 245  
      */
 246  
      ExemptionInfo retrieveMilestoneExemption(@WebParam(name = "checkKey") String checkKey, @WebParam(name="personId") String personId, @WebParam(name = "milestoneKey") String milestoneKey, @WebParam(name = "qualifierTypeKey") String qualifierTypeKey, @WebParam(name = "qualifierId") String qualifierId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 247  
 
 248  
     /** 
 249  
      * Retrieves an active effective exemption for a person to
 250  
      * override a Milestone. An effective exemption is one with an
 251  
      * active state, the current date falls within the effective
 252  
      * date range, and the use count is less than the use limit.
 253  
      *
 254  
      * The DateOverride returns a new date.
 255  
      *
 256  
      * Exemptions may have a qualifier which serves to scope the
 257  
      * Exemption. An Exemption that is unqualified is global such that
 258  
      * any Exemption that is related to the person and restriction may
 259  
      * be returned. Otherwise, the qualifier and qualifier type in the
 260  
      * Exemption must match the given qualifier and qualifier type.
 261  
      *
 262  
      * In the case multiple Exemptions meet the criteria, the
 263  
      * implementation chooses the one that expires the soonest.
 264  
      *
 265  
      * @param checkKey a key indicating the check to which the
 266  
      *        exemption applies
 267  
      * @param personId a unique Id of the Person
 268  
      * @param milestoneKey a unique key for milestone to exempt
 269  
      * @param qualifierTypeKey the key for a qualifier type
 270  
      * @param qualifierId the Id for a qualifier
 271  
      * @param context Context information containing the principalId
 272  
      *                and locale information about the caller of service
 273  
      *                operation
 274  
      * @return an Exemption if one exists
 275  
      * @throws DoesNotExistException no valid exemption exists
 276  
      * @throws InvalidParameterException invalid parameter
 277  
      * @throws MissingParameterException missing parameter
 278  
      * @throws OperationFailedException unable to complete request
 279  
      * @throws PermissionDeniedException authorization failure
 280  
      */
 281  
      ExemptionInfo retrieveDateExemption(@WebParam(name = "checkKey") String checkKey, @WebParam(name="personId") String personId, @WebParam(name = "milestoneKey") String milestoneKey, @WebParam(name = "qualifierTypeKey") String qualifierTypeKey, @WebParam(name = "qualifierId") String qualifierId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 282  
 
 283  
     /** 
 284  
      * Retrieves an active effective exemption for a person to
 285  
      * override a Milestone. An effective exemption is one with an
 286  
      * active state, the current date falls within the effective
 287  
      * date range, and the use count is less than the use limit.
 288  
      *
 289  
      * The Statement Override instructs the caller to evaluate the
 290  
      * given statement as true.
 291  
      *
 292  
      * Exemptions may have a qualifier which serves to scope the
 293  
      * Exemption. An Exemption that is unqualified is global such that
 294  
      * any Exemption that is related to the person and restriction may
 295  
      * be returned. Otherwise, the qualifier and qualifier type in the
 296  
      * Exemption must match the given qualifier and qualifier type.
 297  
      *
 298  
      * In the case multiple Exemptions meet the criteria, the
 299  
      * implementation chooses the one that expires the soonest.
 300  
      *
 301  
      * @param checkKey a key indicating the check to which the
 302  
      *        exemption applies
 303  
      * @param personId a unique Id of the Person
 304  
      * @param statementId a unique Id for a Statement
 305  
      * @param statementAnchorId the Statement anchor
 306  
      * @param qualifierTypeKey the key for a qualifier type
 307  
      * @param qualifierId the Id for a qualifier
 308  
      * @param context Context information containing the principalId
 309  
      *                and locale information about the caller of service
 310  
      *                operation
 311  
      * @return an Exemption if one exists
 312  
      * @throws DoesNotExistException no valid exemption exists
 313  
      * @throws InvalidParameterException invalid parameter
 314  
      * @throws MissingParameterException missing parameter
 315  
      * @throws OperationFailedException unable to complete request
 316  
      * @throws PermissionDeniedException authorization failure
 317  
      */
 318  
      ExemptionInfo retrieveStatementExemption(@WebParam(name = "checkKey") String checkKey, @WebParam(name="personId") String personId, @WebParam(name = "statementId") String statementId, @WebParam(name = "statementAnchorId") String statementAnchorId, @WebParam(name = "qualifierTypeKey") String qualifierTypeKey, @WebParam(name = "qualifierId") String qualifierId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 319  
 
 320  
     /** 
 321  
      * Indicate that the given Exemption has been used successfully in
 322  
      * a transaction. This method increments the Exemption use count.
 323  
      *
 324  
      * @param exemptionId the Id for the Exemption
 325  
      * @param context Context information containing the principalId
 326  
      *                and locale information about the caller of service
 327  
      *                operation
 328  
      * @return the status
 329  
      * @throws DoesNotExistException no valid exemption exists
 330  
      * @throws InvalidParameterException invalid parameter
 331  
      * @throws MissingParameterException missing parameter
 332  
      * @throws OperationFailedException unable to complete request
 333  
      * @throws PermissionDeniedException authorization failure
 334  
      */
 335  
      StatusInfo addUseToExemption(@WebParam(name = "exeptionId") String exemptionId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 336  
 
 337  
 
 338  
     /*
 339  
      * This set of methods examines all Exemptions as it
 340  
      * related to a person.
 341  
      */
 342  
 
 343  
     /** 
 344  
      * Gets a list of all exemptions by qualfiier. 
 345  
      *
 346  
      * @param qualifierTypeKey the qualifier type
 347  
      * @param qualifierId the qualifier
 348  
      * @param context Context information containing the principalId
 349  
      *                and locale information about the caller of service
 350  
      *                operation
 351  
      * @return a list of Exemptions
 352  
      * @throws InvalidParameterException invalid parameter
 353  
      * @throws MissingParameterException missing parameter
 354  
      * @throws OperationFailedException unable to complete request
 355  
      * @throws PermissionDeniedException authorization failure
 356  
      */
 357  
     public List<ExemptionInfo> getExemptionsByQualifier(@WebParam(name = "qualifierTypeKey") String qualifierTypeKey, @WebParam(name = "qualifierId") String qualifierId, @WebParam(name = "context") ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 358  
 
 359  
     /** 
 360  
      * Gets a list of all exemptions for a Person.
 361  
      *
 362  
      * @param personId a unique Id of the Person
 363  
      * @param context Context information containing the principalId
 364  
      *                and locale information about the caller of service
 365  
      *                operation
 366  
      * @return a list of Exemptions
 367  
      * @throws InvalidParameterException invalid parameter
 368  
      * @throws MissingParameterException missing parameter
 369  
      * @throws OperationFailedException unable to complete request
 370  
      * @throws PermissionDeniedException authorization failure
 371  
      */
 372  
     public List<ExemptionInfo> getExemptionsForPerson(@WebParam(name = "personId") String personId, @WebParam(name = "context") ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 373  
 
 374  
     /** 
 375  
      * Gets a list of all active effective exemptions for a Person. An
 376  
      * effective exemption is one with an active state, the current
 377  
      * date falls within the effective date range, and the use count
 378  
      * is less than the use limit.
 379  
      *
 380  
      * @param personId a unique Id of the Person
 381  
      * @param context Context information containing the principalId
 382  
      *                and locale information about the caller of service
 383  
      *                operation
 384  
      * @return a list of Exemptions
 385  
      * @throws InvalidParameterException invalid parameter
 386  
      * @throws MissingParameterException missing parameter
 387  
      * @throws OperationFailedException unable to complete request
 388  
      * @throws PermissionDeniedException authorization failure
 389  
      */
 390  
     public List<ExemptionInfo> getActiveExemptionsForPerson(@WebParam(name = "personId") String personId, @WebParam(name = "context") ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 391  
 
 392  
     /** 
 393  
      * Gets a list of all exemptions by Type for a Person.
 394  
      *
 395  
      * @param typeKey an exemption Type
 396  
      * @param personId a unique Id of the Person
 397  
      * @param context Context information containing the principalId
 398  
      *                and locale information about the caller of service
 399  
      *                operation
 400  
      * @return a list of Exemptions
 401  
      * @throws InvalidParameterException invalid parameter
 402  
      * @throws MissingParameterException missing parameter
 403  
      * @throws OperationFailedException unable to complete request
 404  
      * @throws PermissionDeniedException authorization failure
 405  
      */
 406  
     public List<ExemptionInfo> getExemptionsByTypeForPerson(@WebParam(name = "typeKey") String typeKey, @WebParam(name = "personId") String personId, @WebParam(name = "context") ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 407  
 
 408  
     /** 
 409  
      * Gets a list of all effective exemptions by Type for a
 410  
      * Person. An effective exemption is one with an active state, the
 411  
      * current date falls within the effective date range, and the use
 412  
      * count is less than the use limit.
 413  
      *
 414  
      * @param typeKey an exemption Type
 415  
      * @param personId a unique Id of the Person
 416  
      * @param context Context information containing the principalId
 417  
      *                and locale information about the caller of service
 418  
      *                operation
 419  
      * @return a list of Exemptions
 420  
      * @throws InvalidParameterException invalid parameter
 421  
      * @throws MissingParameterException missing parameter
 422  
      * @throws OperationFailedException unable to complete request
 423  
      * @throws PermissionDeniedException authorization failure
 424  
      */
 425  
     public List<ExemptionInfo> getActiveExemptionsByTypeForPerson(@WebParam(name = "typeKey") String typeKey, @WebParam(name = "personId") String personId, @WebParam(name = "context") ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 426  
 
 427  
 
 428  
     /*
 429  
      * This section defines the standard crud pattern for
 430  
      * managing Exemptions and requests.
 431  
      */
 432  
 
 433  
     /** 
 434  
      * Retrieves the details of a single Exemption by a exemption Id.
 435  
      *
 436  
      * @param exemptionId Unique Id of the Exemption to be retrieved
 437  
      * @param context Context information containing the principalId
 438  
      *                and locale information about the caller of service
 439  
      *                operation
 440  
      * @return the details of the Exemption requested
 441  
      * @throws DoesNotExistException exemptionId not found
 442  
      * @throws InvalidParameterException invalid parameter
 443  
      * @throws MissingParameterException missing parameter
 444  
      * @throws OperationFailedException unable to complete request
 445  
      * @throws PermissionDeniedException authorization failure
 446  
      */
 447  
     public ExemptionInfo getExemption(@WebParam(name = "exemptionId") String exemptionId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 448  
 
 449  
     /** 
 450  
      * Retrieves a list Exemptions corresponding to a list of
 451  
      * exemption Ids.
 452  
      *
 453  
      * @param exemptionIdList list of unique Ids of the
 454  
      *        Exemption to be retrieved
 455  
      * @param context Context information containing the principalId
 456  
      *                and locale information about the caller of service
 457  
      *                operation
 458  
      * @return a list of Exemptions
 459  
      * @throws DoesNotExistException an exemptionId in list not found
 460  
      * @throws InvalidParameterException invalid parameter
 461  
      * @throws MissingParameterException missing parameter
 462  
      * @throws OperationFailedException unable to complete request
 463  
      * @throws PermissionDeniedException authorization failure
 464  
      */
 465  
     public List<ExemptionInfo> getExemptionsByIdList(@WebParam(name = "exemptionIdList") List<String> exemptionIdList, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 466  
 
 467  
     /** 
 468  
      * Retrieves a list Exemption Ids by Type.
 469  
      *
 470  
      * @param exemptionTypeKey a unique key for an exemption Type
 471  
      * @param context Context information containing the principalId
 472  
      *                and locale information about the caller of service
 473  
      *                operation
 474  
      * @return a list of Exemptions
 475  
      * @throws DoesNotExistException an exemptionId in list not found
 476  
      * @throws InvalidParameterException invalid parameter
 477  
      * @throws MissingParameterException missing parameter
 478  
      * @throws OperationFailedException unable to complete request
 479  
      * @throws PermissionDeniedException authorization failure
 480  
      */
 481  
     public List<String> getExemptionIdsByType(@WebParam(name = "exemptionTypeKey") String exemptionTypeKey, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 482  
 
 483  
     /** 
 484  
      * Validates an Exemption. Depending on the value of validationType,
 485  
      * this validation could be limited to tests on just the current
 486  
      * object and its directly contained subobjects or expanded to
 487  
      * perform all tests related to this object. If an identifier is
 488  
      * present for the exemption and a record is found for that identifier,
 489  
      * the validation checks if the exemption can be shifted to the new
 490  
      * values. If a record cannot be found for the identifier, it is
 491  
      * assumed that the record does not exist and as such, the checks
 492  
      * performed will be much shallower, typically mimicking those
 493  
      * performed by setting the validationType to the current
 494  
      * object. This is a slightly different pattern from the standard
 495  
      * validation as the caller provides the identifier in the create
 496  
      * statement instead of the server assigning an identifier.
 497  
      *
 498  
      * @param validationTypeKey Identifier of the extent of validation
 499  
      * @param exemptionInfo the exemption information to be tested.
 500  
      * @param context Context information containing the principalId
 501  
      *                and locale information about the caller of service
 502  
      *                operation
 503  
      * @return the results from performing the validation
 504  
      * @throws DoesNotExistException validationTypeKey not found
 505  
      * @throws InvalidParameterException invalid validationTypeKey, exemptionInfo
 506  
      * @throws MissingParameterException missing validationTypeKey, exemptionInfo
 507  
      * @throws OperationFailedException unable to complete request
 508  
      */
 509  
     public List<ValidationResultInfo> validateExemption(@WebParam(name = "validationTypeKey") String validationTypeKey, @WebParam(name = "exemptionInfo") ExemptionInfo exemptionInfo, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException;
 510  
 
 511  
     /** 
 512  
      * Creates a new Exemption. Exemptions can only be created off of
 513  
      * an exemption request.
 514  
      *
 515  
      * @param exemptionRequestId an Id for an exemption request
 516  
      * @param exemptionInfo Details of the Exemption to be created
 517  
      * @param context Context information containing the principalId
 518  
      *                and locale information about the caller of service
 519  
      *                operation
 520  
      * @return the details of the Exemption just created
 521  
      * @throws AlreadyExistsException the Exemption being created already exists
 522  
      * @throws DataValidationErrorException One or more values invalid for 
 523  
      *         this operation
 524  
      * @throws InvalidParameterException One or more parameters invalid
 525  
      * @throws MissingParameterException One or more parameters missing
 526  
      * @throws OperationFailedException unable to complete request
 527  
      * @throws PermissionDeniedException authorization failure
 528  
      */
 529  
     public ExemptionInfo createExemption(@WebParam(name = "exemptionRequestId") String exemptionRequestId, @WebParam(name = "exemptionInfo") ExemptionInfo exemptionInfo, @WebParam(name = "context") ContextInfo context) throws AlreadyExistsException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 530  
 
 531  
     /** 
 532  
      * Updates an existing Exemption.
 533  
      *
 534  
      * @param exemptionId Id of Exemption to be updated
 535  
      * @param exemptionInfo Details of updates to the Exemption
 536  
      *        being updated
 537  
      * @param context Context information containing the principalId
 538  
      *                and locale information about the caller of service
 539  
      *                operation
 540  
      * @return the details of Exemption just updated
 541  
      * @throws DataValidationErrorException One or more values invalid for this 
 542  
      *         operation
 543  
      * @throws DoesNotExistException the Exemption does not exist
 544  
      * @throws InvalidParameterException One or more parameters invalid
 545  
      * @throws MissingParameterException One or more parameters missing
 546  
      * @throws OperationFailedException unable to complete request
 547  
      * @throws PermissionDeniedException authorization failure
 548  
      * @throws VersionMismatchException The action was attempted on an out of date 
 549  
      *         version.
 550  
      */
 551  
     public ExemptionInfo updateExemption(@WebParam(name = "exemptionId") String exemptionId, @WebParam(name = "exemptionInfo") ExemptionInfo exemptionInfo, @WebParam(name = "context") ContextInfo context) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException;
 552  
 
 553  
     /** 
 554  
      * Deletes an existing Exemption record.
 555  
      *
 556  
      * @param exemptionId the Id of the Exemption to be deleted
 557  
      * @param context Context information containing the principalId
 558  
      *                and locale information about the caller of service
 559  
      *                operation
 560  
      * @return status of the operation (success, failed)
 561  
      * @throws DoesNotExistException the Exemption does not exist
 562  
      * @throws InvalidParameterException One or more parameters invalid
 563  
      * @throws MissingParameterException One or more parameters missing
 564  
      * @throws OperationFailedException unable to complete request
 565  
      * @throws PermissionDeniedException authorization failure
 566  
      */
 567  
     public StatusInfo deleteExemption(@WebParam(name = "exemptionId") String exemptionId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 568  
 
 569  
     /** 
 570  
      * Gets a list of all exemption requests for a Person.
 571  
      *
 572  
      * @param personId a unique Id of the Person
 573  
      * @param context Context information containing the principalId
 574  
      *                and locale information about the caller of service
 575  
      *                operation
 576  
      * @return a list of Exemptions
 577  
      * @throws InvalidParameterException invalid parameter
 578  
      * @throws MissingParameterException missing parameter
 579  
      * @throws OperationFailedException unable to complete request
 580  
      * @throws PermissionDeniedException authorization failure
 581  
      */
 582  
     public List<ExemptionRequestInfo> getRequestsForPerson(@WebParam(name = "personId") String personId, @WebParam(name = "context") ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 583  
 
 584  
     /** 
 585  
      * Gets a list of all exemption requests by Type for a Person.
 586  
      *
 587  
      * @param typeKey an exemption Type
 588  
      * @param personId a unique Id of the Person
 589  
      * @param context Context information containing the principalId
 590  
      *                and locale information about the caller of service
 591  
      *                operation
 592  
      * @return a list of Exemptions
 593  
      * @throws InvalidParameterException invalid parameter
 594  
      * @throws MissingParameterException missing parameter
 595  
      * @throws OperationFailedException unable to complete request
 596  
      * @throws PermissionDeniedException authorization failure
 597  
      */
 598  
     public List<ExemptionRequestInfo> getRequestsByTypeForPerson(@WebParam(name = "typeKey") String typeKey, @WebParam(name = "personId") String personId, @WebParam(name = "context") ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 599  
 
 600  
     /** 
 601  
      * Retrieves the details of a single ExemptionRequest by a
 602  
      * exemption Id.
 603  
      *
 604  
      * @param exemptionRequestId Unique Id of the ExemptionRequest to be retrieved
 605  
      * @param context Context information containing the principalId
 606  
      *                and locale information about the caller of service
 607  
      *                operation
 608  
      * @return the details of the ExemptionRequest requested
 609  
      * @throws DoesNotExistException exemptionRequestId not found
 610  
      * @throws InvalidParameterException invalid exemptionRequestId
 611  
      * @throws MissingParameterException missing exemptionRequestId
 612  
      * @throws OperationFailedException unable to complete request
 613  
      * @throws PermissionDeniedException authorization failure
 614  
      */
 615  
     public ExemptionRequestInfo getExemptionRequest(@WebParam(name = "exemptionRequestId") String exemptionRequestId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 616  
 
 617  
     /** 
 618  
      * Retrieves a list ExemptionRequests corresponding to a list of
 619  
      * exemption request Ids.
 620  
      *
 621  
      * @param exemptionRequestIdList list of unique Ids of the
 622  
      *        ExemptionRequests to be retrieved
 623  
      * @param context Context information containing the principalId
 624  
      *                and locale information about the caller of service
 625  
      *                operation
 626  
      * @return a list of ExemptionRequests
 627  
      * @throws DoesNotExistException an exemptionRequestId in list not found
 628  
      * @throws InvalidParameterException invalid exemptionRequestId in list
 629  
      * @throws MissingParameterException missing exemptionRequestIdList
 630  
      * @throws OperationFailedException unable to complete request
 631  
      * @throws PermissionDeniedException authorization failure
 632  
      */
 633  
     public List<ExemptionRequestInfo> getExemptionRequestsByIdList(@WebParam(name = "exemptionRequestIdList") List<String> exemptionRequestIdList, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 634  
 
 635  
     /** 
 636  
      * Retrieves a list Exemption Request Ids by Type.
 637  
      *
 638  
      * @param exemptionRequestTypeKey a unique key for an exemption
 639  
      *        requestType
 640  
      * @param context Context information containing the principalId
 641  
      *                and locale information about the caller of service
 642  
      *                operation
 643  
      * @return a list of Exemptions
 644  
      * @throws DoesNotExistException an exemptionId in list not found
 645  
      * @throws InvalidParameterException invalid parameter
 646  
      * @throws MissingParameterException missing parameter
 647  
      * @throws OperationFailedException unable to complete request
 648  
      * @throws PermissionDeniedException authorization failure
 649  
      */
 650  
     public List<String> getExemptionRequestIdsByType(@WebParam(name = "exemptionRequestTypeKey") String exemptionRequestTypeKey, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 651  
 
 652  
     /** 
 653  
      * Retrieves a list Exemption Request Ids by Check Key.
 654  
      *
 655  
      * @param checkKey a unique key for a Check
 656  
      * @param context Context information containing the principalId
 657  
      *                and locale information about the caller of service
 658  
      *                operation
 659  
      * @return a list of Exemptions
 660  
      * @throws InvalidParameterException invalid parameter
 661  
      * @throws MissingParameterException missing parameter
 662  
      * @throws OperationFailedException unable to complete request
 663  
      * @throws PermissionDeniedException authorization failure
 664  
      */
 665  
     public List<String> getExemptionRequestIdsByCheck(@WebParam(name = "checkKey") String checkKey, @WebParam(name = "context") ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 666  
 
 667  
     /** 
 668  
      * Validates an ExemptionRequest. Depending on the value of
 669  
      * validationType, this validation could be limited to tests on
 670  
      * just the current object and its directly contained subobjects
 671  
      * or expanded to perform all tests related to this object. If an
 672  
      * identifier is present for the exemption request and a record is
 673  
      * found for that identifier, the validation checks if the
 674  
      * exemption request can be shifted to the new values. If a record
 675  
      * cannot be found for the identifier, it is assumed that the
 676  
      * record does not exist and as such, the checks performed will be
 677  
      * much shallower, typically mimicking those performed by setting
 678  
      * the validationType to the current object. This is a slightly
 679  
      * different pattern from the standard validation as the caller
 680  
      * provides the identifier in the create statement instead of the
 681  
      * server assigning an identifier.
 682  
      *
 683  
      * @param validationTypeKey Identifier of the extent of validation
 684  
      * @param exemptionRequestInfo the exemption request information to be tested.
 685  
      * @param context Context information containing the principalId
 686  
      *                and locale information about the caller of service
 687  
      *                operation
 688  
      * @return the results from performing the validation
 689  
      * @throws DoesNotExistException validationTypeKey not found
 690  
      * @throws InvalidParameterException invalid validationTypeKey, exemptionRequestInfo
 691  
      * @throws MissingParameterException missing validationTypeKey, exemptionRequestInfo
 692  
      * @throws OperationFailedException unable to complete request
 693  
      */
 694  
     public List<ValidationResultInfo> validateExemptionRequest(@WebParam(name = "validationTypeKey") String validationTypeKey, @WebParam(name = "exemptionRequestInfo") ExemptionRequestInfo exemptionRequestInfo, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException;
 695  
 
 696  
     /** 
 697  
      * Creates a new ExemptionRequst.
 698  
      *
 699  
      * @param exemptionRequestInfo Details of the Exemption Request to be created
 700  
      * @param context Context information containing the principalId
 701  
      *                and locale information about the caller of service
 702  
      *                operation
 703  
      * @return the details of the Exemption Requst just created
 704  
      * @throws AlreadyExistsException the Exemption Request being
 705  
      *         created already exists
 706  
      * @throws DataValidationErrorException One or more values invalid for 
 707  
      *         this operation
 708  
      * @throws InvalidParameterException One or more parameters invalid
 709  
      * @throws MissingParameterException One or more parameters missing
 710  
      * @throws OperationFailedException unable to complete request
 711  
      * @throws PermissionDeniedException authorization failure
 712  
      */
 713  
     public ExemptionRequestInfo createExemptionRequest(@WebParam(name = "exemptionRequestInfo") ExemptionRequestInfo exemptionRequestInfo, @WebParam(name = "context") ContextInfo context) throws AlreadyExistsException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 714  
 
 715  
     /** 
 716  
      * Updates an existing Exemption Request.
 717  
      *
 718  
      * @param exemptionRequestId Id of Exemption Request to be updated
 719  
      * @param exemptionRequestInfo Details of updates to the Exemption
 720  
      *        Request being updated
 721  
      * @param context Context information containing the principalId
 722  
      *                and locale information about the caller of service
 723  
      *                operation
 724  
      * @return the details of Exemption Request just updated
 725  
      * @throws DataValidationErrorException One or more values invalid for this 
 726  
      *         operation
 727  
      * @throws DoesNotExistException the Exemption Request does not exist
 728  
      * @throws InvalidParameterException One or more parameters invalid
 729  
      * @throws MissingParameterException One or more parameters missing
 730  
      * @throws OperationFailedException unable to complete request
 731  
      * @throws PermissionDeniedException authorization failure
 732  
      * @throws VersionMismatchException The action was attempted on an out of date 
 733  
      *         version.
 734  
      */
 735  
     public ExemptionRequestInfo updateExemptionRequest(@WebParam(name = "exemptionRequestId") String exemptionRequestId, @WebParam(name = "exemptionRequestInfo") ExemptionRequestInfo exemptionRequestInfo, @WebParam(name = "context") ContextInfo context) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException;
 736  
 
 737  
     /** 
 738  
      * Deletes an existing Exemption Request record.
 739  
      *
 740  
      * @param exemptionRequestId the Id of the Exemption Request to be deleted
 741  
      * @param context Context information containing the principalId
 742  
      *                and locale information about the caller of service
 743  
      *                operation
 744  
      * @return status of the operation (success, failed)
 745  
      * @throws DoesNotExistException the Exemption Request does not exist
 746  
      * @throws InvalidParameterException One or more parameters invalid
 747  
      * @throws MissingParameterException One or more parameters missing
 748  
      * @throws OperationFailedException unable to complete request
 749  
      * @throws PermissionDeniedException authorization failure
 750  
      */
 751  
     public StatusInfo deleteExemptionRequest(@WebParam(name = "exemptionRequestId") String exemptionRequestId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 752  
 }