Coverage Report - org.kuali.student.enrollment.classI.lrr.service.LearningResultRecordService
 
Classes in this File Line Coverage Branch Coverage Complexity
LearningResultRecordService
N/A
N/A
1
 
 1  
 /*
 2  
  * Copyright 2009 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 1.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  * http://www.opensource.org/licenses/ecl1.php
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.kuali.student.enrollment.classI.lrr.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.classI.lrr.dto.LearningResultRecordInfo;
 25  
 import org.kuali.student.enrollment.classI.lrr.dto.SourceInfo;
 26  
 import org.kuali.student.enrollment.classI.lrr.dto.SourceTypeInfo;
 27  
 
 28  
 import org.kuali.student.r2.common.dto.StatusInfo;
 29  
 import org.kuali.student.r2.common.dto.ValidationResultInfo;
 30  
 import org.kuali.student.r2.common.exceptions.AlreadyExistsException;
 31  
 import org.kuali.student.r2.common.exceptions.DataValidationErrorException;
 32  
 import org.kuali.student.r2.common.exceptions.DoesNotExistException;
 33  
 import org.kuali.student.r2.common.exceptions.InvalidParameterException;
 34  
 import org.kuali.student.r2.common.exceptions.MissingParameterException;
 35  
 import org.kuali.student.r2.common.exceptions.OperationFailedException;
 36  
 import org.kuali.student.r2.common.exceptions.PermissionDeniedException;
 37  
 import org.kuali.student.r2.common.exceptions.VersionMismatchException;
 38  
 
 39  
 
 40  
 /**
 41  
  *
 42  
  * @Author KSContractMojo
 43  
  * @Author sambit
 44  
  * @Since Wed May 04 15:34:10 PDT 2011
 45  
  * @See <a href="https://wiki.kuali.org/display/KULSTU/Learning+Result+Record+Service">LearningResultRecordService</>
 46  
  *
 47  
  */
 48  
 @WebService(name = "LearningResultRecordService", targetNamespace = "http://student.kuali.org/wsdl/lrr") // TODO CHECK THESE VALUES
 49  
 @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
 50  
 public interface LearningResultRecordService { 
 51  
     /** 
 52  
      * Retrieves the list of learning result record style source types known by this service
 53  
      * @return list of learning result record style source types
 54  
      * @throws OperationFailedException unable to complete request
 55  
          */
 56  
     public List<SourceTypeInfo> getSourceTypes() throws OperationFailedException;
 57  
 
 58  
     /** 
 59  
      * Retrieves information about a particular learning result record style source type
 60  
      * @param sourceTypeKey learning result record style source type identifier
 61  
      * @return learning result record style source type information
 62  
      * @throws DoesNotExistException specified source type not found
 63  
      * @throws InvalidParameterException invalid sourceTypeKey
 64  
      * @throws MissingParameterException sourceTypeKey not specified
 65  
      * @throws OperationFailedException unable to complete request
 66  
          */
 67  
     public SourceTypeInfo getSourceType(@WebParam(name="sourceTypeKey")String sourceTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException;
 68  
 
 69  
     /** 
 70  
      * Retrieves the list of learning result record style source types allowed for an learning result record
 71  
      * @return list of learning result record style source types
 72  
      * @throws OperationFailedException unable to complete request
 73  
          */
 74  
     public List<SourceTypeInfo> getAllowedSourceTypesForLearningResultRecord() throws OperationFailedException;
 75  
 
 76  
     /** 
 77  
      * Retrieves an learning result record by its identifier
 78  
      * @param learningResultRecordId learning result record identifier
 79  
      * @return learning result record information
 80  
      * @throws DoesNotExistException learning result record not found
 81  
      * @throws InvalidParameterException invalid learningResultRecordId
 82  
      * @throws MissingParameterException learningResultRecordId not specified
 83  
      * @throws OperationFailedException unable to complete request
 84  
          */
 85  
     public LearningResultRecordInfo getLearningResultRecord(@WebParam(name="learningResultRecordId")String learningResultRecordId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException;
 86  
 
 87  
     /** 
 88  
      * Retrieves a list of learning result records for a Person
 89  
      * @param personId person identifier
 90  
      * @return list of learning result record information
 91  
      * @throws DoesNotExistException person not found
 92  
      * @throws InvalidParameterException invalid personId
 93  
      * @throws MissingParameterException personId not specified
 94  
      * @throws OperationFailedException unable to complete request
 95  
          */
 96  
     public List<LearningResultRecordInfo> getLearningResultRecordsForPerson(@WebParam(name="personId")String personId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException;
 97  
 
 98  
     /** 
 99  
      * Retrieves a list of learning result records for a Lui
 100  
      * @param luiId lui identifier
 101  
      * @return list of learning result record information
 102  
      * @throws DoesNotExistException lui not found
 103  
      * @throws InvalidParameterException invalid luiId
 104  
      * @throws MissingParameterException luiId not specified
 105  
      * @throws OperationFailedException unable to complete request
 106  
          */
 107  
     public List<LearningResultRecordInfo> getLearningResultRecordsForLui(@WebParam(name="luiId")String luiId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException;
 108  
 
 109  
     /** 
 110  
      * Retrieves the list of sources of an learning result record.
 111  
      * @param learningResultRecordId learning result record identifier
 112  
      * @return list of source records
 113  
      * @throws DoesNotExistException learning result record not found
 114  
      * @throws InvalidParameterException invalid learningResultRecordId
 115  
      * @throws MissingParameterException learningResultRecordId not specified
 116  
      * @throws OperationFailedException unable to complete request
 117  
          */
 118  
     public List<SourceInfo> getSourcesForLearningResultRecord(@WebParam(name="learningResultRecordId")String learningResultRecordId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException;
 119  
 
 120  
     /** 
 121  
      * Validates an learning result record. Depending on the value of validationType, this validation could be limited to tests on just the current object and its directly contained sub-objects or expanded to perform all tests related to this object. If an identifier is present for the learning result record (and/or one of its contained sub-objects) and a record is found for that identifier, the validation checks if the learning result record can be shifted to the new values. If an identifier is not present or a record cannot be found for the identifier, it is assumed that the record does not exist and as such, the checks performed will be much shallower, typically mimicking those performed by setting the validationType to the current object.
 122  
      * @param validationType identifier of the extent of validation
 123  
      * @param learningResultRecordInfo learning result record information to be tested.
 124  
      * @return results from performing the validation
 125  
      * @throws DoesNotExistException validationTypeKey not found
 126  
      * @throws InvalidParameterException invalid validationTypeKey, learningResultRecordInfo
 127  
      * @throws MissingParameterException missing validationTypeKey, learningResultRecordInfo
 128  
      * @throws OperationFailedException unable to complete request
 129  
          */
 130  
     public List<ValidationResultInfo> validateLearningResultRecord(@WebParam(name="validationType")String validationType, @WebParam(name="learningResultRecordInfo")LearningResultRecordInfo learningResultRecordInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException;
 131  
 
 132  
     /** 
 133  
      * Creates an learning result record.
 134  
      * @param personId identifier of the person the learning result record is for
 135  
      * @param lprType identifier of the type of relationship between the person and learning unit instance
 136  
      * @param luiId identifier of the learning unit instance
 137  
      * @param resultUsageType identifier of the type of usage for the result
 138  
      * @param resultComponentId identifier of the domain of result values the person could have achieved in the learning unit instance for this usage type
 139  
      * @param resultValueId identifier of the result earned
 140  
      * @param sourceInfo the source of this learning result record
 141  
      * @param learningResultRecordInfo information about the learning result record
 142  
      * @return information about the newly created learning result record
 143  
      * @throws AlreadyExistsException Learning result record already exists
 144  
      * @throws DataValidationErrorException One or more values invalid for this operation
 145  
      * @throws InvalidParameterException one or more parameters invalid
 146  
      * @throws MissingParameterException one or more parameters missing
 147  
      * @throws OperationFailedException unable to complete request
 148  
      * @throws PermissionDeniedException authorization failure
 149  
          */
 150  
     public LearningResultRecordInfo createLearningResultRecord(@WebParam(name="personId")String personId, @WebParam(name="lprType")String lprType, @WebParam(name="luiId")String luiId, @WebParam(name="resultUsageType")String resultUsageType, @WebParam(name="resultComponentId")String resultComponentId, @WebParam(name="resultValueId")String resultValueId, @WebParam(name="sourceInfo")SourceInfo sourceInfo, @WebParam(name="learningResultRecordInfo")LearningResultRecordInfo learningResultRecordInfo) throws AlreadyExistsException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 151  
 
 152  
     /** 
 153  
      * Updates an learning result record
 154  
      * @param learningResultRecordId identifier of the learning result record to be updated
 155  
      * @param learningResultRecordInfo information about the learningResultRecord to be updated
 156  
      * @return the updated learning result record information
 157  
      * @throws DataValidationErrorException One or more values invalid for this operation
 158  
      * @throws DoesNotExistException learning result record not found
 159  
      * @throws InvalidParameterException one or more parameters invalid
 160  
      * @throws MissingParameterException one or more parameters missing
 161  
      * @throws OperationFailedException unable to complete request
 162  
      * @throws PermissionDeniedException authorization failure
 163  
      * @throws VersionMismatchException The action was attempted on an out of date version.
 164  
          */
 165  
     public LearningResultRecordInfo updateLearningResultRecord(@WebParam(name="learningResultRecordId")String learningResultRecordId, @WebParam(name="learningResultRecordInfo")LearningResultRecordInfo learningResultRecordInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException;
 166  
 
 167  
     /** 
 168  
      * Deletes an learning result record
 169  
      * @param learningResultRecordId identifier of the learning result record to delete
 170  
      * @return status of the operation (success or failure)
 171  
      * @throws DoesNotExistException learning result record not found
 172  
      * @throws InvalidParameterException invalid learningResultRecordId
 173  
      * @throws MissingParameterException missing learningResultRecordId
 174  
      * @throws OperationFailedException unable to complete request
 175  
      * @throws PermissionDeniedException authorization failure
 176  
          */
 177  
     public StatusInfo deleteLearningResultRecord(@WebParam(name="learningResultRecordId")String learningResultRecordId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 178  
 
 179  
     /** 
 180  
      * Adds a source to an learning result record. The service is expected to enforce that the Id in the source record agrees with the LearningResultRecordId parameter.
 181  
      * @param learningResultRecordId learning result record identifier
 182  
      * @param sourceInfo source information
 183  
      * @return status
 184  
      * @throws DoesNotExistException learning result record not found
 185  
      * @throws InvalidParameterException invalid learningResultRecordId or sourceInfo
 186  
      * @throws MissingParameterException learningResultRecordId or sourceInfo not specified
 187  
      * @throws OperationFailedException unable to complete request
 188  
          */
 189  
     public StatusInfo addSourceToLearningResultRecord(@WebParam(name="learningResultRecordId")String learningResultRecordId, @WebParam(name="sourceInfo")SourceInfo sourceInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException;
 190  
 
 191  
     /** 
 192  
      * removes a source to an learning result record. An Learning Result Record always must have at least one Source therefore the last source cannot be removed.
 193  
      * @param learningResultRecordId learning result record identifier
 194  
      * @param sourceId source information identifier
 195  
      * @return status
 196  
      * @throws DoesNotExistException learning result record not found
 197  
      * @throws InvalidParameterException invalid learningResultRecordId or sourceId
 198  
      * @throws MissingParameterException learningResultRecordId or sourceId not specified
 199  
      * @throws OperationFailedException unable to complete request
 200  
      * @throws UnsupportedOperationException Last source may not be removed
 201  
          */
 202  
     public StatusInfo removeSourceFromLearningResultRecord(@WebParam(name="learningResultRecordId")String learningResultRecordId, @WebParam(name="sourceId")String sourceId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, UnsupportedOperationException;
 203  
 
 204  
     /** 
 205  
      * Updates a source to an learning result record.
 206  
      * @param sourceId source identifier
 207  
      * @param sourceInfo source information
 208  
      * @return status
 209  
      * @throws DoesNotExistException source not found
 210  
      * @throws InvalidParameterException invalid sourceId or sourceInfo
 211  
      * @throws MissingParameterException sourceId or sourceInfo not specified
 212  
      * @throws OperationFailedException unable to complete request
 213  
          */
 214  
     public StatusInfo updateSourceOfLearningResultRecord(@WebParam(name="sourceId")String sourceId, @WebParam(name="sourceInfo")SourceInfo sourceInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException;
 215  
 
 216  
 }