1 /** 2 * Copyright 2014 The Kuali Foundation 3 * 4 * Licensed under the Educational Community License, Version 2.0 (the 5 * "License"); you may not use this file except in compliance with the 6 * License. You may obtain a copy of the License at 7 * 8 * http://www.osedu.org/licenses/ECL-2.0 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 13 * implied. See the License for the specific language governing 14 * permissions and limitations under the License. 15 */ 16 package org.kuali.student.enrollment.courseseatcount.service; 17 18 import org.kuali.rice.core.api.criteria.QueryByCriteria; 19 import org.kuali.student.enrollment.courseseatcount.dto.CourseSeatCountInfo; 20 import org.kuali.student.r2.common.dto.ContextInfo; 21 import org.kuali.student.r2.common.dto.StatusInfo; 22 import org.kuali.student.r2.common.dto.ValidationResultInfo; 23 import org.kuali.student.r2.common.exceptions.DataValidationErrorException; 24 import org.kuali.student.r2.common.exceptions.DoesNotExistException; 25 import org.kuali.student.r2.common.exceptions.InvalidParameterException; 26 import org.kuali.student.r2.common.exceptions.MissingParameterException; 27 import org.kuali.student.r2.common.exceptions.OperationFailedException; 28 import org.kuali.student.r2.common.exceptions.PermissionDeniedException; 29 import org.kuali.student.r2.common.exceptions.ReadOnlyException; 30 import org.kuali.student.r2.common.exceptions.VersionMismatchException; 31 32 import javax.jws.WebParam; 33 import javax.jws.WebService; 34 import javax.jws.soap.SOAPBinding; 35 import java.util.List; 36 37 @WebService(name = "CourseSeatCountService", targetNamespace = CourseSeatCountServiceConstants.NAMESPACE) 38 @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) 39 public interface CourseSeatCountService { 40 /** 41 * Retrieves a Course Seat Count by ID 42 * 43 * @param courseSeatCountId the CourseSeatCount Id 44 * @param contextInfo Context information containing the principalId and locale information about the caller of service 45 * operation 46 * @return the Person 47 * @throws DoesNotExistException courseSeatCountId not found 48 * @throws InvalidParameterException invalid courseSeatCountId or contextInfo 49 * @throws MissingParameterException courseSeatCountId or contextInfo is missing or null 50 * @throws OperationFailedException unable to complete request 51 * @throws PermissionDeniedException an authorization failure occurred 52 */ 53 public CourseSeatCountInfo getCourseSeatCount( 54 55 @WebParam(name = "courseSeatCountId") String courseSeatCountId, 56 @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, 57 58 InvalidParameterException, 59 MissingParameterException, 60 OperationFailedException, 61 PermissionDeniedException; 62 63 /** 64 * Retrieves a list of courseSeatCounts by a list of CourseSeatCount IDs 65 * 66 * @param courseSeatCountIds a list of CourseSeatCount IDs 67 * @param contextInfo Context information containing the principalId and locale information about the caller of service 68 * operation 69 * @return a List of CourseSeatCounts 70 * @throws DoesNotExistException courseSeatCountId not found 71 * @throws InvalidParameterException invalid courseSeatCountId or contextInfo 72 * @throws MissingParameterException courseSeatCountId or contextInfo is missing or null 73 * @throws OperationFailedException unable to complete request 74 * @throws PermissionDeniedException an authorization failure occurred 75 */ 76 public List<CourseSeatCountInfo> getCourseSeatCountsByIds( 77 78 @WebParam(name = "courseSeatCountId") List<String> courseSeatCountIds, 79 @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, 80 81 InvalidParameterException, 82 MissingParameterException, 83 OperationFailedException, 84 PermissionDeniedException; 85 86 /** 87 * Gets the CourseSeatCount for a particular activity. 88 * 89 * @param activityOfferingId the identifier for the activityOffering that you want the seatcount. 90 * @param contextInfo Context information containing the principalId and locale information about the caller of service 91 * operation 92 * @return CourseSeatCount. 93 * @throws InvalidParameterException activityOfferingId or contextInfo is not valid 94 * @throws MissingParameterException activityOfferingId or contextInfo is missing or null 95 * @throws OperationFailedException unable to complete request 96 * @throws PermissionDeniedException an authorization failure occurred 97 */ 98 99 public CourseSeatCountInfo getCourseSeatCountByActivityOffering( 100 101 @WebParam(name = "activityOfferingId") String activityOfferingId, 102 @WebParam(name = "contextInfo") ContextInfo contextInfo) throws 103 104 InvalidParameterException, 105 MissingParameterException, 106 OperationFailedException, 107 PermissionDeniedException; 108 /** 109 * Gets the CourseSeatCount for a list of activitys. 110 * 111 * @param activityOfferingIds the identifier for the activityOfferings that you want the seatcounts. 112 * @param contextInfo Context information containing the principalId and locale information about the caller of service 113 * operation 114 * @return CourseSeatCounts. 115 * @throws InvalidParameterException activityOfferingId or contextInfo is not valid 116 * @throws MissingParameterException activityOfferingId or contextInfo is missing or null 117 * @throws OperationFailedException unable to complete request 118 * @throws PermissionDeniedException an authorization failure occurred 119 */ 120 public List<CourseSeatCountInfo> getSeatCountsByActivityOfferings( 121 122 @WebParam(name = "activityOfferingIds") List<String> activityOfferingIds, 123 @WebParam(name = "contextInfo") ContextInfo contextInfo) throws 124 125 InvalidParameterException, 126 MissingParameterException, 127 OperationFailedException, 128 PermissionDeniedException; 129 /** 130 * Retrieves a list of CourseSeatCount Ids by CourseSeatCount type. 131 * 132 * @param courseSeatCountTypeKey the personTypeKey to search by 133 * @param contextInfo Context information containing the principalId and locale information about the caller of service 134 * operation 135 * @return a List of CourseSeatCount IDs 136 * @throws DoesNotExistException courseSeatCountId not found 137 * @throws InvalidParameterException invalid courseSeatCountId or contextInfo 138 * @throws MissingParameterException courseSeatCountId or contextInfo is missing or null 139 * @throws OperationFailedException unable to complete request 140 * @throws PermissionDeniedException an authorization failure occurred 141 */ 142 public List<String> getCourseSeatCountIdsByType( 143 144 @WebParam(name = "courseSeatCountTypeKey") String courseSeatCountTypeKey, 145 @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, 146 147 InvalidParameterException, 148 MissingParameterException, 149 OperationFailedException, 150 PermissionDeniedException; 151 152 /** 153 * Searches for CourseSeatCount Ids based on the criteria and returns a list of CourseSeatCount identifiers which match the search criteria. 154 * 155 * @param criteria the search criteria 156 * @param contextInfo Context information containing the principalId and locale information about the caller of service 157 * operation 158 * @return a List of CourseSeatCount IDs 159 * @throws InvalidParameterException invalid criteria or contextInfo 160 * @throws MissingParameterException courseSeatCountId or contextInfo is missing or null 161 * @throws OperationFailedException unable to complete request 162 * @throws PermissionDeniedException an authorization failure occurred 163 */ 164 public List<String> searchForCourseSeatCountIds( 165 166 @WebParam(name = "criteria") QueryByCriteria criteria, 167 @WebParam(name = "contextInfo") ContextInfo contextInfo) throws 168 169 InvalidParameterException, 170 MissingParameterException, 171 OperationFailedException, 172 PermissionDeniedException; 173 174 /** 175 * Searches for courseSeatCounts based on the criteria and returns a list of courseSeatCounts which match the search criteria. 176 * 177 * @param criteria the search criteria 178 * @param contextInfo Context information containing the principalId and locale information about the caller of service 179 * operation 180 * @return a List of CourseSeatCount 181 * @throws InvalidParameterException invalid courseSeatCountId or contextInfo 182 * @throws MissingParameterException courseSeatCountId or contextInfo is missing or null 183 * @throws OperationFailedException unable to complete request 184 * @throws PermissionDeniedException an authorization failure occurred 185 */ 186 public List<CourseSeatCountInfo> searchForCourseSeatCounts( 187 188 @WebParam(name = "criteria") QueryByCriteria criteria, 189 @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, 190 191 InvalidParameterException, 192 MissingParameterException, 193 OperationFailedException, 194 PermissionDeniedException; 195 196 /** 197 * Validates a CourseSeatCount. If an identifier is present for the CourseSeatCount and a record is found for that identifier, the validation 198 * checks if the CourseSeatCount can be updated to the new values. If an identifier is not present or a record does not exist, the 199 * validation checks if the CourseSeatCount with the given data can be created. 200 * 201 * @param validationTypeKey the identifier for the validation Type 202 * @param courseSeatCountTypeKey the identifier for the person type key to be validated 203 * @param courseSeatCountInfo the courseSeatCount to be validated 204 * @param contextInfo Context information containing the principalId and locale information about the caller of service 205 * operation 206 * @return a list of validation results or an empty list if validation succeeded 207 * @throws DoesNotExistException validationTypeKey or courseSeatCountTypeKey is not found 208 * @throws InvalidParameterException courseSeatCountInfo or contextInfo is not valid 209 * @throws MissingParameterException validationTypeKey, courseSeatCountTypeKey, courseSeatCountInfo, or contextInfo is missing or null 210 * @throws OperationFailedException unable to complete request 211 * @throws PermissionDeniedException an authorization failure occurred 212 */ 213 public List<ValidationResultInfo> validateCourseSeatCount( 214 215 @WebParam(name = "validationTypeKey") String validationTypeKey, 216 @WebParam(name = "courseSeatCountTypeKey") String courseSeatCountTypeKey, 217 @WebParam(name = "courseSeatCountInfo") CourseSeatCountInfo courseSeatCountInfo, 218 @WebParam(name = "contextInfo") ContextInfo contextInfo) throws 219 220 DoesNotExistException, 221 InvalidParameterException, 222 MissingParameterException, 223 OperationFailedException, 224 PermissionDeniedException; 225 226 /** 227 * Creates a new CourseSeatCount. The CourseSeatCount Id, Type, and Meta information may not be set in the supplied data. 228 * 229 * @param courseSeatCountTypeKey the identifier for the person type to be validated 230 * @param courseSeatCountInfo the courseSeatCount to be validated 231 * @param contextInfo Context information containing the principalId and locale information about the caller of service 232 * operation 233 * @return the new CourseSeatCount 234 * @throws DataValidationErrorException supplied data is invalid 235 * @throws DoesNotExistException personTypeKey does not exist or is not supported 236 * @throws InvalidParameterException personInfo or contextInfo is not valid 237 * @throws MissingParameterException personTypeKey, personInfo, or contextInfo is missing or null 238 * @throws OperationFailedException unable to complete request 239 * @throws PermissionDeniedException an authorization failure occurred 240 * @throws ReadOnlyException an attempt at supplying information designated as read only 241 */ 242 public CourseSeatCountInfo createCourseSeatCount( 243 244 @WebParam(name = "courseSeatCountTypeKey") String courseSeatCountTypeKey, 245 @WebParam(name = "courseSeatCountInfo")CourseSeatCountInfo courseSeatCountInfo, 246 @WebParam(name = "contextInfo") ContextInfo contextInfo) throws 247 248 DataValidationErrorException, 249 DoesNotExistException, 250 InvalidParameterException, 251 MissingParameterException, 252 OperationFailedException, 253 PermissionDeniedException, 254 ReadOnlyException; 255 256 /** 257 * Updates an existing CourseSeatCount. The CourseSeatCount Id, Type, and Meta information may not be changed. 258 * 259 * @param courseSeatCountId the identifier for the CourseSeatCount to be updated 260 * @param courseSeatCountInfo the courseSeatCount to be validated 261 * @param contextInfo Context information containing the principalId and locale information about the caller of service 262 * operation 263 * @return the updated CourseSeatCount 264 * @throws DataValidationErrorException supplied data is invalid 265 * @throws DoesNotExistException courseSeatCountId is not found 266 * @throws InvalidParameterException courseSeatCountId, courseSeatCountInfo or contextInfo is not valid 267 * @throws MissingParameterException courseSeatCountId, courseSeatCountInfo, or contextInfo is missing or null 268 * @throws OperationFailedException unable to complete request 269 * @throws PermissionDeniedException an authorization failure occurred 270 * @throws ReadOnlyException an attempt at supplying information designated as read only 271 * @throws VersionMismatchException if someone else has updated this courseSeatCount record since you fetched the version you are 272 * updating. 273 */ 274 public CourseSeatCountInfo updateCourseSeatCount( 275 276 @WebParam(name = "courseSeatCountId") String courseSeatCountId, 277 @WebParam(name = "courseSeatCountInfo") CourseSeatCountInfo courseSeatCountInfo, 278 @WebParam(name = "contextInfo") ContextInfo contextInfo) throws 279 280 DataValidationErrorException, 281 DoesNotExistException, 282 InvalidParameterException, 283 MissingParameterException, 284 OperationFailedException, 285 PermissionDeniedException, 286 ReadOnlyException, 287 VersionMismatchException; 288 289 /** 290 * Deletes an existing CourseSeatCount and all it's related parts 291 * 292 * @param courseSeatCountId the identifier for the courseSeatCount to be deleted 293 * @param contextInfo Context information containing the principalId and locale information about the caller of service 294 * operation 295 * @return the status of the delete operation. This must always be true. 296 * @throws DoesNotExistException courseSeatCountInfo is not found 297 * @throws InvalidParameterException courseSeatCountInfo or contextInfo is not valid 298 * @throws MissingParameterException courseSeatCountInfo or contextInfo is missing or null 299 * @throws OperationFailedException unable to complete request 300 * @throws PermissionDeniedException an authorization failure occurred 301 */ 302 public StatusInfo deleteCourseSeatCount( 303 304 @WebParam(name = "courseSeatCountId") String courseSeatCountId, 305 @WebParam(name = "contextInfo") ContextInfo contextInfo) throws 306 307 DoesNotExistException, 308 InvalidParameterException, 309 MissingParameterException, 310 OperationFailedException, 311 PermissionDeniedException; 312 313 314 315 316 }