Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
LuiPersonRelationServiceInfc |
|
| 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.lpr.service; | |
17 | ||
18 | import org.kuali.student.common.infc.ContextInfc; | |
19 | import org.kuali.student.common.infc.StatusInfc; | |
20 | import org.kuali.student.common.infc.ValidationResultInfc; | |
21 | import org.kuali.student.core.exceptions.*; | |
22 | ||
23 | import java.util.List; | |
24 | import org.kuali.student.common.infc.CriteriaInfc; | |
25 | import org.kuali.student.enrollment.lpr.infc.LuiPersonRelationInfc; | |
26 | import org.kuali.student.enrollment.lpr.infc.LuiPersonRelationStateInfc; | |
27 | import org.kuali.student.enrollment.lpr.infc.LuiPersonRelationTypeInfc; | |
28 | ||
29 | public interface LuiPersonRelationServiceInfc { | |
30 | ||
31 | /** | |
32 | * Retrieves the list of LUIPersonRelation types | |
33 | * | |
34 | * @param context - ContextInfo - Context information containing the principalId | |
35 | * and locale information about the caller of service opperation | |
36 | * @return list of luiPersonRelationTypes | |
37 | */ | |
38 | public List<LuiPersonRelationTypeInfc> findLuiPersonRelationTypes(ContextInfc context) | |
39 | throws OperationFailedException; | |
40 | ||
41 | /** | |
42 | * Retrieves the list of LUI Person Relation States | |
43 | * | |
44 | * @param context - ContextInfo - Context information containing the principalId | |
45 | * and locale information about the caller of service opperation | |
46 | * @return list of relation states | |
47 | */ | |
48 | public List<LuiPersonRelationStateInfc> findLuiPersonRelationStates(ContextInfc context) | |
49 | throws OperationFailedException; | |
50 | ||
51 | /** | |
52 | * Retrieves the list of Allowed Relation States | |
53 | * | |
54 | * @param luiPersonRelationType - String - Type of LUI Person Relation | |
55 | * @param context - ContextInfo - Context information containing the principalId | |
56 | * and locale information about the caller of service opperation | |
57 | * @return list of relationState | |
58 | */ | |
59 | public List<LuiPersonRelationStateInfc> findAllowedRelationStates(String luiPersonRelationType, ContextInfc context) | |
60 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; | |
61 | ||
62 | /** | |
63 | * Retrieves the Relation for the specified LUI Person Relation | |
64 | * | |
65 | * @param luiPersonRelationId - String - Identifier for the LUI Person Relation | |
66 | * @param context - ContextInfo - Context information containing the principalId | |
67 | * and locale information about the caller of service opperation | |
68 | * @return LUI Person Relation information | |
69 | */ | |
70 | public LuiPersonRelationInfc fetchLUIPersonRelation(String luiPersonRelationId, ContextInfc context) | |
71 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
72 | ||
73 | /** | |
74 | * Retrieves the Relation for the specified list of LUI Person Relation Ids | |
75 | * | |
76 | * @param luiPersonRelationIdList - StringList - List of identifiers for LUI Person | |
77 | * Relations | |
78 | * @param context - ContextInfo - Context information containing the principalId | |
79 | * and locale information about the caller of service opperation | |
80 | * @return List of LUI Person Relation information | |
81 | */ | |
82 | public List<LuiPersonRelationInfc> findLuiPersonRelationsByIdList(List<String> luiPersonRelationIdList, ContextInfc context) | |
83 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
84 | ||
85 | /** | |
86 | * Retrieves the LUI Ids for Person related to LUI | |
87 | * | |
88 | * @param personId - String - Identifier for the LUI Person Relation | |
89 | * @param luiPersonRelationType - String - Type of LUI Person Relation | |
90 | * @param relationState - String - Relation State | |
91 | * @param context - ContextInfo - Context information containing the principalId | |
92 | * and locale information about the caller of service opperation | |
93 | * @return Simple list of LUI Ids | |
94 | */ | |
95 | public List<String> findLuiIdsRelatedToPerson(String personId, String luiPersonRelationType, String relationState, ContextInfc context) | |
96 | throws DoesNotExistException, DisabledIdentifierException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
97 | ||
98 | /** | |
99 | * Retrieves Person Ids related to the specified LUI | |
100 | * | |
101 | * @param luiId - String - Identifier for the LUI | |
102 | * @param luiPersonRelationType - String - Type of LUI Person Relation | |
103 | * @param relationState - String - Relation State | |
104 | * @param context - ContextInfo - Context information containing the principalId | |
105 | * and locale information about the caller of service opperation | |
106 | * @return Simple list of Person Ids | |
107 | */ | |
108 | public List<String> findPersonIdsRelatedToLui(String luiId, String luiPersonRelationType, String relationState, ContextInfc context) | |
109 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
110 | ||
111 | /** | |
112 | * Retrieves Person Relation Types for LUI | |
113 | * | |
114 | * @param personId - String - Identifier for person | |
115 | * @param luiId - String - Identifier for LUI | |
116 | * @param relationState - String - Relation State | |
117 | * @param context - ContextInfo - Context information containing the principalId | |
118 | * and locale information about the caller of service opperation | |
119 | * @return Simple list of LUI Person Relation Types | |
120 | */ | |
121 | @Deprecated | |
122 | public List<LuiPersonRelationTypeInfc> findLuiPersonRelationTypesForLuiPersonRelation(String personId, String luiId, String relationState, ContextInfc context) | |
123 | throws DoesNotExistException, DisabledIdentifierException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
124 | ||
125 | /** | |
126 | * Retrieves Person Relation for LUI | |
127 | * | |
128 | * @param personId - String - Identifier for person | |
129 | * @param luiId - String - Identifier for LUI | |
130 | * @param context - ContextInfo - Context information containing the principalId | |
131 | * and locale information about the caller of service opperation | |
132 | * @return List of LUI Person Relation info | |
133 | */ | |
134 | public List<LuiPersonRelationInfc> findLuiPersonRelations(String personId, String luiId, ContextInfc context) | |
135 | throws DoesNotExistException, DisabledIdentifierException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
136 | ||
137 | /** | |
138 | * Retrieves LUI Person Relation Ids | |
139 | * | |
140 | * @param personId - String - Identifier for person | |
141 | * @param luiId - String - Identifier for LUI | |
142 | * @param context - ContextInfo - Context information containing the principalId | |
143 | * and locale information about the caller of service opperation | |
144 | * @return List of LUI Person Relation display info | |
145 | */ | |
146 | public List<String> findLuiPersonRelationIds(String personId, String luiId, ContextInfc context) | |
147 | throws DoesNotExistException, DisabledIdentifierException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
148 | ||
149 | /** | |
150 | * Retrieves LUI Person Relation for Person | |
151 | * | |
152 | * @param personId - String - Identifier for person | |
153 | * @param context - ContextInfo - Context information containing the principalId | |
154 | * and locale information about the caller of service opperation | |
155 | * @return List of LUI Person Relation info | |
156 | */ | |
157 | public List<LuiPersonRelationInfc> findLuiPersonRelationsForPerson(String personId, ContextInfc context) | |
158 | throws DoesNotExistException, DisabledIdentifierException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
159 | ||
160 | /** | |
161 | * Retrieves LUI Person Relation Ids for Person | |
162 | * | |
163 | * @param personId - String - Identifier for person | |
164 | * @param context - ContextInfo - Context information containing the principalId | |
165 | * and locale information about the caller of service opperation | |
166 | * @return Simple list of person relation identifiers | |
167 | */ | |
168 | public List<String> findLuiPersonRelationIdsForPerson(String personId, ContextInfc context) | |
169 | throws DoesNotExistException, DisabledIdentifierException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
170 | ||
171 | /** | |
172 | * Retrieves LUI Person Relation for a specified LUI | |
173 | * | |
174 | * @param luiId - String - Identifier for LUI | |
175 | * @param context - ContextInfo - Context information containing the principalId | |
176 | * and locale information about the caller of service opperation | |
177 | * @return List of LUI Person Relation info | |
178 | */ | |
179 | public List<LuiPersonRelationInfc> findLuiPersonRelationsForLui(String luiId, ContextInfc context) | |
180 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
181 | ||
182 | /** | |
183 | * Retrieves LUIPersonRelation for LUI | |
184 | * | |
185 | * @param luiId - String - Identifier for LUI | |
186 | * @param context - ContextInfo - Context information containing the principalId | |
187 | * and locale information about the caller of service opperation | |
188 | * @return Simple list of LUI Person Relation identifiers | |
189 | */ | |
190 | public List<String> findLuiPersonRelationIdsForLui(String luiId, ContextInfc context) | |
191 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
192 | ||
193 | /** | |
194 | * Retrieves valid Relation States for LUI Person relation | |
195 | * | |
196 | * @param personId - String - Identifier for person | |
197 | * @param luiId - String - Identifier for LUI | |
198 | * @param luiPersonRelationType - String - Type of LUI Person Relation | |
199 | * @param context - ContextInfo - Context information containing the principalId | |
200 | * and locale information about the caller of service opperation | |
201 | * @return list of valid relation states | |
202 | */ | |
203 | @Deprecated | |
204 | public List<LuiPersonRelationStateInfc> findValidRelationStatesForLuiPersonRelation(String personId, String luiId, String luiPersonRelationType, ContextInfc context) | |
205 | throws DoesNotExistException, DisabledIdentifierException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
206 | ||
207 | /** | |
208 | * Checks to see if it's ok to create a particular type and state of a relation | |
209 | * between Person and LUI | |
210 | * | |
211 | * @param personId - String - Identifier for person | |
212 | * @param luiId - String - Identifier for LUI | |
213 | * @param luiPersonRelationType - String - Type of LUI Person relation | |
214 | * @param relationState - String - Relation state | |
215 | * @param context - ContextInfo - Context information containing the principalId | |
216 | * and locale information about the caller of service opperation | |
217 | * @return true if relation of specified type and state is ok to create between | |
218 | * person and lui | |
219 | */ | |
220 | @Deprecated | |
221 | public Boolean isValidLuiPersonRelation(String personId, String luiId, String luiPersonRelationType, String relationState, ContextInfc context) | |
222 | throws DoesNotExistException, DisabledIdentifierException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
223 | ||
224 | /** | |
225 | * Checks if a Person and LUI have a particular relation in a particular state | |
226 | * | |
227 | * @param personId - String - Identifier for person | |
228 | * @param luiId - String - Identifier for LUI | |
229 | * @param luiPersonRelationType - String - Type of LUI Person Relation | |
230 | * @param relationState - String - Relation state | |
231 | * @param context - ContextInfo - Context information containing the principalId | |
232 | * and locale information about the caller of service opperation | |
233 | * @return true if relation of specified type and state exists between person and | |
234 | * lui | |
235 | */ | |
236 | @Deprecated | |
237 | public Boolean isRelated(String personId, String luiId, String luiPersonRelationType, String relationState, ContextInfc context) | |
238 | throws DoesNotExistException, DisabledIdentifierException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
239 | ||
240 | /** | |
241 | * Validates the particular relation in a state for a Person and LUI | |
242 | * | |
243 | * @param personId - String - Identifier for person | |
244 | * @param luiId - String - Identifier for LUI | |
245 | * @param luiPersonRelationType - String - Type of luiPersonRelation | |
246 | * @param relationState - String - Relation State | |
247 | * @param context - ContextInfo - Context information containing the principalId | |
248 | * and locale information about the caller of service opperation | |
249 | * @return result from validation operation not sure of specifics | |
250 | */ | |
251 | @Deprecated | |
252 | public ValidationResultInfc validateLuiPersonRelation(String personId, String luiId, String luiPersonRelationType, String relationState, ContextInfc context) | |
253 | throws DoesNotExistException, DisabledIdentifierException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
254 | ||
255 | /** | |
256 | * Retrieves LUIs for an academic time period where the specified relation type and | |
257 | * state would be valid for the specified person | |
258 | * | |
259 | * @param personId - String - Identifier for person | |
260 | * @param luiPersonRelationType - String - Type of luiPersonRelationI | |
261 | * @param relationState - String - Relation State | |
262 | * @param atpId - String - Identifier for academic time period | |
263 | * @param context - ContextInfo - Context information containing the principalId | |
264 | * and locale information about the caller of service opperation | |
265 | * @return List of LUIs | |
266 | */ | |
267 | public List<String> findAllValidLuisForPerson(String personId, String luiPersonRelationType, String relationState, String atpId, ContextInfc context) | |
268 | throws DoesNotExistException, DisabledIdentifierException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
269 | ||
270 | /** | |
271 | * Retrieves the list of people where the specified relation type and state would | |
272 | * be valid for the specified LUI | |
273 | * | |
274 | * Find all people who could teach this course | |
275 | * | |
276 | * @param luiId - String - Identifier for LUI | |
277 | * @param luiPersonRelationType - String - Type of LUI Person Relation | |
278 | * @param relationState - String - Relation state | |
279 | * @param context - ContextInfo - Context information containing the principalId | |
280 | * and locale information about the caller of service opperation | |
281 | * @return List of people that could have a particular relation with a LUI | |
282 | */ | |
283 | @Deprecated | |
284 | public List<String> findAllValidPeopleForLui(String luiId, String luiPersonRelationType, String relationState, ContextInfc context) | |
285 | throws DoesNotExistException, DisabledIdentifierException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
286 | ||
287 | /** | |
288 | * Retrieves an ordered list of the "history" of a particular LUI Person Relation, | |
289 | * including state and date of change | |
290 | * | |
291 | * @param luiPersonRelationId - String - Identifier for LUI Person Relation | |
292 | * @param context - ContextInfo - Context information containing the principalId | |
293 | * and locale information about the caller of service opperation | |
294 | * @return List of LUI Person Relation info Andy Bucior This might need to be | |
295 | * slightly different from the normal luiPersonRelation display listing, since it | |
296 | * is dealing with a relationship history type concept. | |
297 | */ | |
298 | @Deprecated | |
299 | public List<LuiPersonRelationInfc> findOrderedRelationStatesForLuiPersonRelation(String luiPersonRelationId, ContextInfc context) | |
300 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
301 | ||
302 | /** | |
303 | * Retrieves detail of LUI Person Relation Ids | |
304 | * | |
305 | * @param criteria - List<Criteria> - Criteria to be | |
306 | * used for retrieval of multiple LUI Person Relation identifiers | |
307 | * @param context - ContextInfo - Context information containing the principalId | |
308 | * and locale information about the caller of service opperation | |
309 | * @return Simple list of LUI Person Relation identifiers | |
310 | */ | |
311 | public List<String> searchForLuiPersonRelationIds(List<CriteriaInfc> criteria, ContextInfc context) | |
312 | throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
313 | ||
314 | /** | |
315 | * Creates relation between the specified Person and LUI | |
316 | * | |
317 | * @param personId - String - Person Identifier | |
318 | * @param luiId - String - LUI Identifier | |
319 | * @param luiPersonRelationType - String - Type of LUI to Person Relation | |
320 | * @param luiPersonRelationInfo - LuiPersonRelationInfo - Information required to | |
321 | * create the LUI Person relation | |
322 | * @param context - ContextInfo - Context information containing the principalId | |
323 | * and locale information about the caller of service opperation | |
324 | * @return Structure containing LUI Person relation identifiers | |
325 | */ | |
326 | public String createLuiPersonRelation(String personId, String luiId, String luiPersonRelationType, LuiPersonRelationInfc luiPersonRelationInfo, ContextInfc context) | |
327 | throws AlreadyExistsException, DoesNotExistException, DisabledIdentifierException, ReadOnlyException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
328 | ||
329 | /** | |
330 | * Creates bulk relationships for one specified person. This is an all or nothing | |
331 | * transaction - any error will invalidate the entire transaction. | |
332 | * | |
333 | * @param personId - String - Identifier for Person | |
334 | * @param luiIdList - StringList - Simple list of LUI identifiers | |
335 | * @param relationState - String - Relation state | |
336 | * @param luiPersonRelationType - String - Type of LUI Person relation | |
337 | * @param luiPersonRelationInfo - LuiPersonRelationInfo - Information required to | |
338 | * create the LUI Person relation | |
339 | * @param context - ContextInfo - Context information containing the principalId | |
340 | * and locale information about the caller of service opperation | |
341 | * @return Structure containing LUI Person relation identifiers | |
342 | */ | |
343 | public List<String> createBulkRelationshipsForPerson(String personId, List<String> luiIdList, String relationState, String luiPersonRelationType, LuiPersonRelationInfc luiPersonRelationInfo, ContextInfc context) | |
344 | throws AlreadyExistsException, DoesNotExistException, DisabledIdentifierException, ReadOnlyException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
345 | ||
346 | /** | |
347 | * Update relation between Person and LUI | |
348 | * | |
349 | * @param luiPersonRelationId - String - Identifier for the LUI Person Relation | |
350 | * @param luiPersonRelationInfo - LuiPersonRelationInfo - Changed information about | |
351 | * the LUI Person Relation | |
352 | * @return Updated information about the LUI Person Relation | |
353 | */ | |
354 | public LuiPersonRelationInfc updateLuiPersonRelation(String luiPersonRelationId, LuiPersonRelationInfc luiPersonRelationInfo, ContextInfc context) | |
355 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, ReadOnlyException, OperationFailedException, PermissionDeniedException, VersionMismatchException; | |
356 | ||
357 | /** | |
358 | * Deletes relation between the specified Person and LUI | |
359 | * | |
360 | * @param luiPersonRelationId - String - Identifier for the LUI Person Relation | |
361 | * @return status of the operation (success, failed) | |
362 | */ | |
363 | public StatusInfc deleteLuiPersonRelation(String luiPersonRelationId, ContextInfc context) | |
364 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
365 | ||
366 | /** | |
367 | * Update relation state | |
368 | * | |
369 | * @param luiPersonRelationId - String - Identifier for the LUI Person Relation | |
370 | * @param relationState - LuiPersonRelationStateInfo - Relation state | |
371 | * @return status of the operation (success or failure) | |
372 | */ | |
373 | public StatusInfc updateRelationState(String luiPersonRelationId, LuiPersonRelationStateInfc relationState, ContextInfc context) | |
374 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException; | |
375 | } | |
376 |