1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.student.r2.common.util.constants;
17
18 import org.kuali.student.enrollment.lui.dto.LuiInfo;
19 import org.kuali.student.enrollment.lui.dto.LuiLuiRelationInfo;
20 import org.kuali.student.enrollment.lui.service.LuiService;
21 import org.kuali.student.r2.common.constants.CommonServiceConstants;
22
23 import java.util.HashSet;
24
25
26
27
28
29
30 public class LuiServiceConstants {
31
32 public static final String SERVICE_NAME_LOCAL_PART = LuiService.class.getSimpleName ();
33 public static final String NAMESPACE = CommonServiceConstants.REF_OBJECT_URI_GLOBAL_PREFIX + "lui";
34 public static final String REF_OBJECT_URI_LUI = NAMESPACE + "/" + LuiInfo.class.getSimpleName();
35 public static final String REF_OBJECT_URI_LUI_LUI_RELATION = NAMESPACE + "/" + LuiLuiRelationInfo.class.getSimpleName();
36 public static final String LUI_KEY_PREFIX = "kuali.lui";
37
38
39
40
41 public static final String COURSE_OFFERING_TYPE_KEY = "kuali.lui.type.course.offering";
42
43 public static final String FORMAT_OFFERING_TYPE_KEY = "kuali.lui.type.course.format.offering";
44 public static final String REGISTRATION_GROUP_TYPE_KEY = "kuali.lui.type.registration.group";
45
46 public static final boolean isFormatOfferingTypeKey(String possibleType) {
47 if (possibleType == null) {
48 return false;
49 }
50 return FORMAT_OFFERING_TYPE_KEY.equals(possibleType.trim());
51 }
52
53
54
55
56
57 public static final String ACTIVITY_OFFERING_GROUP_TYPE_KEY = "kuali.lui.type.grouping.activity";
58
59 public static final String LECTURE_ACTIVITY_OFFERING_TYPE_KEY = "kuali.lui.type.activity.offering.lecture";
60 public static final String LAB_ACTIVITY_OFFERING_TYPE_KEY = "kuali.lui.type.activity.offering.lab";
61 public static final String DISCUSSION_ACTIVITY_OFFERING_TYPE_KEY = "kuali.lui.type.activity.offering.discussion";
62 public static final String TUTORIAL_ACTIVITY_OFFERING_TYPE_KEY = "kuali.lui.type.activity.offering.tutorial";
63 public static final String WEB_LECTURE_ACTIVITY_OFFERING_TYPE_KEY = "kuali.lui.type.activity.offering.weblecture";
64 public static final String WEB_DISCUSS_ACTIVITY_OFFERING_TYPE_KEY = "kuali.lui.type.activity.offering.webdiscussion";
65 public static final String DIRECTED_ACTIVITY_OFFERING_TYPE_KEY = "kuali.lui.type.activity.offering.directed";
66 public static final String STUDIO_ACTIVITY_OFFERING_TYPE_KEY = "kuali.lui.type.activity.offering.studio";
67 public static final String CORRESPOND_ACTIVITY_OFFERING_TYPE_KEY = "kuali.lui.type.activity.offering.correspond";
68 public static final String ACTIVITY_ACTIVITY_OFFERING_TYPE_KEY = "kuali.lui.type.activity.offering.activity";
69 public static final String COLLOQUIUM_ACTIVITY_OFFERING_TYPE_KEY = "kuali.lui.type.activity.offering.colloquium";
70 public static final String DEMONSTRATION_ACTIVITY_OFFERING_TYPE_KEY = "kuali.lui.type.activity.offering.demonstration";
71 public static final String FIELD_ACTIVITY_OFFERING_TYPE_KEY = "kuali.lui.type.activity.offering.field";
72 public static final String HOMEWORK_ACTIVITY_OFFERING_TYPE_KEY = "kuali.lui.type.activity.offering.homework";
73 public static final String INDEPEND_ACTIVITY_OFFERING_TYPE_KEY = "kuali.lui.type.activity.offering.independ";
74 public static final String INTERNSHIP_ACTIVITY_OFFERING_TYPE_KEY = "kuali.lui.type.activity.offering.internship";
75 public static final String PRIVATE_ACTIVITY_OFFERING_TYPE_KEY = "kuali.lui.type.activity.offering.private";
76 public static final String RECITATION_ACTIVITY_OFFERING_TYPE_KEY = "kuali.lui.type.activity.offering.recitation";
77 public static final String RESEARCH_ACTIVITY_OFFERING_TYPE_KEY = "kuali.lui.type.activity.offering.research";
78 public static final String SELF_PACED_ACTIVITY_OFFERING_TYPE_KEY = "kuali.lui.type.activity.offering.selfpaced";
79 public static final String COMP_BASED_ACTIVITY_OFFERING_TYPE_KEY = "kuali.lui.type.activity.offering.compbased";
80 public static final String VIDEO_CONF_ACTIVITY_OFFERING_TYPE_KEY = "kuali.lui.type.activity.offering.videoconf";
81 public static final String CLERKSHIP_ACTIVITY_OFFERING_TYPE_KEY = "kuali.lui.type.activity.offering.clerkship";
82 public static final String CLINIC_ACTIVITY_OFFERING_TYPE_KEY = "kuali.lui.type.activity.offering.clinic";
83 public static final String CONFERENCE_ACTIVITY_OFFERING_TYPE_KEY = "kuali.lui.type.activity.offering.conference";
84 public static final String PRACTICUM_ACTIVITY_OFFERING_TYPE_KEY = "kuali.lui.type.activity.offering.practicum";
85 public static final String QUIZ_ACTIVITY_OFFERING_TYPE_KEY = "kuali.lui.type.activity.offering.quiz";
86 public static final String SEMINAR_ACTIVITY_OFFERING_TYPE_KEY = "kuali.lui.type.activity.offering.seminar";
87
88 public static final String[] ALL_ACTIVITY_TYPES = {
89 LECTURE_ACTIVITY_OFFERING_TYPE_KEY,
90 LAB_ACTIVITY_OFFERING_TYPE_KEY,
91 DISCUSSION_ACTIVITY_OFFERING_TYPE_KEY,
92 TUTORIAL_ACTIVITY_OFFERING_TYPE_KEY,
93 WEB_LECTURE_ACTIVITY_OFFERING_TYPE_KEY,
94 WEB_DISCUSS_ACTIVITY_OFFERING_TYPE_KEY,
95 DIRECTED_ACTIVITY_OFFERING_TYPE_KEY,
96 STUDIO_ACTIVITY_OFFERING_TYPE_KEY,
97 CORRESPOND_ACTIVITY_OFFERING_TYPE_KEY,
98 ACTIVITY_ACTIVITY_OFFERING_TYPE_KEY,
99 COLLOQUIUM_ACTIVITY_OFFERING_TYPE_KEY,
100 DEMONSTRATION_ACTIVITY_OFFERING_TYPE_KEY,
101 FIELD_ACTIVITY_OFFERING_TYPE_KEY,
102 HOMEWORK_ACTIVITY_OFFERING_TYPE_KEY,
103 INDEPEND_ACTIVITY_OFFERING_TYPE_KEY,
104 INTERNSHIP_ACTIVITY_OFFERING_TYPE_KEY,
105 PRIVATE_ACTIVITY_OFFERING_TYPE_KEY,
106 RECITATION_ACTIVITY_OFFERING_TYPE_KEY,
107 RESEARCH_ACTIVITY_OFFERING_TYPE_KEY,
108 SELF_PACED_ACTIVITY_OFFERING_TYPE_KEY,
109 COMP_BASED_ACTIVITY_OFFERING_TYPE_KEY,
110 VIDEO_CONF_ACTIVITY_OFFERING_TYPE_KEY,
111 CLERKSHIP_ACTIVITY_OFFERING_TYPE_KEY,
112 CLINIC_ACTIVITY_OFFERING_TYPE_KEY,
113 CONFERENCE_ACTIVITY_OFFERING_TYPE_KEY,
114 PRACTICUM_ACTIVITY_OFFERING_TYPE_KEY,
115 QUIZ_ACTIVITY_OFFERING_TYPE_KEY,
116 SEMINAR_ACTIVITY_OFFERING_TYPE_KEY
117 };
118
119 public static final String ACTIVITY_OFFERING_TYPE_KEY_PREFIX = "kuali.lui.type.activity.offering.";
120
121 private static HashSet<String> ACTIVITY_TYPES_HASH_SET = null;
122 public static synchronized boolean isActivityType(String possibleActivityType) {
123 if (ACTIVITY_TYPES_HASH_SET == null) {
124
125 ACTIVITY_TYPES_HASH_SET = new HashSet<String>();
126 for (String aType: ALL_ACTIVITY_TYPES) {
127 ACTIVITY_TYPES_HASH_SET.add(aType);
128 }
129 }
130 return ACTIVITY_TYPES_HASH_SET.contains(possibleActivityType);
131 }
132
133
134
135
136
137 public static final String COURSE_OFFERING_LIFECYCLE_KEY = "kuali.course.offering.lifecycle";
138 public static final String LUI_CO_STATE_DRAFT_KEY = "kuali.lui.course.offering.state.draft";
139 public static final String LUI_CO_STATE_PLANNED_KEY = "kuali.lui.course.offering.state.planned";
140 public static final String LUI_CO_STATE_OFFERED_KEY = "kuali.lui.course.offering.state.offered";
141 public static final String LUI_CO_STATE_CANCELED_KEY = "kuali.lui.course.offering.state.canceled";
142 public static final String LUI_CO_STATE_SUSPENDED_KEY = "kuali.lui.course.offering.state.suspended";
143
144 public static final String[] COURSE_OFFERING_LIFECYCLE_STATE_KEYS = {
145 LUI_CO_STATE_DRAFT_KEY,
146 LUI_CO_STATE_PLANNED_KEY,
147 LUI_CO_STATE_OFFERED_KEY,
148 LUI_CO_STATE_CANCELED_KEY,
149 LUI_CO_STATE_SUSPENDED_KEY
150 };
151
152 public static boolean isValidCourseOfferingState(String possibleState) {
153 if (possibleState == null) {
154 return false;
155 }
156 for (String state: COURSE_OFFERING_LIFECYCLE_STATE_KEYS) {
157 if (state.equals(possibleState)) {
158 return true;
159 }
160 }
161 return false;
162 }
163
164
165
166
167
168
169 public static final String FORMAT_OFFERING_LIFECYCLE_KEY = "kuali.format.offering.lifecycle";
170 public static final String LUI_FO_STATE_DRAFT_KEY = "kuali.lui.format.offering.state.draft";
171 public static final String LUI_FO_STATE_PLANNED_KEY = "kuali.lui.format.offering.state.planned";
172 public static final String LUI_FO_STATE_OFFERED_KEY = "kuali.lui.format.offering.state.offered";
173 public static final String LUI_FO_STATE_CANCELED_KEY = "kuali.lui.format.offering.state.canceled";
174 public static final String LUI_FO_STATE_SUSPENDED_KEY = "kuali.lui.format.offering.state.suspended";
175
176
177 public static final String[] FORMAT_OFFERING_LIFECYCLE_STATE_KEYS = {
178 LUI_FO_STATE_DRAFT_KEY,
179 LUI_FO_STATE_PLANNED_KEY,
180 LUI_FO_STATE_OFFERED_KEY,
181 LUI_FO_STATE_CANCELED_KEY,
182 LUI_FO_STATE_SUSPENDED_KEY
183 };
184
185 public static boolean isValidFormatOfferingState(String possibleState) {
186 if (possibleState == null) {
187 return false;
188 }
189 for (String state: FORMAT_OFFERING_LIFECYCLE_STATE_KEYS) {
190 if (state.equals(possibleState)) {
191 return true;
192 }
193 }
194 return false;
195 }
196
197
198
199
200
201 public static final String ACTIVITY_OFFERING_LIFECYCLE_KEY = "kuali.activity.offering.lifecycle";
202 public static final String LUI_AO_STATE_DRAFT_KEY = "kuali.lui.activity.offering.state.draft";
203 public static final String LUI_AO_STATE_SUBMITTED_KEY = "kuali.lui.activity.offering.state.submitted";
204 public static final String LUI_AO_STATE_APPROVED_KEY = "kuali.lui.activity.offering.state.approved";
205 public static final String LUI_AO_STATE_OFFERED_KEY = "kuali.lui.activity.offering.state.offered";
206 public static final String LUI_AO_STATE_SUSPENDED_KEY = "kuali.lui.activity.offering.state.suspended";
207 public static final String LUI_AO_STATE_CANCELED_KEY = "kuali.lui.activity.offering.state.canceled";
208
209 public static final String[] ACTIVITY_OFFERING_LIFECYCLE_STATE_KEYS = {
210 LUI_AO_STATE_DRAFT_KEY,
211 LUI_AO_STATE_SUBMITTED_KEY,
212 LUI_AO_STATE_APPROVED_KEY,
213 LUI_AO_STATE_OFFERED_KEY,
214 LUI_AO_STATE_SUSPENDED_KEY,
215 LUI_AO_STATE_CANCELED_KEY
216 };
217
218 public static boolean isValidActivityOfferingState(String possibleState) {
219 if (possibleState == null) {
220 return false;
221 }
222 for (String state: ACTIVITY_OFFERING_LIFECYCLE_STATE_KEYS) {
223 if (state.equals(possibleState)) {
224 return true;
225 }
226 }
227 return false;
228 }
229
230
231
232
233
234
235 public static final String LUI_AO_SCHEDULING_STATE_LIFECYCLE_KEY = "kuali.activity.offering.scheduling.lifecycle";
236 public static final String LUI_AO_SCHEDULING_STATE_EXEMPT_KEY = "kuali.lui.activity.offering.scheduling.state.exempt";
237 public static final String LUI_AO_SCHEDULING_STATE_SCHEDULED_KEY = "kuali.lui.activity.offering.scheduling.state.scheduled";
238 public static final String LUI_AO_SCHEDULING_STATE_UNSCHEDULED_KEY = "kuali.lui.activity.offering.scheduling.state.unscheduled";
239 public static final String LUI_AO_SCHEDULING_STATE_ERROR_KEY = "kuali.lui.activity.offering.scheduling.state.error";
240
241 public static final String[] LUI_AO_SCHEDULING_STATE_KEYS = {
242 LUI_AO_SCHEDULING_STATE_EXEMPT_KEY,
243 LUI_AO_SCHEDULING_STATE_SCHEDULED_KEY,
244 LUI_AO_SCHEDULING_STATE_UNSCHEDULED_KEY,
245 LUI_AO_SCHEDULING_STATE_ERROR_KEY
246 };
247
248 public static boolean isValidActivityOfferingSchedulingState(String possibleState) {
249 if (possibleState == null) {
250 return false;
251 }
252 for (String state: LUI_AO_SCHEDULING_STATE_KEYS) {
253 if (state.equals(possibleState)) {
254 return true;
255 }
256 }
257 return false;
258 }
259
260
261
262
263 @Deprecated
264 public static final String LUI_DELETED_STATE_KEY = "kuali.lui.state.deleted";
265
266
267
268
269
270 @Deprecated
271 public static final String LUI_DRAFT_STATE_KEY = "kuali.lui.state.draft";
272
273
274
275
276 @Deprecated
277 public static final String LUI_LUI_RELATION_ASSOCIATED_TYPE_KEY = "kuali.lui.lui.relation.associated";
278
279 public static final String LUI_LUI_RELATION_DELIVERED_VIA_CO_TO_FO_TYPE_KEY = "kuali.lui.lui.relation.type.deliveredvia.co2fo";
280 public static final String LUI_LUI_RELATION_DELIVERED_VIA_FO_TO_AO_TYPE_KEY = "kuali.lui.lui.relation.type.deliveredvia.fo2ao";
281 public static final String LUI_LUI_RELATION_DELIVERED_VIA_FO_TO_RG_TYPE_KEY = "kuali.lui.lui.relation.type.deliveredvia.fo2rg";
282 public static final String LUI_LUI_RELATION_REGISTERED_FOR_VIA_RG_TO_AO_TYPE_KEY = "kuali.lui.lui.relation.type.registeredforvia.rg2ao";
283
284 public static final String LUI_LUI_RELATION_REGISTEREDFORVIA_TYPE_KEY = "kuali.lui.lui.relation.type.registeredforvia";
285
286 public static final String LUI_LUI_RELATION_DELIVEREDVIA_TYPE_KEY = "kuali.lui.lui.relation.type.deliveredvia";
287
288
289
290
291 public static final String LUI_LUI_RELATION_LIFECYCLE_KEY = "kuali.lui.lui.relationship.lifecycle";
292 public static final String LUI_LUI_RELATION_ACTIVE_STATE_KEY = "kuali.lui.lui.relation.state.active";
293 public static final String LUI_LUI_RELATION_INACTIVE_STATE_KEY = "kuali.lui.lui.relation.state.inactive";
294 public static final String[] LUI_LUI_RELATION_LIFECYCLE_KEYS = {LUI_LUI_RELATION_ACTIVE_STATE_KEY,
295 LUI_LUI_RELATION_INACTIVE_STATE_KEY};
296
297
298
299
300 public static final String SEATPOOL_LUI_CAPACITY_TYPE_KEY = "kuali.lui.capacity.type.seatpool";
301
302
303
304
305 public static final String LUI_CAPACITY_LIFECYCLE_KEY = "kuali.lui.capacity.lifecycle";
306 public static final String LUI_CAPACITY_ACTIVE_STATE_KEY = "kuali.lui.capacity.state.active";
307 public static final String LUI_CAPACITY_INACTIVE_STATE_KEY = "kuali.lui.capacity.state.inactive";
308 public static final String[] LUI_CAPACITY_LIFECYCLE_KEYS = {LUI_CAPACITY_ACTIVE_STATE_KEY,
309 LUI_CAPACITY_INACTIVE_STATE_KEY};
310
311
312
313
314 public static final String LUI_IDENTIFIER_OFFICIAL_TYPE_KEY = "kuali.lui.identifier.type.official";
315 public static final String LUI_IDENTIFIER_CROSSLISTED_TYPE_KEY = "kuali.lui.identifier.type.cross-listed";
316
317
318
319
320 public static final String LUI_IDENTIFIER_LIFECYCLE_KEY = "kuali.lui.identifier.lifecycle";
321 public static final String LUI_IDENTIFIER_ACTIVE_STATE_KEY = "kuali.lui.identifier.state.active";
322 public static final String LUI_IDENTIFIER_INACTIVE_STATE_KEY = "kuali.lui.identifier.state.inactive";
323 public static final String[] LUI_IDENTIFIER_LIFECYCLE_KEYS = {LUI_IDENTIFIER_ACTIVE_STATE_KEY,
324 LUI_IDENTIFIER_INACTIVE_STATE_KEY
325 };
326
327
328
329
330 public static final String LUI_SET_COLOCATED_OFFERING_TYPE_KEY = "kuali.luiset.type.colocated.offering.set";
331
332
333
334
335 public static final String LUI_SET_LIFECYCLE_KEY = "kuali.luiset.lifecycle";
336 public static final String LUI_SET_ACTIVE_STATE_KEY = "kuali.luiset.state.active";
337 public static final String LUI_SET_INACTIVE_STATE_KEY = "kuali.luiset.state.inactive";
338 public static final String[] LUI_SET_LIFECYCLE_KEYS = { LUI_SET_ACTIVE_STATE_KEY, LUI_SET_INACTIVE_STATE_KEY };
339
340
341
342
343
344
345 public static final String AUTOMATIC_WAITLIST_TYPE_KEY = "kuali.waitlist.type.automatic";
346 public static final String SEMIAUTOMATIC_WAITLIST_TYPE_KEY = "kuali.waitlist.type.semiautomatic";
347 public static final String MANUAL_WAITLIST_TYPE_KEY = "kuali.waitlist.type.manual";
348 public static final String[] ALL_WAITLIST_TYPES = { AUTOMATIC_WAITLIST_TYPE_KEY, SEMIAUTOMATIC_WAITLIST_TYPE_KEY,
349 MANUAL_WAITLIST_TYPE_KEY
350 };
351
352
353
354 public static final String ALL_REGISTRATION_ORDERING_TYPE_KEY = "kuali.registration.ordering.type.all";
355
356
357
358
359
360
361
362 public static final String REGISTRATION_GROUP_OFFERED_STATE_KEY = "kuali.lui.registration.group.state.offered";
363 public static final String REGISTRATION_GROUP_PENDING_STATE_KEY = "kuali.lui.registration.group.state.pending";
364 public static final String REGISTRATION_GROUP_CANCELED_STATE_KEY = "kuali.lui.registration.group.state.canceled";
365 public static final String REGISTRATION_GROUP_SUSPENDED_STATE_KEY = "kuali.lui.registration.group.state.suspended";
366 public static final String REGISTRATION_GROUP_INVALID_STATE_KEY = "kuali.lui.registration.group.state.invalid";
367
368 public static final String REGISTRATION_GROUP_LIFECYCLE_KEY = "kuali.course.registration.group.lifecycle";
369
370 public static final String[] REGISTRATION_GROUP_LIFECYCLE_KEY_STATES = {
371 REGISTRATION_GROUP_OFFERED_STATE_KEY,
372 REGISTRATION_GROUP_PENDING_STATE_KEY,
373 REGISTRATION_GROUP_CANCELED_STATE_KEY,
374 REGISTRATION_GROUP_SUSPENDED_STATE_KEY,
375 REGISTRATION_GROUP_INVALID_STATE_KEY
376 };
377
378
379
380
381 public static final String HONORS_LU_CODE = "kuali.lu.code.honorsOffering";
382
383 }