| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| LuiServiceInfc |
|
| 1.0;1 |
| 1 | /* | |
| 2 | * Copyright 2011 The Kuali Foundation | |
| 3 | * | |
| 4 | * Licensed under the Educational Community License, Version 2.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.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 implied. | |
| 13 | * See the License for the specific language governing permissions and | |
| 14 | * limitations under the License. | |
| 15 | */ | |
| 16 | package org.kuali.student.enrollment.lui.infc; | |
| 17 | ||
| 18 | import org.kuali.student.common.infc.StatusInfc; | |
| 19 | import org.kuali.student.common.infc.ValidationResultInfc; | |
| 20 | import org.kuali.student.core.exceptions.*; | |
| 21 | ||
| 22 | import java.util.List; | |
| 23 | import org.kuali.student.common.infc.ContextInfc; | |
| 24 | ||
| 25 | public interface LuiServiceInfc { | |
| 26 | ||
| 27 | /** | |
| 28 | * Retrieves information about a LUI. | |
| 29 | * | |
| 30 | * @param luiId - String - identifier of the LUI | |
| 31 | * @return information about a LUI | |
| 32 | */ | |
| 33 | public LuiInfc getLui(String luiId, ContextInfc context) | |
| 34 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; | |
| 35 | ||
| 36 | /** | |
| 37 | * Retrieves information about LUIs from a list of Ids. | |
| 38 | * | |
| 39 | * @param luiIdList - StringList - List of LUI identifiers | |
| 40 | * @return information about a list of LUIs | |
| 41 | */ | |
| 42 | public List<LuiInfc> getLuisByIdList(List<String> luiIdList, ContextInfc context) | |
| 43 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; | |
| 44 | ||
| 45 | /** | |
| 46 | * Retrieves the list of LUIs for the specified CLU and period. | |
| 47 | * | |
| 48 | * @param cluId - String - identifier of the CLU | |
| 49 | * @param atpKey - String - identifier for the academic time period | |
| 50 | * @return list of LUI information | |
| 51 | */ | |
| 52 | public List<LuiInfc> getLuisInAtpByCluId(String cluId, String atpKey, ContextInfc context) | |
| 53 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; | |
| 54 | ||
| 55 | /** | |
| 56 | * Retrieves the list of LUI ids for the specified CLU. | |
| 57 | * | |
| 58 | * @param cluId - String - identifier of the CLU | |
| 59 | * @return list of LUI identifiers | |
| 60 | */ | |
| 61 | public List<String> getLuiIdsByCluId(String cluId, ContextInfc context) | |
| 62 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; | |
| 63 | ||
| 64 | /** | |
| 65 | * Retrieves the list of LUI ids for the specified CLU and Time period. | |
| 66 | * | |
| 67 | * @param cluId - String - identifier of the CLU | |
| 68 | * @param atpKey - String - identifier for the academic time period | |
| 69 | * @return list of LUI identifiers | |
| 70 | */ | |
| 71 | public List<String> getLuiIdsInAtpByCluId(String cluId, String atpKey, ContextInfc context) | |
| 72 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; | |
| 73 | ||
| 74 | /** | |
| 75 | * Retrieves the list of allowed relation types between the | |
| 76 | * specified LUIs. | |
| 77 | * | |
| 78 | * @param luiId - String - identifier of the first LUI | |
| 79 | * @param relatedLuiId - String - identifier of the second LUI | |
| 80 | * @return list of LU to LU relation types | |
| 81 | */ | |
| 82 | public List<String> getAllowedLuiLuiRelationTypesByLuiId(String luiId, String relatedLuiId, ContextInfc context) | |
| 83 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; | |
| 84 | ||
| 85 | /** | |
| 86 | * Retrieves the list of LUI information for the LUIs related | |
| 87 | * the specified LUI Id with a certain LU to LU relation | |
| 88 | * (getRelatedLuisByLuiId from the other direction) | |
| 89 | * | |
| 90 | * @param relatedLuiId - String - identifier of the LUI | |
| 91 | * @param luLuRelationType - String - the LU to LU relation type | |
| 92 | * @return list of LUI information | |
| 93 | */ | |
| 94 | public List<LuiInfc> getLuisByRelation(String relatedLuiId, String luLuRelationType, ContextInfc context) | |
| 95 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; | |
| 96 | ||
| 97 | /** | |
| 98 | * Retrieves the list of LUI Ids for the specified related LUI | |
| 99 | * and LU to LU relation type (getRelatedLuiIdsByLuiId from | |
| 100 | * other direction). | |
| 101 | * | |
| 102 | * @param relatedLuiId - String - identifier of the LUI | |
| 103 | * @param luLuRelationType - String - the LU to LU relation type | |
| 104 | * @return list of LUI identifiers | |
| 105 | */ | |
| 106 | public List<String> getLuiIdsByRelation(String relatedLuiId, String luLuRelationType, ContextInfc context) | |
| 107 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; | |
| 108 | ||
| 109 | /** | |
| 110 | * Retrieves the list of related LUI information for the | |
| 111 | * LUI Id and LU to LU relation type (getLuisByRelation from | |
| 112 | * other direction). | |
| 113 | * | |
| 114 | * @param luiId - String - identifier of the LUI | |
| 115 | * @param luLuRelationType - String - the LU to LU relation type | |
| 116 | * @return list of LUI information | |
| 117 | */ | |
| 118 | public List<LuiInfc> getRelatedLuisByLuiId(String luiId, String luLuRelationType, ContextInfc context) | |
| 119 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; | |
| 120 | ||
| 121 | /** | |
| 122 | * Retrieves the list of related LUI Ids for the specified LUI | |
| 123 | * and LU to LU relation type. (getLuiIdsByRelation from the | |
| 124 | * direction). | |
| 125 | * | |
| 126 | * @param luiId - String - identifier of the LUI | |
| 127 | * @param luLuRelationType - String - the LU to LU relation type | |
| 128 | * @return list of LUI identifiers | |
| 129 | */ | |
| 130 | public List<String> getRelatedLuiIdsByLuiId(String luiId, String luLuRelationType, ContextInfc context) | |
| 131 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; | |
| 132 | ||
| 133 | /** | |
| 134 | * Retrieves the relationship information between LUIs given | |
| 135 | * specific relation instance. | |
| 136 | * | |
| 137 | * @param luiLuiRelationId - String - identifier of LUI to LUI relation | |
| 138 | * @return information on the relation between two LUIs | |
| 139 | */ | |
| 140 | public LuiLuiRelationInfc getLuiLuiRelation(String luiLuiRelationId, ContextInfc context) | |
| 141 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; | |
| 142 | ||
| 143 | /** | |
| 144 | * Retrieves the list of relationship information for | |
| 145 | * specified LUI. | |
| 146 | * | |
| 147 | * @param luiId - String - identifier of the LUI | |
| 148 | * @return list of LUI to LUI relation information | |
| 149 | */ | |
| 150 | public List<LuiLuiRelationInfc> getLuiLuiRelationsByLui(String luiId, ContextInfc context) | |
| 151 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; | |
| 152 | ||
| 153 | /** | |
| 154 | * Validates a LUI. Depending on the value of validationType, | |
| 155 | * validation could be limited to tests on just the current | |
| 156 | * and its directly contained sub-objects or expanded to | |
| 157 | * all tests related to this object. If an identifier is | |
| 158 | * for the LUI (and/or one of its contained sub-objects) and | |
| 159 | * record is found for that identifier, the validation checks | |
| 160 | * the LUI can be shifted to the new values. If an identifier | |
| 161 | * not present or a record cannot be found for the identifier, | |
| 162 | * is assumed that the record does not exist and as such, | |
| 163 | * checks performed will be much shallower, typically | |
| 164 | * those performed by setting the validationType to the | |
| 165 | * object. | |
| 166 | * | |
| 167 | * @param validationType - String - identifier of the extent of validation | |
| 168 | * @param luiInfo - LuiInfo - LUI information to be tested. | |
| 169 | * @return results from performing the validation | |
| 170 | */ | |
| 171 | public List<ValidationResultInfc> validateLui(String validationType, LuiInfc luiInfo, ContextInfc context) | |
| 172 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; | |
| 173 | ||
| 174 | /** | |
| 175 | * Creates a new LUI. | |
| 176 | * | |
| 177 | * @param cluId - String - identifier of the CLU for the LUI being created | |
| 178 | * @param atpKey - String - identifier of the academic time period for the LUI | |
| 179 | * being created | |
| 180 | * @param luiInfo - LuiInfo - information about the LUI being created | |
| 181 | * @return the created LUI information | |
| 182 | */ | |
| 183 | public LuiInfc createLui(String cluId, String atpKey, LuiInfc luiInfo, ContextInfc context) | |
| 184 | throws AlreadyExistsException, DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 185 | ||
| 186 | /** | |
| 187 | * Updates an existing LUI. | |
| 188 | * | |
| 189 | * @param luiId - String - identifier for the LUI to be updated | |
| 190 | * @param luiInfo - LuiInfo - updated information about the LUI | |
| 191 | * @return the updated LUI information | |
| 192 | */ | |
| 193 | public LuiInfc updateLui(String luiId, LuiInfc luiInfo, ContextInfc context) | |
| 194 | throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException; | |
| 195 | ||
| 196 | /** | |
| 197 | * Deletes a LUI record. | |
| 198 | * | |
| 199 | * @param luiId - String - identifier for the LUI to be deleted | |
| 200 | * @return status of the operation | |
| 201 | */ | |
| 202 | public StatusInfc deleteLui(String luiId, ContextInfc context) | |
| 203 | throws DependentObjectsExistException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 204 | ||
| 205 | /** | |
| 206 | * Updates the state of the LUI. | |
| 207 | * | |
| 208 | * @param luiId - String - identifier for the LUI to be updated | |
| 209 | * @param luState - String - New state for LUI. Value is expected to be constrained | |
| 210 | * to those in | |
| 211 | * the luState enumeration. | |
| 212 | * @return the updated LUI information | |
| 213 | */ | |
| 214 | public LuiInfc updateLuiState(String luiId, String luState, ContextInfc context) | |
| 215 | throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 216 | ||
| 217 | /** | |
| 218 | * Validates a relationship between LUIs. Depending on the | |
| 219 | * of validationType, this validation could be limited to tests | |
| 220 | * just the current object and its directly contained sub- | |
| 221 | * or expanded to perform all tests related to this object. If | |
| 222 | * identifier is present for the relationship (and/or one of | |
| 223 | * contained sub-objects) and a record is found for | |
| 224 | * identifier, the validation checks if the relationship can | |
| 225 | * shifted to the new values. If an identifier is not present or | |
| 226 | * record cannot be found for the identifier, it is assumed | |
| 227 | * the record does not exist and as such, the checks | |
| 228 | * will be much shallower, typically mimicking those performed | |
| 229 | * setting the validationType to the current object. | |
| 230 | * | |
| 231 | * @param validationType - String - identifier of the extent of validation | |
| 232 | * @param luiLuiRelationInfo - LuiLuiRelationInfo - LUI to LUI relationship | |
| 233 | * information to be tested. | |
| 234 | * @return results from performing the validation | |
| 235 | */ | |
| 236 | public List<ValidationResultInfc> validateLuiLuiRelation(String validationType, LuiLuiRelationInfc luiLuiRelationInfo, ContextInfc context) | |
| 237 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; | |
| 238 | ||
| 239 | /** | |
| 240 | * Create a relationship between two LUIs. | |
| 241 | * | |
| 242 | * @param luiId - String - identifier of the first LUI in the relationship | |
| 243 | * @param relatedLuiId - String - identifier of the second LUI in the relationship | |
| 244 | * to be related to | |
| 245 | * @param luLuRelationType - String - the LU to LU relationship type of the | |
| 246 | * relationship | |
| 247 | * @param luiLuiRelationInfo - LuiLuiRelationInfo - information about the | |
| 248 | * relationship between the two LUIs | |
| 249 | * @return the created LUI to LUI relation information | |
| 250 | */ | |
| 251 | public LuiLuiRelationInfc createLuiLuiRelation(String luiId, | |
| 252 | String relatedLuiId, | |
| 253 | String luLuRelationType, | |
| 254 | LuiLuiRelationInfc luiLuiRelationInfo, | |
| 255 | ContextInfc context) | |
| 256 | throws AlreadyExistsException, CircularRelationshipException, DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 257 | ||
| 258 | /** | |
| 259 | * Updates a relationship between two LUIs. | |
| 260 | * | |
| 261 | * @param luiLuiRelationId - String - identifier of the LUI to LUI relation to | |
| 262 | * update | |
| 263 | * @param luiLuiRelationInfo - LuiLuiRelationInfo - changed information about the | |
| 264 | * relationship between the two LUIs | |
| 265 | * @return the update LUI to LUI relation information | |
| 266 | */ | |
| 267 | public LuiLuiRelationInfc updateLuiLuiRelation(String luiLuiRelationId, LuiLuiRelationInfc luiLuiRelationInfo, ContextInfc context) | |
| 268 | throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException; | |
| 269 | ||
| 270 | /** | |
| 271 | * Deletes a relationship between two LUIs. | |
| 272 | * | |
| 273 | * @param luiLuiRelationId - String - identifier of the LUI to LUI relation to | |
| 274 | * delete | |
| 275 | * @return status of the operation (success or failure) | |
| 276 | */ | |
| 277 | public StatusInfc deleteLuiLuiRelation(String luiLuiRelationId, ContextInfc context) | |
| 278 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
| 279 | } | |
| 280 |