| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| PopulationService |
|
| 1.0;1 |
| 1 | /** | |
| 2 | * Copyright 2011 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 | ||
| 17 | package org.kuali.student.r2.core.population.service; | |
| 18 | ||
| 19 | import java.util.List; | |
| 20 | ||
| 21 | import javax.jws.WebParam; | |
| 22 | import javax.jws.WebService; | |
| 23 | import javax.jws.soap.SOAPBinding; | |
| 24 | ||
| 25 | import org.kuali.rice.core.api.criteria.QueryByCriteria; | |
| 26 | ||
| 27 | import org.kuali.student.r2.core.population.dto.PopulationInfo; | |
| 28 | import org.kuali.student.r2.core.population.dto.PopulationRuleInfo; | |
| 29 | ||
| 30 | import org.kuali.student.r2.common.dto.ContextInfo; | |
| 31 | import org.kuali.student.r2.common.dto.StatusInfo; | |
| 32 | import org.kuali.student.r2.common.dto.ValidationResultInfo; | |
| 33 | ||
| 34 | import org.kuali.student.r2.common.exceptions.DataValidationErrorException; | |
| 35 | import org.kuali.student.r2.common.exceptions.DoesNotExistException; | |
| 36 | import org.kuali.student.r2.common.exceptions.InvalidParameterException; | |
| 37 | import org.kuali.student.r2.common.exceptions.MissingParameterException; | |
| 38 | import org.kuali.student.r2.common.exceptions.OperationFailedException; | |
| 39 | import org.kuali.student.r2.common.exceptions.PermissionDeniedException; | |
| 40 | import org.kuali.student.r2.common.exceptions.ReadOnlyException; | |
| 41 | import org.kuali.student.r2.common.exceptions.VersionMismatchException; | |
| 42 | ||
| 43 | import org.kuali.student.r2.common.util.constants.PopulationServiceConstants; | |
| 44 | ||
| 45 | /** | |
| 46 | * Population Service Description and Assumptions. | |
| 47 | * | |
| 48 | * This service supports the management of people sets. | |
| 49 | * | |
| 50 | * Version: 1.0 (Dev) | |
| 51 | * | |
| 52 | * @Author tom | |
| 53 | * @Since Mon Nov 21 14:22:34 EDT 2011 | |
| 54 | */ | |
| 55 | ||
| 56 | @WebService(name = "PopulationService", serviceName = "PopulationService", portName = "PopulationService", targetNamespace = PopulationServiceConstants.NAMESPACE) | |
| 57 | @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) | |
| 58 | ||
| 59 | public interface PopulationService { | |
| 60 | ||
| 61 | /** | |
| 62 | * Tests if a Person is a member of a Population. | |
| 63 | * | |
| 64 | * @param personId a unique Id of a Person | |
| 65 | * @param populationKey a unique Id of a Population | |
| 66 | * @param contextInfo Context information containing the | |
| 67 | * principalId and locale information about the caller of | |
| 68 | * service operation | |
| 69 | * @return true if the person is a member of the Population, | |
| 70 | * false otherwise | |
| 71 | * @throws DoesNotExistException populationKey not found | |
| 72 | * @throws InvalidParameterException invalid personId, | |
| 73 | * populationKey, or contextInfo | |
| 74 | * @throws MissingParameterException missing personId, | |
| 75 | * populationKey, or contextInfo | |
| 76 | * @throws OperationFailedException unable to complete request | |
| 77 | * @throws PermissionDeniedException authorization failure | |
| 78 | */ | |
| 79 | public Boolean isMember(@WebParam(name = "personId") String personId, @WebParam(name = "populationKey") String populationKey, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 80 | ||
| 81 | /** | |
| 82 | * Gets a list of people Ids who qualify as a member of a | |
| 83 | * Population. This method is intended for auditing purposes in | |
| 84 | * setting up and testing Population rules. | |
| 85 | * | |
| 86 | * @param populationKey a unique Id of a Population | |
| 87 | * @param contextInfo Context information containing the | |
| 88 | * principalId and locale information about the caller of | |
| 89 | * service operation | |
| 90 | * @return a list of Person Ids | |
| 91 | * @throws DoesNotExistException populationKey not found | |
| 92 | * @throws InvalidParameterException invalid populationKey or | |
| 93 | * contextInfo | |
| 94 | * @throws MissingParameterException missing populationKey or | |
| 95 | * contextInfo | |
| 96 | * @throws OperationFailedException unable to complete request | |
| 97 | * @throws PermissionDeniedException authorization failure | |
| 98 | */ | |
| 99 | public List<String> getMembers(@WebParam(name = "populationKey") String populationKey, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 100 | ||
| 101 | /** | |
| 102 | * Retrieves a Population. | |
| 103 | * | |
| 104 | * @param populationKey a unique Id of a Population | |
| 105 | * @param contextInfo Context information containing the | |
| 106 | * principalId and locale information about the caller of | |
| 107 | * service operation | |
| 108 | * @return a Population | |
| 109 | * @throws DoesNotExistException populationKey not found | |
| 110 | * @throws InvalidParameterException invalid populationKey or contextInfo | |
| 111 | * @throws MissingParameterException missing populationKey or contextInfo | |
| 112 | * @throws OperationFailedException unable to complete request | |
| 113 | * @throws PermissionDeniedException authorization failure | |
| 114 | */ | |
| 115 | public PopulationInfo getPopulation(@WebParam(name = "populationKey") String populationKey, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 116 | ||
| 117 | /** | |
| 118 | * Retrieves a list of Populations corresponding to the given list | |
| 119 | * of Population Ids. | |
| 120 | * | |
| 121 | * @param populationKeys list of Populationss to be retrieved | |
| 122 | * @param contextInfo Context information containing the | |
| 123 | * principalId and locale information about the caller of | |
| 124 | * service operation | |
| 125 | * @return a list of Population Ids of the given type | |
| 126 | * @throws DoesNotExistException an populationKey in list not found | |
| 127 | * @throws InvalidParameterException invalid populationKey or contextInfo | |
| 128 | * @throws MissingParameterException missing populationKey or contextInfo | |
| 129 | * @throws OperationFailedException unable to complete request | |
| 130 | * @throws PermissionDeniedException authorization failure | |
| 131 | */ | |
| 132 | public List<PopulationInfo> getPopulationsByIds(@WebParam(name = "populationKeys") List<String> populationKeys, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 133 | ||
| 134 | /** | |
| 135 | * Retrieves a list of Population Ids of the specified type. | |
| 136 | * | |
| 137 | * @param populationTypeId a Population type to be retrieved | |
| 138 | * @param contextInfo Context information containing the | |
| 139 | * principalId and locale information about the caller of | |
| 140 | * service operation | |
| 141 | * @return a list of Population Ids | |
| 142 | * @throws InvalidParameterException invalid populationTypeId or | |
| 143 | * contextInfo | |
| 144 | * @throws MissingParameterException missing populationTypeId or | |
| 145 | * contextInfo | |
| 146 | * @throws OperationFailedException unable to complete request | |
| 147 | * @throws PermissionDeniedException authorization failure | |
| 148 | */ | |
| 149 | public List<String> getPopulationKeysByType(@WebParam(name = "populationTypeId") String populationTypeId, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 150 | ||
| 151 | /** | |
| 152 | * Retrieves a list of Populations in which the given | |
| 153 | * PopulationRule is applied. | |
| 154 | * | |
| 155 | * @param populationRuleId a PopulationRule Id | |
| 156 | * @param contextInfo Context information containing the | |
| 157 | * principalId and locale information about the caller of | |
| 158 | * service operation | |
| 159 | * @return a list of Populations | |
| 160 | * @throws InvalidParameterException invalid populationRuleId or | |
| 161 | * contextInfo | |
| 162 | * @throws MissingParameterException missing populationRuleId or | |
| 163 | * contextInfo | |
| 164 | * @throws OperationFailedException unable to complete request | |
| 165 | * @throws PermissionDeniedException authorization failure | |
| 166 | */ | |
| 167 | public List<PopulationInfo> getPopulationsForPopulationRule(@WebParam(name = "populationRuleId") String populationRuleId, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 168 | ||
| 169 | /** | |
| 170 | * Searches for Populations based on the criteria and returns a list | |
| 171 | * of Population identifiers which match the search criteria. | |
| 172 | * | |
| 173 | * @param criteria the search criteria | |
| 174 | * @param contextInfo Context information containing the | |
| 175 | * principalId and locale information about the caller of | |
| 176 | * service operation | |
| 177 | * @return list of Population Ids | |
| 178 | * @throws InvalidParameterException invalid criteria or contextInfo | |
| 179 | * @throws MissingParameterException missing criteria or contextInfo | |
| 180 | * @throws OperationFailedException unable to complete request | |
| 181 | * @throws PermissionDeniedException authorization failure | |
| 182 | */ | |
| 183 | public List<String> searchForPopulationKeys(@WebParam(name = "criteria") QueryByCriteria criteria, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 184 | ||
| 185 | /** | |
| 186 | * Searches for Populations based on the criteria and returns a list of | |
| 187 | * Populations which match the search criteria. | |
| 188 | * | |
| 189 | * @param criteria the search criteria | |
| 190 | * @param contextInfo Context information containing the | |
| 191 | * principalId and locale information about the caller of | |
| 192 | * service operation | |
| 193 | * @return list of Populations | |
| 194 | * @throws InvalidParameterException invalid criteria or contextInfo | |
| 195 | * @throws MissingParameterException missing criteria or contextInfo | |
| 196 | * @throws OperationFailedException unable to complete request | |
| 197 | * @throws PermissionDeniedException authorization failure | |
| 198 | */ | |
| 199 | public List<PopulationInfo> searchForPopulations(@WebParam(name = "criteria") QueryByCriteria criteria, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 200 | ||
| 201 | /** | |
| 202 | * Validates a Population. Depending on the value of validationType, | |
| 203 | * this validation could be limited to tests on just the current | |
| 204 | * object and its directly contained sub-objects or expanded to | |
| 205 | * perform all tests related to this object. If an identifier is | |
| 206 | * present for the Population and a record is found for that | |
| 207 | * identifier, the validation checks if the Population can be shifted | |
| 208 | * to the new values. If a record cannot be found for the | |
| 209 | * identifier, it is assumed that the record does not exist and as | |
| 210 | * such, the checks performed will be much shallower, typically | |
| 211 | * mimicking those performed by setting the validationType to the | |
| 212 | * current object. This is a slightly different pattern from the | |
| 213 | * standard validation as the caller provides the identifier in | |
| 214 | * the create statement instead of the server assigning an | |
| 215 | * identifier. | |
| 216 | * | |
| 217 | * @param validationTypeId the identifier of the extent of validation | |
| 218 | * @param populationInfo the Population information to be tested | |
| 219 | * @param contextInfo Context information containing the | |
| 220 | * principalId and locale information about the caller of | |
| 221 | * service operation | |
| 222 | * @return Results from performing the validation | |
| 223 | * @throws DoesNotExistException validationTypeId not found | |
| 224 | * @throws InvalidParameterException invalid validationTypeId, | |
| 225 | * populationInfo, or contextInfo | |
| 226 | * @throws MissingParameterException missing validationTypeKey, | |
| 227 | * populationInfo, or contextInfo | |
| 228 | * @throws OperationFailedException unable to complete request | |
| 229 | * @throws PermissionDeniedException authorization failure | |
| 230 | */ | |
| 231 | public List<ValidationResultInfo> validatePopulation(@WebParam(name = "validationTypeKey") String validationTypeKey, @WebParam(name = "populationInfo") PopulationInfo populationInfo, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 232 | ||
| 233 | /** | |
| 234 | * Creates a new Population. | |
| 235 | * | |
| 236 | * @param populationInfo the details of Population to be created | |
| 237 | * @param contextInfo Context information containing the | |
| 238 | * principalId and locale information about the caller of | |
| 239 | * service operation | |
| 240 | * @return the Population just created | |
| 241 | * @throws DataValidationErrorException one or more values invalid | |
| 242 | * for this operation | |
| 243 | * @throws InvalidParameterException invalid populationInfo or | |
| 244 | * contextInfo | |
| 245 | * @throws MissingParameterException missing populationInfo or | |
| 246 | * contextInfo | |
| 247 | * @throws OperationFailedException unable to complete request | |
| 248 | * @throws PermissionDeniedException authorization failure | |
| 249 | * @throws ReadOnlyException an attempt at supplying information | |
| 250 | * designated as read-only | |
| 251 | */ | |
| 252 | public PopulationInfo createPopulation(@WebParam(name = "populationInfo") PopulationInfo populationInfo, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException; | |
| 253 | ||
| 254 | /** | |
| 255 | * Updates an existing Population. | |
| 256 | * | |
| 257 | * @param populationKey the Id of Population to be updated | |
| 258 | * @param populationInfo the details of updates to Population being updated | |
| 259 | * @param contextInfo Context information containing the | |
| 260 | * principalId and locale information about the caller of | |
| 261 | * service operation | |
| 262 | * @return the details of Population just updated | |
| 263 | * @throws DataValidationErrorException One or more values invalid | |
| 264 | * for this operation | |
| 265 | * @throws DoesNotExistException populationKey not found | |
| 266 | * @throws InvalidParameterException invalid populationKey, | |
| 267 | * populationInfo, or contextInfo | |
| 268 | * @throws MissingParameterException missing populationKey, | |
| 269 | * populationInfo, or contextInfo | |
| 270 | * @throws OperationFailedException unable to complete request | |
| 271 | * @throws PermissionDeniedException authorization failure | |
| 272 | * @throws ReadOnlyException an attempt at supplying information | |
| 273 | * designated as read-only | |
| 274 | * @throws VersionMismatchException The action was attempted on an out | |
| 275 | * of date version. | |
| 276 | */ | |
| 277 | public PopulationInfo updatePopulation(@WebParam(name = "populationKey") String populationKey, @WebParam(name = "populationInfo") PopulationInfo populationInfo, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException, VersionMismatchException; | |
| 278 | ||
| 279 | /** | |
| 280 | * Deletes an existing Population. | |
| 281 | * | |
| 282 | * @param populationKey the Id of the Population to be deleted | |
| 283 | * @param contextInfo Context information containing the | |
| 284 | * principalId and locale information about the caller of | |
| 285 | * service operation | |
| 286 | * @return status of the operation (success, failed) | |
| 287 | * @throws DoesNotExistException populationKey not found | |
| 288 | * @throws InvalidParameterException invalid populationKey or contextInfo | |
| 289 | * @throws MissingParameterException missing populationKey or contextInfo | |
| 290 | * @throws OperationFailedException unable to complete request | |
| 291 | * @throws PermissionDeniedException authorization failure | |
| 292 | */ | |
| 293 | public StatusInfo deletePopulation(@WebParam(name = "populationKey") String populationKey, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 294 | ||
| 295 | /** | |
| 296 | * Retrieves a PopulationRule. | |
| 297 | * | |
| 298 | * @param populationRuleId a unique Id of a PopulationRule | |
| 299 | * @param contextInfo Context information containing the | |
| 300 | * principalId and locale information about the caller of | |
| 301 | * service operation | |
| 302 | * @return a PopulationRule | |
| 303 | * @throws DoesNotExistException populationRuleId not found | |
| 304 | * @throws InvalidParameterException invalid populationRuleId or | |
| 305 | * contextInfo | |
| 306 | * @throws MissingParameterException missing populationRuleId or | |
| 307 | * contextInfo | |
| 308 | * @throws OperationFailedException unable to complete request | |
| 309 | * @throws PermissionDeniedException authorization failure | |
| 310 | */ | |
| 311 | public PopulationRuleInfo getPopulationRule(@WebParam(name = "populationRuleId") String populationRuleId, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 312 | ||
| 313 | /** | |
| 314 | * Retrieves a list of PopulationRules corresponding to the | |
| 315 | * given list of PopulationRule Ids. | |
| 316 | * | |
| 317 | * @param populationRuleIds list of PopulationRules to be retrieved | |
| 318 | * @param contextInfo Context information containing the | |
| 319 | * principalId and locale information about the caller of | |
| 320 | * service operation | |
| 321 | * @return a list of PopulationRule Ids of the given type | |
| 322 | * @throws DoesNotExistException an populationRuleId in list not found | |
| 323 | * @throws InvalidParameterException invalid populationRuleId or | |
| 324 | * contextInfo | |
| 325 | * @throws MissingParameterException missing populationRuleId or | |
| 326 | * contextInfo | |
| 327 | * @throws OperationFailedException unable to complete request | |
| 328 | * @throws PermissionDeniedException authorization failure | |
| 329 | */ | |
| 330 | public List<PopulationRuleInfo> getPopulationRulesByIds(@WebParam(name = "populationRuleIds") List<String> populationRuleIds, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 331 | ||
| 332 | /** | |
| 333 | * Retrieves a list of PopulationRule Ids of the specified type. | |
| 334 | * | |
| 335 | * @param populationTypeKey a PopulationRule type to be retrieved | |
| 336 | * @param contextInfo Context information containing the | |
| 337 | * principalId and locale information about the caller of | |
| 338 | * service operation | |
| 339 | * @return a list of PopulationRule Ids | |
| 340 | * @throws InvalidParameterException invalid populationTypeKey or | |
| 341 | * contextInfo | |
| 342 | * @throws MissingParameterException missing populationTypeKey or | |
| 343 | * contextInfo | |
| 344 | * @throws OperationFailedException unable to complete request | |
| 345 | * @throws PermissionDeniedException authorization failure | |
| 346 | */ | |
| 347 | public List<String> getPopulationRuleIdsByType(@WebParam(name = "populationTypeKey") String populationTypeKey, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 348 | ||
| 349 | /** | |
| 350 | * Retrieves a list of PopulationRules in which the given | |
| 351 | * Population is related. | |
| 352 | * | |
| 353 | * @param populationid a Population id | |
| 354 | * @param contextInfo Context information containing the | |
| 355 | * principalId and locale information about the caller of | |
| 356 | * service operation | |
| 357 | * @return a PopulationRules | |
| 358 | * @throws DoesNotExistException populationKey is not found | |
| 359 | * @throws InvalidParameterException invalid populationid or contextInfo | |
| 360 | * @throws MissingParameterException missing populationKey or contextInfo | |
| 361 | * @throws OperationFailedException unable to complete request | |
| 362 | * @throws PermissionDeniedException authorization failure | |
| 363 | */ | |
| 364 | public PopulationRuleInfo getPopulationRuleForPopulation(@WebParam(name = "populationid") String populationKey, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 365 | ||
| 366 | /** | |
| 367 | * Searches for PopulationRules based on the criteria and | |
| 368 | * returns a list of PopulationRule identifiers which match the | |
| 369 | * search criteria. | |
| 370 | * | |
| 371 | * @param criteria the search criteria | |
| 372 | * @param contextInfo Context information containing the | |
| 373 | * principalId and locale information about the caller of | |
| 374 | * service operation | |
| 375 | * @return list of PopulationRule Ids | |
| 376 | * @throws InvalidParameterException invalid criteria or contextInfo | |
| 377 | * @throws MissingParameterException missing criteria or contextInfo | |
| 378 | * @throws OperationFailedException unable to complete request | |
| 379 | * @throws PermissionDeniedException authorization failure | |
| 380 | */ | |
| 381 | public List<String> searchForPopulationRuleIds(@WebParam(name = "criteria") QueryByCriteria criteria, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 382 | ||
| 383 | /** | |
| 384 | * Searches for PopulationRules based on the criteria and | |
| 385 | * returns a list of PopulationRules which match the search | |
| 386 | * criteria. | |
| 387 | * | |
| 388 | * @param criteria the search criteria | |
| 389 | * @param contextInfo Context information containing the | |
| 390 | * principalId and locale information about the caller of | |
| 391 | * service operation | |
| 392 | * @return list of PopulationRules | |
| 393 | * @throws InvalidParameterException invalid criteria or contextInfo | |
| 394 | * @throws MissingParameterException missing criteria or contextInfo | |
| 395 | * @throws OperationFailedException unable to complete request | |
| 396 | * @throws PermissionDeniedException authorization failure | |
| 397 | */ | |
| 398 | public List<PopulationRuleInfo> searchForPopulationRules(@WebParam(name = "criteria") QueryByCriteria criteria, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 399 | ||
| 400 | /** | |
| 401 | * Validates a PopulationRule. Depending on the value of | |
| 402 | * validationType, this validation could be limited to tests on | |
| 403 | * just the current object and its directly contained sub-objects | |
| 404 | * or expanded to perform all tests related to this object. If an | |
| 405 | * identifier is present for the PopulationRule and a record is | |
| 406 | * found for that identifier, the validation checks if the | |
| 407 | * PopulationRule can be shifted to the new values. If a record | |
| 408 | * cannot be found for the identifier, it is assumed that the | |
| 409 | * record does not exist and as such, the checks performed will be | |
| 410 | * much shallower, typically mimicking those performed by setting | |
| 411 | * the validationType to the current object. This is a slightly | |
| 412 | * different pattern from the standard validation as the caller | |
| 413 | * provides the identifier in the create statement instead of the | |
| 414 | * server assigning an identifier. | |
| 415 | * | |
| 416 | * @param validationTypeKey the identifier of the extent of validation | |
| 417 | * @param populationInfo the PopulationRule information to be tested | |
| 418 | * @param contextInfo Context information containing the | |
| 419 | * principalId and locale information about the caller of | |
| 420 | * service operation | |
| 421 | * @return Results from performing the validation | |
| 422 | * @throws DoesNotExistException validationTypeKey not found | |
| 423 | * @throws InvalidParameterException invalid validationTypeKey, | |
| 424 | * populationInfo, or contextInfo | |
| 425 | * @throws MissingParameterException missing validationTypeKey, | |
| 426 | * populationInfo, or contextInfo | |
| 427 | * @throws OperationFailedException unable to complete request | |
| 428 | * @throws PermissionDeniedException authorization failure | |
| 429 | */ | |
| 430 | public List<ValidationResultInfo> validatePopulationRule(@WebParam(name = "validationTypeKey") String validationTypeKey, @WebParam(name = "populationRuleInfo") PopulationRuleInfo populationInfo, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 431 | ||
| 432 | /** | |
| 433 | * Creates a new PopulationRule. | |
| 434 | * | |
| 435 | * @param populationRuleInfo the details of PopulationRule to be created | |
| 436 | * @param contextInfo Context information containing the | |
| 437 | * principalId and locale information about the caller of | |
| 438 | * service operation | |
| 439 | * @return the PopulationRule just created | |
| 440 | * @throws DataValidationErrorException one or more values invalid | |
| 441 | * for this operation | |
| 442 | * @throws InvalidParameterException invalid populationInfo or | |
| 443 | * contextInfo | |
| 444 | * @throws MissingParameterException missing populationInfo or | |
| 445 | * contextInfo | |
| 446 | * @throws OperationFailedException unable to complete request | |
| 447 | * @throws PermissionDeniedException authorization failure | |
| 448 | * @throws ReadOnlyException an attempt at supplying information | |
| 449 | * designated as read-only | |
| 450 | */ | |
| 451 | public PopulationRuleInfo createPopulationRule(@WebParam(name = "populationRuleInfo") PopulationRuleInfo populationRuleInfo, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException; | |
| 452 | ||
| 453 | /** | |
| 454 | * Updates an existing PopulationRule. | |
| 455 | * | |
| 456 | * @param populationRuleId the Id of PopulationRule to be updated | |
| 457 | * @param populationInfo the details of updates to PopulationRule | |
| 458 | * being updated | |
| 459 | * @param contextInfo Context information containing the | |
| 460 | * principalId and locale information about the caller of | |
| 461 | * service operation | |
| 462 | * @return the details of PopulationRule just updated | |
| 463 | * @throws DataValidationErrorException One or more values invalid | |
| 464 | * for this operation | |
| 465 | * @throws DoesNotExistException populationRuleId not found | |
| 466 | * @throws InvalidParameterException invalid populationRuleId, | |
| 467 | * populationInfo, or contextInfo | |
| 468 | * @throws MissingParameterException missing populationRuleId, | |
| 469 | * populationInfo, or contextInfo | |
| 470 | * @throws OperationFailedException unable to complete request | |
| 471 | * @throws PermissionDeniedException authorization failure | |
| 472 | * @throws ReadOnlyException an attempt at supplying information | |
| 473 | * designated as read-only | |
| 474 | * @throws VersionMismatchException The action was attempted on an out | |
| 475 | * of date version. | |
| 476 | */ | |
| 477 | public PopulationRuleInfo updatePopulationRule(@WebParam(name = "populationRuleId") String populationRuleId, @WebParam(name = "populationInfo") PopulationRuleInfo populationInfo, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException, VersionMismatchException; | |
| 478 | ||
| 479 | /** | |
| 480 | * Deletes an existing PopulationRule. | |
| 481 | * | |
| 482 | * @param populationRuleId the Id of the PopulationRule to be deleted | |
| 483 | * @param contextInfo Context information containing the | |
| 484 | * principalId and locale information about the caller of | |
| 485 | * service operation | |
| 486 | * @return status of the operation (success, failed) | |
| 487 | * @throws DoesNotExistException populationRuleId not found | |
| 488 | * @throws InvalidParameterException invalid populationRuleId or | |
| 489 | * contextInfo | |
| 490 | * @throws MissingParameterException missing populationRuleId or | |
| 491 | * contextInfo | |
| 492 | * @throws OperationFailedException unable to complete request | |
| 493 | * @throws PermissionDeniedException authorization failure | |
| 494 | */ | |
| 495 | public StatusInfo deletePopulationRule(@WebParam(name = "populationRuleId") String populationRuleId, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 496 | ||
| 497 | /** | |
| 498 | * Applies PopulationRule to a Population. If the Population | |
| 499 | * already has a rule, it is replaced with the specified one. | |
| 500 | * | |
| 501 | * @param populationRuleId a unique identifier for a PopulationRule | |
| 502 | * @param populationKey a unique identifier for a Population | |
| 503 | * @param contextInfo Context information containing the | |
| 504 | * principalId and locale information about the caller of | |
| 505 | * service operation | |
| 506 | * @return status | |
| 507 | * @throws DoesNotExistException populationKey or | |
| 508 | * populationRuleId not found | |
| 509 | * @throws InvalidParameterException invalid populationRuleId, | |
| 510 | * populationKey, or contextInfo | |
| 511 | * @throws MissingParameterException missing populationRuleId, | |
| 512 | * populationKey, or contextInfo | |
| 513 | * @throws OperationFailedException unable to complete request | |
| 514 | * @throws PermissionDeniedException authorization failure | |
| 515 | */ | |
| 516 | public StatusInfo applyPopulationRuleToPopulation(@WebParam(name = "populationRuleId") String populationRuleId, @WebParam(name = "populationKey") String populationKey, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 517 | ||
| 518 | /** | |
| 519 | * Removes Population from a PopulationRule. | |
| 520 | * | |
| 521 | * @param populationRuleId a unique identifier for a PopulationRule | |
| 522 | * @param populationKey a unique identifier for a Population | |
| 523 | * @param contextInfo Context information containing the | |
| 524 | * principalId and locale information about the caller of | |
| 525 | * service operation | |
| 526 | * @return status | |
| 527 | * @throws DoesNotExistException populationRuleId or | |
| 528 | * populationKey not found or unrelated | |
| 529 | * @throws InvalidParameterException invalid populationRuleId, | |
| 530 | * populationKey, or contextInfo | |
| 531 | * @throws MissingParameterException missing populationRuleId, | |
| 532 | * populationKey, or contextInfo | |
| 533 | * @throws OperationFailedException unable to complete request | |
| 534 | * @throws PermissionDeniedException authorization failure | |
| 535 | */ | |
| 536 | public StatusInfo removePopulationRuleFromPopulation(@WebParam(name = "populationRuleId") String populationRuleId, @WebParam(name = "populationKey") String populationKey, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 537 | } |