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.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.lrr.dto.LearningResultRecordInfo; 25 import org.kuali.student.enrollment.lrr.dto.ResultSourceInfo; 26 import org.kuali.student.r2.common.dto.ContextInfo; 27 import org.kuali.student.r2.common.dto.StatusInfo; 28 import org.kuali.student.r2.common.dto.ValidationResultInfo; 29 import org.kuali.student.r2.common.exceptions.AlreadyExistsException; 30 import org.kuali.student.r2.common.exceptions.DataValidationErrorException; 31 import org.kuali.student.r2.common.exceptions.DoesNotExistException; 32 import org.kuali.student.r2.common.exceptions.InvalidParameterException; 33 import org.kuali.student.r2.common.exceptions.MissingParameterException; 34 import org.kuali.student.r2.common.exceptions.OperationFailedException; 35 import org.kuali.student.r2.common.exceptions.PermissionDeniedException; 36 import org.kuali.student.r2.common.exceptions.VersionMismatchException; 37 import org.kuali.student.r2.common.util.constants.LrrServiceConstants; 38 39 40 /** 41 * 42 * 43 * The Learning Result Record Service supports the management of results earned through a person's participation in a learning unit instance. 44 * 45 * @version: 0.0.7 46 * @author Kuali Student Team (Kamal) 47 */ 48 @WebService(name = "LearningResultRecordService", targetNamespace = LrrServiceConstants.NAMESPACE) // TODO CHECK THESE VALUES 49 @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) 50 public interface LearningResultRecordService { 51 52 53 /** 54 * Retrieves a learning result record by its identifier 55 * 56 * @param learningResultRecordId learning result record identifier 57 * @param context Context information containing the principalId 58 * and locale information about the caller of service 59 * operation 60 * @return learning result record information 61 * @throws DoesNotExistException learning result record not found 62 * @throws InvalidParameterException invalid learningResultRecordId 63 * @throws MissingParameterException learningResultRecordId not specified 64 * @throws OperationFailedException unable to complete request 65 * @throws PermissionDeniedException authorization failure 66 */ 67 public LearningResultRecordInfo getLearningResultRecord(@WebParam(name="learningResultRecordId")String learningResultRecordId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; 68 69 /** 70 * Retrieves a list of learning result records for a Lui Person Relation 71 * @param lprId Lui person relation identifier 72 * @param context Context information containing the principalId 73 * and locale information about the caller of service 74 * operation 75 * @return list of learning result record information 76 * @throws DoesNotExistException person not found 77 * @throws InvalidParameterException invalid personId 78 * @throws MissingParameterException personId not specified 79 * @throws OperationFailedException unable to complete request 80 */ 81 public List<LearningResultRecordInfo> getLearningResultRecordsForLpr(@WebParam(name="lprId")String lprId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; 82 83 84 /** 85 * 86 * Retrieves a list of learning result records based on LPR and the type of LRR 87 * 88 * @param lprId 89 * @param lrrType 90 * @return 91 * @throws DoesNotExistException 92 * @throws InvalidParameterException 93 * @throws MissingParameterException 94 * @throws OperationFailedException 95 */ 96 public List<LearningResultRecordInfo> getLearningResultRecordsForLprAndType(@WebParam(name="lprId")String lprId, @WebParam(name="lrrType")String lrrType) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; 97 98 99 /** 100 * Retrieves a list of learning result records for Lui Person Relation Ids 101 * @param lprIds List of Lui person relation identifier 102 * @param context Context information containing the principalId 103 * and locale information about the caller of service 104 * operation 105 * @return list of learning result record information 106 * @throws DoesNotExistException person not found 107 * @throws InvalidParameterException invalid personId 108 * @throws MissingParameterException personId not specified 109 * @throws OperationFailedException unable to complete request 110 */ 111 public List<LearningResultRecordInfo> getLearningResultRecordsForLprIds(@WebParam(name="lprIds")List<String> lprIds, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; 112 113 /** 114 * Retrieves a list of learning result records by source Id 115 * @param lprIds List of Lui person relation identifier 116 * @param context Context information containing the principalId 117 * and locale information about the caller of service 118 * operation 119 * @return list of learning result record information 120 * @throws DoesNotExistException person not found 121 * @throws InvalidParameterException invalid personId 122 * @throws MissingParameterException personId not specified 123 * @throws OperationFailedException unable to complete request 124 */ 125 public List<LearningResultRecordInfo> getLearningResultRecordsBySourceId(@WebParam(name="lprIds")List<String> sourceIds, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; 126 127 128 /** 129 * Creates an learning result record. 130 * @param learningResultRecordInfo information about the learning result record 131 * @param context Context information containing the principalId 132 * and locale information about the caller of service 133 * operation 134 * @return information about the newly created learning result record 135 * @throws AlreadyExistsException Learning result record already exists 136 * @throws DataValidationErrorException One or more values invalid for this operation 137 * @throws InvalidParameterException one or more parameters invalid 138 * @throws MissingParameterException one or more parameters missing 139 * @throws OperationFailedException unable to complete request 140 * @throws PermissionDeniedException authorization failure 141 */ 142 public LearningResultRecordInfo createLearningResultRecord(@WebParam(name="learningResultRecord")LearningResultRecordInfo learningResultRecord, @WebParam(name = "context") ContextInfo context) throws AlreadyExistsException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; 143 144 /** 145 * Updates an learning result record 146 * @param learningResultRecordId identifier of the learning result record to be updated 147 * @param learningResultRecordInfo information about the learningResultRecord to be updated 148 * @param context Context information containing the principalId 149 * and locale information about the caller of service 150 * operation 151 * @return the updated learning result record information 152 * @throws DataValidationErrorException One or more values invalid for this operation 153 * @throws DoesNotExistException learning result record not found 154 * @throws InvalidParameterException one or more parameters invalid 155 * @throws MissingParameterException one or more parameters missing 156 * @throws OperationFailedException unable to complete request 157 * @throws PermissionDeniedException authorization failure 158 * @throws VersionMismatchException The action was attempted on an out of date version. 159 */ 160 public LearningResultRecordInfo updateLearningResultRecord(@WebParam(name="learningResultRecordId")String learningResultRecordId, @WebParam(name="learningResultRecordInfo")LearningResultRecordInfo learningResultRecordInfo, @WebParam(name = "context") ContextInfo context) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException; 161 162 /** 163 * Deletes an learning result record 164 * @param learningResultRecordId identifier of the learning result record to delete 165 * @param context Context information containing the principalId 166 * and locale information about the caller of service 167 * operation 168 * @return status of the operation (success or failure) 169 * @throws DoesNotExistException learning result record not found 170 * @throws InvalidParameterException invalid learningResultRecordId 171 * @throws MissingParameterException missing learningResultRecordId 172 * @throws OperationFailedException unable to complete request 173 * @throws PermissionDeniedException authorization failure 174 */ 175 public StatusInfo deleteLearningResultRecord(@WebParam(name="learningResultRecordId")String learningResultRecordId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; 176 177 178 /** 179 * 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. 180 * @param validationType identifier of the extent of validation 181 * @param learningResultRecordInfo learning result record information to be tested. 182 * @param context Context information containing the principalId 183 * and locale information about the caller of service 184 * operation 185 * @return results from performing the validation 186 * @throws DoesNotExistException validationTypeKey not found 187 * @throws InvalidParameterException invalid validationTypeKey, learningResultRecordInfo 188 * @throws MissingParameterException missing validationTypeKey, learningResultRecordInfo 189 * @throws OperationFailedException unable to complete request 190 */ 191 public List<ValidationResultInfo> validateLearningResultRecord(@WebParam(name="validationType")String validationType, @WebParam(name="learningResultRecordInfo")LearningResultRecordInfo learningResultRecordInfo, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; 192 193 /** 194 * Retrieves a result source for a given identifier 195 * 196 * @param resultSourceId result source id 197 * @param context Context information containing the principalId 198 * and locale information about the caller of service 199 * operation 200 * @return learning result record information 201 * @throws DoesNotExistException result source not found 202 * @throws InvalidParameterException invalid resultSourceId 203 * @throws MissingParameterException resultSourceId not specified 204 * @throws OperationFailedException unable to complete request 205 * @throws PermissionDeniedException authorization failure 206 */ 207 public ResultSourceInfo getResultSource(@WebParam(name="resultSourceId")String resultSourceId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; 208 209 210 /** 211 * Retrieves a list of result sources for a list of Ids 212 * 213 * @param resultSourceIds result source Id list 214 * @param context Context information containing the principalId 215 * and locale information about the caller of service 216 * operation 217 * @return list of result sources 218 * @throws DoesNotExistException result source not found 219 * @throws InvalidParameterException invalid resultSourceIds 220 * @throws MissingParameterException resultSourceIds not specified 221 * @throws OperationFailedException unable to complete request 222 * @throws PermissionDeniedException authorization failure 223 */ 224 public List<ResultSourceInfo> getResultSourcesByIds(@WebParam(name="resultSourceIds")List <String> resultSourceIds, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; 225 226 /** 227 * Retrieves a list of result sources by type 228 * 229 * @param resultSourceTypeKey result source type key 230 * @param context Context information containing the principalId 231 * and locale information about the caller of service 232 * operation 233 * @return list of result sources 234 * @throws DoesNotExistException result source not found 235 * @throws InvalidParameterException invalid resultSourceTypeKey 236 * @throws MissingParameterException resultSourceTypeKey not specified 237 * @throws OperationFailedException unable to complete request 238 * @throws PermissionDeniedException authorization failure 239 */ 240 public List<ResultSourceInfo> getResultSourcesByType(@WebParam(name="resultSourceTypeKey")String resultSourceTypeKey, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; 241 242 243 /** 244 * Create a new result source 245 * @param learningResultRecordId learning result record identifier 246 * @param sourceInfo source information 247 * @param context Context information containing the principalId 248 * and locale information about the caller of service 249 * operation 250 * @throws AlreadyExistsException the result source being created already exists 251 * @throws DataValidationErrorException One or more values invalid for this operation 252 * @throws InvalidParameterException One or more parameters invalid 253 * @throws MissingParameterException One or more parameters missing 254 * @throws OperationFailedException unable to complete request 255 * @throws PermissionDeniedException authorization failure 256 */ 257 public ResultSourceInfo createResultSource(@WebParam(name="resultSourceInfo")ResultSourceInfo sourceInfo, @WebParam(name = "context") ContextInfo context) throws AlreadyExistsException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; 258 259 /** 260 * Updates a result source 261 * @param resultSourceId source identifier 262 * @param resultSourceInfo source information 263 * @param context Context information containing the principalId 264 * and locale information about the caller of service 265 * operation 266 * @return updated result source information 267 * @throws DataValidationErrorException One or more values invalid for this operation 268 * @throws DoesNotExistException result source not found 269 * @throws InvalidParameterException invalid resultSourceId or resultSourceInfo 270 * @throws MissingParameterException resultSourceId or resultSourceInfo not specified 271 * @throws OperationFailedException unable to complete request 272 * @throws PermissionDeniedException authorization failure 273 * @throws VersionMismatchException The action was attempted on an out of date version 274 */ 275 public ResultSourceInfo updateResultSource(@WebParam(name="resultSourceId")String resultSourceId, @WebParam(name="resultSourceInfo")ResultSourceInfo resultSourceInfo, @WebParam(name = "context") ContextInfo context) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException; 276 277 /** 278 * Delete a result source. The result source should not be deleteable if it is still being referenced by any LRR 279 * @param sourceId source information identifier 280 * @param context Context information containing the principalId 281 * and locale information about the caller of service 282 * operation 283 * @return status 284 * @throws DoesNotExistException the result source does not exist 285 * @throws InvalidParameterException One or more parameters invalid 286 * @throws MissingParameterException One or more parameters missing 287 * @throws OperationFailedException unable to complete request 288 * @throws PermissionDeniedException authorization failure 289 */ 290 public StatusInfo deleteResultSource(@WebParam(name="deleteResultSourceId")String resultSourceId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; 291 292 /** 293 * Validates a result source 294 * @param validationType identifier of the extent of validation 295 * @param resultSourceInfo result source information to be tested. 296 * @param context Context information containing the principalId 297 * and locale information about the caller of service 298 * operation 299 * @return results from performing the validation 300 * @throws DoesNotExistException validationTypeKey not found 301 * @throws InvalidParameterException invalid validationTypeKey, resultSourceInfo 302 * @throws MissingParameterException missing validationTypeKey, resultSourceInfo 303 * @throws OperationFailedException unable to complete request 304 */ 305 public List<ValidationResultInfo> validateResultSource(@WebParam(name="validationType")String validationType, @WebParam(name="resultSourceInfo")ResultSourceInfo resultSourceInfo, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; 306 307 }