View Javadoc
1   package org.kuali.student.enrollment.class2.courseoffering.dto;
2   
3   import org.apache.commons.lang.BooleanUtils;
4   import org.apache.commons.lang.StringUtils;
5   import org.kuali.rice.core.api.config.property.ConfigContext;
6   import org.kuali.rice.core.api.util.KeyValue;
7   import org.kuali.student.enrollment.class2.courseoffering.util.ActivityOfferingConstants;
8   import org.kuali.student.enrollment.class2.courseoffering.util.CourseOfferingConstants;
9   import org.kuali.student.enrollment.class2.courseoffering.util.CourseOfferingManagementUtil;
10  import org.kuali.student.enrollment.class2.scheduleofclasses.sort.ComparatorModel;
11  import org.kuali.student.enrollment.courseoffering.dto.ActivityOfferingInfo;
12  import org.kuali.student.enrollment.courseoffering.dto.FormatOfferingInfo;
13  import org.kuali.student.enrollment.courseoffering.dto.OfferingInstructorInfo;
14  import org.kuali.student.enrollment.courseofferingset.dto.SocInfo;
15  import org.kuali.student.enrollment.coursewaitlist.dto.CourseWaitListInfo;
16  import org.kuali.student.r2.common.dto.AttributeInfo;
17  import org.kuali.student.r2.common.util.constants.CourseOfferingSetServiceConstants;
18  import org.kuali.student.r2.common.util.constants.LuiServiceConstants;
19  import org.kuali.student.r2.core.acal.dto.TermInfo;
20  import org.kuali.student.r2.core.population.dto.PopulationInfo;
21  import org.kuali.student.r2.core.scheduling.dto.ScheduleRequestSetInfo;
22  import org.kuali.student.r2.lum.course.dto.CourseInfo;
23  import org.kuali.student.r2.common.util.constants.CourseOfferingServiceConstants;
24  
25  import java.io.Serializable;
26  import java.util.ArrayList;
27  import java.util.Date;
28  import java.util.HashMap;
29  import java.util.List;
30  
31  /**
32   * Main model object in Edit AO view.
33   *
34   * @see ColocatedActivity
35   *
36   */
37  public class ActivityOfferingWrapper implements Serializable, ComparatorModel{
38  
39      private String waitListType;
40      private String waitListTypeUI;
41  
42      private String aoClusterName;
43      private String aoClusterID;
44      private ActivityOfferingInfo aoInfo;
45      private FormatOfferingInfo formatOffering;
46      private List<OfferingInstructorWrapper> instructors;
47      private List<ScheduleComponentWrapper> scheduleComponentWrappers;
48      private List<SeatPoolWrapper> seatpools;
49      private List<PopulationInfo> populationsForSPValidation;
50      private boolean readOnlyView;
51      private boolean isChecked;
52      private boolean isCheckedByCluster;
53      private String courseOfferingId;
54      private String populationsJSONString;
55  
56      private String stateName;
57      private String typeName;
58      private String typeKey;
59  
60      private String formatOfferingName;
61  
62      private Date termRegStartDate;
63      private String waitListText = "";
64      private String toolTipText = "";
65  
66      private String instructorNameHighestPercentEffort = "";
67  
68      private String firstInstructorDisplayName;
69      private String instructorDisplayNames;
70  
71      private String courseOfferingCode = "";
72  
73      private List<ScheduleWrapper> actualScheduleComponents;
74      private List<ScheduleWrapper> requestedScheduleComponents;
75      private List<ScheduleWrapper> deletedScheduleComponents;
76      private ScheduleWrapper newScheduleRequest;
77  
78      private SocInfo socInfo;
79  
80      private String scheduledState = "";
81      private String startTimeDisplay = "";
82      private String endTimeDisplay = "";
83      private String daysDisplayName = "";
84      private String buildingName = "";
85      private String buildingCode = "";
86      private String bldgCodeSimple = "";
87      private String roomName = "";
88      private String tbaDisplayName = "";
89      private String colocatedAoInfo = "";
90  
91      private List<String> startTime;
92      private List<String> endTime;
93      private List<String> weekDays;
94  
95      private boolean schedulesModified;
96  
97      private String adminOrg;
98  
99        //hidden columns for toolbar
100     private boolean enableApproveButton = false;
101     private boolean enableDraftButton = false;
102     private boolean enableSuspendButton = false;
103     private boolean enableCancelButton = false;
104     private boolean enableReinstateButton = false;
105     private boolean enableMoveToButton = false;
106     private boolean enableDeleteButton = false;
107     private boolean enableCopyAOActionLink = false;
108     private boolean enableEditAOActionLink = false;
109 
110     private boolean colocatedAO;
111     private List<ColocatedActivity> colocatedActivities;
112     private boolean maxEnrollmentShared;
113     private boolean hiddenMaxEnrollmentShared;
114     private int sharedMaxEnrollment;
115     private boolean hasSeatpools;
116 
117     private ScheduleRequestSetInfo scheduleRequestSetInfo;
118 
119     private EditRenderHelper editRenderHelper;
120     private boolean isPartOfColoSetOnLoadAlready;
121     private boolean isColocatedOnLoadAlready;
122     private boolean isSendRDLsToSchedulerAfterMSE;
123     private boolean isRemovedFromColoSet;
124     private String reinstateStateName;
125     private int commentCount;
126     private String activityOfferingRefUri = CourseOfferingServiceConstants.REF_OBJECT_URI_ACTIVITY_OFFERING;
127     protected String viewId;
128 
129     private CourseOfferingContextBar contextBar = CourseOfferingContextBar.NULL_SAFE_INSTANCE;
130 
131     //This is needed to display the cross listed courses
132     private CourseInfo course;
133 
134     /*
135     * Always carry the parent or the standard term if any -- Is this because
136     * manage COs/AOs only support search on TermCode but not on subterm?
137     */
138     private TermInfo term;
139     //for Term (name) field display of the parent/standard term on Edit AO page
140     private String termName;
141     //for Sub Term (name) field display on Edit AO page
142     private String subTermName = "";
143     //for Start/End field display on Edit AO page, if subTermId is not empty,
144     //display Start/End date info for the subterm
145     private String termDisplayString = "";
146     //for displaying subterm drop-down list when click change link on Edit AO page
147     //and hold the id value for the selected subterm
148     private String subTermId;
149     //use this boolean to decide if "Change" link should be rendered or not
150     private boolean hasSubTerms;
151     //would it be better to define 'TermInfo subTerm' instead of the following three strings
152     private String termStartEndDate = "";
153 
154     /*
155     This is a list of subTerm start/end date strings to support javascript update of the
156      displayed start/end when subterm is changed/choremoved
157      */
158     private String subTermDatesJsonString;
159 
160     //use this boolean to check if AO has any rule attached to it
161     private boolean hasRule;
162 
163     private SchOfClassesRenderHelper schOfClassesRenderHelper;
164 
165     private CourseWaitListInfo courseWaitListInfo;
166     //indicate at AO level, the state of the waitlist
167     private boolean hasWaitlist;
168     //indicate if wailtlist has been enabled in CO level
169     private boolean hasWaitlistCO;
170     //hold the checkbox value for Limit Waitlist Size
171     private boolean limitWaitlistSize;
172 
173     private String requisite;
174 
175     private boolean isCentralSchedulingCoOrdinator;
176 
177     private String timeSlotType;
178 
179     private String crossListedCourseCodes;
180 
181     /**
182      * Valid modes for creating non-standard timeslots
183      *
184      * The application supports three non-standard timeslot creation modes
185      * 1. Allows the user to create non-standard timeslots
186      * 2. Disallows the user to create non-standard timeslots
187      * 3. Allows the user to create non-standard timeslots, but only with prior approval
188      *
189      * By default, the creation of non-standard timeslots is allowed only with prior approval.  This can be configured via property
190      * kuali.ks.enrollment.timeslots.adhoc_creation_mode
191      */
192     public static enum NonStandardTimeslotCreationMode {
193 
194         ALLOWED,
195         NOT_ALLOWED,
196         NEEDS_APPROVAL;
197 
198         private NonStandardTimeslotCreationMode() { }
199 
200         /**
201          * Returns a value based on the string provided.  If the provided string is null or a match cannot be found,
202          * will return {@link org.kuali.student.enrollment.class2.courseoffering.dto.ActivityOfferingWrapper.NonStandardTimeslotCreationMode#NEEDS_APPROVAL}
203          *
204          * @param text
205          * @return {@link org.kuali.student.enrollment.class2.courseoffering.dto.ActivityOfferingWrapper.NonStandardTimeslotCreationMode}
206          */
207         public static NonStandardTimeslotCreationMode fromString( String text ) {
208             if( text != null ) {
209                 for( NonStandardTimeslotCreationMode m : NonStandardTimeslotCreationMode.values() ) {
210                     if( text.equalsIgnoreCase( m.name() ) ) {
211                         return m;
212                     }
213                 }
214             }
215             return NonStandardTimeslotCreationMode.NEEDS_APPROVAL;
216         }
217 
218     }
219 
220     public ActivityOfferingWrapper(){
221         aoInfo = new ActivityOfferingInfo();
222         instructors = new ArrayList<OfferingInstructorWrapper>();
223         OfferingInstructorWrapper instructorWrapper = new OfferingInstructorWrapper();
224         instructors.add(instructorWrapper);
225         seatpools = new ArrayList<SeatPoolWrapper>();
226         populationsForSPValidation = new ArrayList<PopulationInfo>();
227         aoInfo.setStateKey(LuiServiceConstants.LUI_AO_STATE_DRAFT_KEY);
228         aoInfo.setTypeKey(LuiServiceConstants.LECTURE_ACTIVITY_OFFERING_TYPE_KEY);
229         formatOffering = new FormatOfferingInfo();
230         term = new TermInfo();
231         scheduleComponentWrappers = new ArrayList<ScheduleComponentWrapper>();
232         this.setReadOnlyView(false);
233         this.setIsChecked(false);
234         actualScheduleComponents = new ArrayList<ScheduleWrapper>();
235         requestedScheduleComponents = new ArrayList<ScheduleWrapper>();
236         newScheduleRequest = new ScheduleWrapper();
237         colocatedActivities = new ArrayList<ColocatedActivity>();
238         maxEnrollmentShared = true;
239         editRenderHelper = new EditRenderHelper();
240         deletedScheduleComponents = new ArrayList<ScheduleWrapper>();
241         courseWaitListInfo = new CourseWaitListInfo();
242         hasWaitlist = false;
243         hasWaitlistCO = false;
244         limitWaitlistSize = false;
245         startTime = new ArrayList<String>();
246         endTime = new ArrayList<String>();
247         weekDays = new ArrayList<String>();
248         isSendRDLsToSchedulerAfterMSE = true;
249     }
250 
251     public ActivityOfferingWrapper(ActivityOfferingInfo info){
252         this(info,false);
253     }
254 
255     public ActivityOfferingWrapper(ActivityOfferingInfo info,boolean isCentralSchedulingCoOrdinator){
256         this();
257         aoInfo = info;
258         instructors = new ArrayList<OfferingInstructorWrapper>();
259         if(info.getInstructors() == null || info.getInstructors().isEmpty()) {
260             OfferingInstructorWrapper instructorWrapper = new OfferingInstructorWrapper();
261             instructors.add(instructorWrapper);
262         } else if(info.getInstructors().size() > 0) {
263             for(OfferingInstructorInfo instructorInfo : info.getInstructors()) {
264                 OfferingInstructorWrapper instructorWrapper = new OfferingInstructorWrapper(instructorInfo);
265                 if (instructorInfo.getPercentageEffort() != null) {
266                     instructorWrapper.setsEffort(Integer.toString(instructorInfo.getPercentageEffort().intValue()));
267                 }
268                 instructors.add(instructorWrapper);
269             }
270         }
271         seatpools = new ArrayList<SeatPoolWrapper>();
272         populationsForSPValidation = new ArrayList<PopulationInfo>();
273         startTime = new ArrayList<String>();
274         endTime = new ArrayList<String>();
275         weekDays = new ArrayList<String>();
276         this.isCentralSchedulingCoOrdinator = isCentralSchedulingCoOrdinator;
277     }
278 
279     public String getAoClusterName() {
280         return aoClusterName;
281     }
282 
283     public void setAoClusterName(String aoClusterName) {
284         this.aoClusterName = aoClusterName;
285     }
286 
287     public String getAoClusterID() {
288         return aoClusterID;
289     }
290 
291     public void setAoClusterID(String aoClusterID) {
292         this.aoClusterID = aoClusterID;
293     }
294 
295     public boolean isEnableApproveButton() {
296         return enableApproveButton;
297     }
298 
299     public void setEnableApproveButton(boolean enableApproveButton) {
300         this.enableApproveButton = enableApproveButton;
301     }
302 
303     public boolean isEnableDraftButton() {
304         return enableDraftButton;
305     }
306 
307     public void setEnableDraftButton(boolean enableDraftButton) {
308         this.enableDraftButton = enableDraftButton;
309     }
310 
311     public boolean isEnableSuspendButton() {
312         return enableSuspendButton;
313     }
314 
315     public void setEnableSuspendButton(boolean enableSuspendButton) {
316         this.enableSuspendButton = enableSuspendButton;
317     }
318 
319     public boolean isEnableCancelButton() {
320         return enableCancelButton;
321     }
322 
323     public void setEnableCancelButton(boolean enableCancelButton) {
324         this.enableCancelButton = enableCancelButton;
325     }
326 
327     public boolean isEnableMoveToButton() {
328         return enableMoveToButton;
329     }
330 
331     public void setEnableMoveToButton(boolean enableMoveToButton) {
332         this.enableMoveToButton = enableMoveToButton;
333     }
334 
335     public boolean isEnableReinstateButton() {
336         return enableReinstateButton;
337     }
338 
339     public void setEnableReinstateButton(boolean enableReinstateButton) {
340         this.enableReinstateButton = enableReinstateButton;
341     }
342 
343     public boolean isEnableDeleteButton() {
344         return enableDeleteButton;
345     }
346 
347     public void setEnableDeleteButton(boolean enableDeleteButton) {
348         this.enableDeleteButton = enableDeleteButton;
349     }
350 
351     public boolean isEnableCopyAOActionLink() {
352         return enableCopyAOActionLink;
353     }
354 
355     public void setEnableCopyAOActionLink(boolean enableCopyAOActionLink) {
356         this.enableCopyAOActionLink = enableCopyAOActionLink;
357     }
358 
359     public boolean isEnableEditAOActionLink() {
360         return enableEditAOActionLink;
361     }
362 
363     public void setEnableEditAOActionLink(boolean enableEditAOActionLink) {
364         this.enableEditAOActionLink = enableEditAOActionLink;
365     }
366 
367     public String getCourseOfferingCode() {
368         return courseOfferingCode;
369     }
370 
371     public void setCourseOfferingCode(String courseOfferingCode) {
372         this.courseOfferingCode = courseOfferingCode;
373     }
374 
375     public String courseOfferingTitle;
376     public void setCourseOfferingTitle(String courseOfferingTitle) {
377         this.courseOfferingTitle = courseOfferingTitle;
378     }
379 
380     public String getCourseOfferingTitle() {
381         return courseOfferingTitle;
382     }
383 
384     private String credits = "";
385     public String getCredits() {
386         return credits;
387     }
388 
389     public void setCredits(String credits) {
390         this.credits = credits;
391     }
392 
393     private String activityCode = "";
394 
395     public String getActivityCode() {
396         return activityCode;
397     }
398 
399     public void setActivityCode(String activityCode) {
400         this.activityCode = activityCode;
401     }
402 
403     /**
404      * This method returns whether editing of the activity code is allowed or not.
405      * This method reads the configuration property <code>kuali.ks.enrollment.options.edit-activity-offering-code-allowed</code>
406      * and returns it's value (true/false). This is to allow the institutional configuration to decide whether the users
407      * should be allowed to edit the activity code.
408      *
409      * The default is to allow the user to edit the activity code.
410      *
411      * @return boolean based on the configured property
412      */
413     public boolean isEditActivityCodeAllowed() {
414         if( "false".equalsIgnoreCase( ConfigContext.getCurrentContextConfig().getProperty( CourseOfferingConstants.CONFIG_PARAM_KEY_EDIT_ACTIVITY_CODE ) ) ) {
415             return false;
416         }
417 
418         return true;
419     }
420 
421     /**
422      * This method returns the allowed creation-mode of non-standard time-slots.
423      * This method reads the configuration property <code>kuali.ks.enrollment.timeslots.adhoc_creation_mode</code> and
424      * returns it's value (ALLOWED, NOT_ALLOWED, NEEDS_APPROVAL).  This is to allow the institutional configuration to
425      * decide whether or not users should be allowed to create non-standard time-slots.
426      *
427      * The default is to allow the user to create non-standard time-slots, but only with prior approval.
428      *
429      * @return {@link org.kuali.student.enrollment.class2.courseoffering.dto.ActivityOfferingWrapper.NonStandardTimeslotCreationMode}
430      */
431     public NonStandardTimeslotCreationMode getNonStandardTimeslotCreationMode() {
432         String contextConfigProp = ConfigContext.getCurrentContextConfig().getProperty( ActivityOfferingConstants.ConfigProperties.NON_STANDARD_TIMESLOT_CREATION_MODE);
433         return NonStandardTimeslotCreationMode.fromString(contextConfigProp);
434     }
435 
436     public boolean getCanNonStandardTimeslotsBeApproved() {
437         switch( getNonStandardTimeslotCreationMode() ) {
438             case NEEDS_APPROVAL:
439                 return true;
440             default:
441                 return false;
442 
443         }
444     }
445 
446     private String abbreviatedCourseType = "";
447 
448     public String getAbbreviatedCourseType() {
449         return abbreviatedCourseType;
450     }
451 
452     public void setAbbreviatedCourseType(String abbreviatedCourseType) {
453         this.abbreviatedCourseType= abbreviatedCourseType;
454     }
455 
456     public String getTermDisplayString() {
457         return termDisplayString;
458     }
459 
460     public void setTermDisplayString(String termDisplayString) {
461         this.termDisplayString = termDisplayString;
462     }
463 
464     public String getToolTipText() {
465         return toolTipText;
466     }
467 
468     public void setToolTipText(String toolTipText) {
469         this.toolTipText = toolTipText;
470     }
471 
472     public String getWaitListText() {
473         return waitListText;
474     }
475 
476     public void setWaitListText(String waitListText) {
477         this.waitListText = waitListText;
478     }
479 
480     public String getTbaDisplayName() {
481         return tbaDisplayName;
482     }
483 
484     public void setTbaDisplayName(boolean tba,boolean appendForDisplay) {
485         if (appendForDisplay){
486             tbaDisplayName =  tbaDisplayName + "<br>" + (tba ? "TBA" : StringUtils.EMPTY);
487         } else {
488             tbaDisplayName = StringUtils.EMPTY;
489             if (tba){
490                 tbaDisplayName =  "TBA";
491             }
492         }
493     }
494 
495     public FormatOfferingInfo getFormatOffering() {
496         return formatOffering;
497     }
498 
499     public void setFormatOffering(FormatOfferingInfo formatOffering) {
500         this.formatOffering = formatOffering;
501     }
502 
503     public TermInfo getTerm() {
504         return term;
505     }
506 
507     public void setTerm(TermInfo term) {
508         this.term = term;
509     }
510 
511     public String getTermId(){
512         if (term != null){
513             return term.getId();
514         }
515         return StringUtils.EMPTY;
516     }
517 
518     public ActivityOfferingInfo getAoInfo() {
519         return aoInfo;
520     }
521 
522     public void setAoInfo(ActivityOfferingInfo aoInfo) {
523         this.aoInfo = aoInfo;
524     }
525 
526     public List<ScheduleComponentWrapper> getScheduleComponentWrappers() {
527         return scheduleComponentWrappers;
528     }
529 
530     public void setScheduleComponentWrappers(List<ScheduleComponentWrapper> scheduleComponentWrappers) {
531         this.scheduleComponentWrappers = scheduleComponentWrappers;
532     }
533 
534     public boolean getReadOnlyView() {
535         return readOnlyView;
536     }
537 
538     public void setReadOnlyView(boolean readOnlyView) {
539         this.readOnlyView = readOnlyView;
540     }
541 
542     public boolean getIsChecked() {
543         return isChecked;
544     }
545 
546     public void setIsChecked(boolean checked) {
547         this.isChecked = checked;
548     }
549 
550     public boolean getIsCheckedByCluster() {
551         return isCheckedByCluster;
552     }
553 
554     public void setIsCheckedByCluster(boolean checkedByCluster) {
555         isCheckedByCluster = checkedByCluster;
556     }
557 
558     public String getScheduledState() {
559         return scheduledState;
560     }
561 
562     public void setScheduledState(String scheduledState) {
563         this.scheduledState = scheduledState;
564     }
565 
566     public void setScheduledState(String scheduledState,boolean appendForDisplay) {
567         if (appendForDisplay){
568             this.scheduledState = this.scheduledState + "<br>" + StringUtils.defaultString(scheduledState);
569         }else{
570             this.scheduledState = StringUtils.defaultString(scheduledState);
571         }
572     }
573     public void setScheduledState(String scheduledState,boolean appendForDisplay, String dlTypeClass) {
574         String cssClass = "";
575         if(!StringUtils.isEmpty(dlTypeClass)){
576             cssClass = "class=\"" + dlTypeClass + "\"";
577         }
578         if(StringUtils.isEmpty(this.scheduledState)){
579             appendForDisplay = false;
580         }
581         if (appendForDisplay){
582             this.scheduledState = this.scheduledState + "<br><span " + cssClass + " >" + scheduledState + "</span>";
583         }else{
584             this.scheduledState = "<span " + cssClass + " >" + scheduledState + "</span>";
585         }
586     }
587 
588     public String getStateName() {
589         return stateName;
590     }
591 
592     public void setStateName(String stateName) {
593         this.stateName = stateName;
594     }
595 
596     public String getTypeName() {
597         return typeName;
598     }
599 
600     public void setTypeName(String typeName) {
601         this.typeName = typeName;
602     }
603 
604     public String getCourseOfferingId() {
605         return courseOfferingId;
606     }
607 
608     public void setCourseOfferingId(String courseOfferingId) {
609         this.courseOfferingId = courseOfferingId;
610     }
611 
612     public List<OfferingInstructorWrapper> getInstructors() {
613         return instructors;
614     }
615 
616     public void setInstructors(List<OfferingInstructorWrapper> instructors) {
617         this.instructors = instructors;
618     }
619 
620     public List<SeatPoolWrapper> getSeatpools() {
621         return seatpools;
622     }
623 
624     public void setSeatpools(List<SeatPoolWrapper> seatpools) {
625         this.seatpools = seatpools;
626     }
627 
628     public List<PopulationInfo> getPopulationsForSPValidation() {
629         return populationsForSPValidation;
630     }
631 
632     public void setPopulationsForSPValidation(List<PopulationInfo> populationsForSPValidation) {
633         this.populationsForSPValidation = populationsForSPValidation;
634     }
635 
636     public String getFirstInstructorDisplayName() {
637         return firstInstructorDisplayName;
638     }
639 
640     public void setFirstInstructorDisplayName(String firstInstructorDisplayName) {
641         this.firstInstructorDisplayName = firstInstructorDisplayName;
642     }
643 
644     public String getId() {
645         return aoInfo.getId();
646     }
647 
648     public void setId(String id) {
649         aoInfo.setId(id);
650     }
651 
652     public String getTermName() {
653         return termName;
654     }
655 
656     public void setTermName(String termName) {
657         this.termName = termName;
658     }
659 
660     public String getFormatOfferingName() {
661         return formatOfferingName;
662     }
663 
664     public void setFormatOfferingName(String formatOfferingName) {
665         this.formatOfferingName = formatOfferingName;
666     }
667 
668     public String getIsMaxEnrollmentEstimateUI(){
669         return StringUtils.capitalize(BooleanUtils.toStringYesNo(aoInfo.getIsMaxEnrollmentEstimate()));
670     }
671 
672     public String getIsEvaluatedUI(){
673         return StringUtils.capitalize(BooleanUtils.toStringYesNo(aoInfo.getIsEvaluated()));
674     }
675 
676     public String getIsHonorsOfferingUI(){
677         return StringUtils.capitalize(BooleanUtils.toStringYesNo(aoInfo.getIsHonorsOffering()));
678     }
679 
680     public String getInstructorNameHighestPercentEffort() {
681         return instructorNameHighestPercentEffort;
682     }
683 
684     public void setInstructorNameHighestPercentEffort(String instructorNameHighestPercentEffort) {
685         this.instructorNameHighestPercentEffort = instructorNameHighestPercentEffort;
686     }
687 
688     public boolean isLegalToDelete() {
689         if (StringUtils.equals(aoInfo.getStateKey(), LuiServiceConstants.LUI_AO_STATE_DRAFT_KEY) ||
690                 StringUtils.equals(aoInfo.getStateKey(), LuiServiceConstants.LUI_AO_STATE_APPROVED_KEY) ||
691                 StringUtils.equals(aoInfo.getStateKey(), LuiServiceConstants.LUI_AO_STATE_SUBMITTED_KEY) ||
692                 StringUtils.equals(aoInfo.getStateKey(), LuiServiceConstants.LUI_AO_STATE_OFFERED_KEY) ||
693                 StringUtils.equals(aoInfo.getStateKey(), LuiServiceConstants.LUI_CO_STATE_OFFERED_KEY) ) {
694             return true;
695         }
696         return false;
697     }
698 
699     public List<ScheduleWrapper> getActualScheduleComponents() {
700         if (actualScheduleComponents == null){
701             actualScheduleComponents = new ArrayList<ScheduleWrapper>();
702         }
703         return actualScheduleComponents;
704     }
705 
706     public void setActualScheduleComponents(List<ScheduleWrapper> actualScheduleComponents) {
707         this.actualScheduleComponents = actualScheduleComponents;
708     }
709 
710     public List<ScheduleWrapper> getRequestedScheduleComponents() {
711         if (requestedScheduleComponents == null){
712             requestedScheduleComponents = new ArrayList<ScheduleWrapper>();
713         }
714         return requestedScheduleComponents;
715     }
716 
717     public void setRequestedScheduleComponents(List<ScheduleWrapper> requestedScheduleComponents) {
718         this.requestedScheduleComponents = requestedScheduleComponents;
719     }
720 
721     public List<ScheduleWrapper> getDeletedScheduleComponents() {
722         return deletedScheduleComponents;
723     }
724 
725     public void setDeletedScheduleComponents(List<ScheduleWrapper> deletedScheduleComponents) {
726         this.deletedScheduleComponents = deletedScheduleComponents;
727     }
728 
729     public ScheduleWrapper getNewScheduleRequest() {
730         return newScheduleRequest;
731     }
732 
733     public void setNewScheduleRequest(ScheduleWrapper newScheduleRequest) {
734         this.newScheduleRequest = newScheduleRequest;
735     }
736 
737     public boolean isRequestedScheduleComponentsRecentlyEmpty() {
738         boolean haveNoRequesteds = ( this.requestedScheduleComponents == null || this.requestedScheduleComponents.isEmpty() ) ? true : false;
739         boolean haveSomeDeleteds = ( this.deletedScheduleComponents != null && !this.deletedScheduleComponents.isEmpty() ) ? true : false;
740 
741         return haveNoRequesteds && haveSomeDeleteds;
742     }
743 
744     public String getStartTimeDisplay() {
745         return startTimeDisplay;
746     }
747 
748     public void setStartTimeDisplay(String startTimeDisplay,boolean appendForDisplay) {
749         if (appendForDisplay){
750             this.startTimeDisplay = this.startTimeDisplay + "<br>" + StringUtils.defaultString(startTimeDisplay);
751         }else{
752             this.startTimeDisplay = StringUtils.defaultString(startTimeDisplay);
753         }
754 
755     }
756 
757     public void setStartTimeDisplay(String startTimeDisplay, boolean appendForDisplay, String dlTypeClass) {
758         String cssClass = "";
759         if(!StringUtils.isEmpty(dlTypeClass)){
760             cssClass = "class=\"" + dlTypeClass + "\"";
761         }
762         if(StringUtils.isEmpty(this.startTimeDisplay)){
763             appendForDisplay = false;
764         }
765         if (appendForDisplay){
766             this.startTimeDisplay = this.startTimeDisplay + "<br><span " + cssClass + " >" + startTimeDisplay + "</span>";
767         }else{
768             this.startTimeDisplay = "<span " + cssClass + " >" + startTimeDisplay + "</span>";
769         }
770     }
771 
772     public String getInstructorDisplayNames() {
773         return instructorDisplayNames;
774     }
775 
776     public void setInstructorDisplayNames(String instructorDisplayNames) {
777         this.instructorDisplayNames = instructorDisplayNames;
778     }
779 
780     public void setInstructorDisplayNames(String instructorDisplayNames,boolean appendForDisplay) {
781         if (appendForDisplay && this.instructorDisplayNames!=null){
782             this.instructorDisplayNames = this.instructorDisplayNames + "<br>" + StringUtils.defaultString(instructorDisplayNames);
783         }else{
784             this.instructorDisplayNames = StringUtils.defaultString(instructorDisplayNames);
785         }
786 
787     }
788 
789     public String getEndTimeDisplay() {
790         return endTimeDisplay;
791     }
792 
793     public void setEndTimeDisplay(String endTimeDisplay,boolean appendForDisplay) {
794         if (appendForDisplay){
795             this.endTimeDisplay = this.endTimeDisplay + "<br>" + StringUtils.defaultString(endTimeDisplay);
796         }else{
797             this.endTimeDisplay = StringUtils.defaultString(endTimeDisplay);
798         }
799     }
800 
801     public void setEndTimeDisplay(String endTimeDisplay,boolean appendForDisplay, String dlTypeClass) {
802         String cssClass = "";
803         if(!StringUtils.isEmpty(dlTypeClass)){
804             cssClass = "class=\"" + dlTypeClass + "\"";
805         }
806         if(StringUtils.isEmpty(this.endTimeDisplay)){
807             appendForDisplay = false;
808         }
809         if (appendForDisplay){
810             this.endTimeDisplay = this.endTimeDisplay + "<br><span " + cssClass + " >" + endTimeDisplay + "</span>";
811         }else{
812             this.endTimeDisplay = "<span " + cssClass + " >" + endTimeDisplay + "</span>";
813         }
814     }
815 
816     public String getDaysDisplayName() {
817         return daysDisplayName;
818     }
819 
820     public void setDaysDisplayName(String daysDisplayName,boolean appendForDisplay) {
821         if (appendForDisplay){
822             this.daysDisplayName = this.daysDisplayName + "<br>" + StringUtils.defaultString(daysDisplayName);
823         }else{
824             this.daysDisplayName = StringUtils.defaultString(daysDisplayName);
825         }
826     }
827 
828     public void setDaysDisplayName(String daysDisplayName,boolean appendForDisplay, String dlTypeClass) {
829         String cssClass = "";
830         if(!StringUtils.isEmpty(dlTypeClass)){
831             cssClass = "class=\"" + dlTypeClass + "\"";
832         }
833         if(StringUtils.isEmpty(this.daysDisplayName)){
834             appendForDisplay = false;
835         }
836         if (appendForDisplay){
837             this.daysDisplayName = this.daysDisplayName + "<br><span " + cssClass + " >" + daysDisplayName + "</span>";
838         }else{
839             this.daysDisplayName = "<span " + cssClass + " >" + daysDisplayName + "</span>";
840         }
841     }
842 
843     public List<String> getStartTime() {
844         return startTime;
845     }
846 
847     public void setStartTime(List<String> startTime) {
848         this.startTime = startTime;
849     }
850 
851     public List<String> getEndTime() {
852         return endTime;
853     }
854 
855     public void setEndTime(List<String> endTime) {
856         this.endTime = endTime;
857     }
858 
859     public List<String> getWeekDays() {
860         return weekDays;
861     }
862 
863     public void setWeekDays(List<String> weekDays) {
864         this.weekDays = weekDays;
865     }
866 
867     public String getBuildingName() {
868         return buildingName;
869     }
870 
871     public void setBuildingName(String buildingName,boolean appendForDisplay) {
872         if (appendForDisplay){
873             this.buildingName = this.buildingName + "<br>" + StringUtils.defaultString(buildingName);
874         }else{
875             this.buildingName = StringUtils.defaultString(buildingName);
876         }
877     }
878     public void setBuildingName(String buildingName,boolean appendForDisplay, String dlTypeClass) {
879         String cssClass = "";
880         if(!StringUtils.isEmpty(dlTypeClass)){
881             cssClass = "class=\"" + dlTypeClass + "\"";
882         }
883         if(StringUtils.isEmpty(this.buildingName)){
884             appendForDisplay = false;
885         }
886         if (appendForDisplay){
887             this.buildingName = this.buildingName + "<br><span " + cssClass + " >" + buildingName + "</span>";
888         }else{
889             this.buildingName = "<span " + cssClass + " >" + buildingName + "</span>";
890         }
891     }
892 
893     public String getBldgCodeSimple() {
894         return bldgCodeSimple;
895     }
896 
897     public void setBldgCodeSimple(String buildingCode, String buildingName, String dlTypeClass) {
898         String cssClass = "";
899         boolean  appendForDisplay = true;
900         if(!StringUtils.isEmpty(dlTypeClass)){
901             cssClass = "class=\"" + dlTypeClass + "\"";
902         }
903         if(StringUtils.isEmpty(this.bldgCodeSimple)){
904             appendForDisplay = false;
905         } else {
906             appendForDisplay = true;
907         }
908         String underlineCssClass = "<span" + cssClass + "style=\"border-bottom: 1px dotted\">";
909 
910         String BldgCodeMark = underlineCssClass + buildingCode + "</span>";
911         if (appendForDisplay){
912             this.bldgCodeSimple = this.bldgCodeSimple + "<br>" + BldgCodeMark;
913         }else{
914             this.bldgCodeSimple = BldgCodeMark;
915         }
916     }
917 
918     public void setBldgCodeSimple(String bldgCodeSimple) {
919         this.bldgCodeSimple = bldgCodeSimple;
920     }
921 
922     public String getBuildingCode() {
923         return buildingCode;
924     }
925 
926     public void setBuildingCode(String buildingCode, boolean appendForDisplay) {
927         String cssClass = "style=\"border-bottom: 1px dotted;\"";
928         if (appendForDisplay){
929             this.buildingCode = this.buildingCode + "<br><span " + cssClass + " >" + StringUtils.defaultString(buildingCode) + "</span>";
930         }else{
931             this.buildingCode = "<span " + cssClass + " >" + StringUtils.defaultString(buildingCode) + "</span>";
932         }
933     }
934 
935     public void setBuildingCode(String buildingCode, boolean appendForDisplay, String dlTypeClass) {
936 
937         String cssClass = "";
938         if(!StringUtils.isEmpty(dlTypeClass)){
939             cssClass = "style=\"border-bottom: 1px dotted\"";
940         }
941         if(StringUtils.isEmpty(buildingCode)){
942             appendForDisplay = false;
943         }
944         if (appendForDisplay){
945             this.buildingCode = this.buildingCode + "<br><span " + cssClass + " class=\"" + dlTypeClass + "\""+ " >" + buildingCode + "</span>";
946         }else{
947             this.buildingCode = "<span " + cssClass + " class=\"" + dlTypeClass + "\""+ " >" + buildingCode + "</span>";
948         }
949     }
950 
951     public String getRoomName() {
952         return roomName;
953     }
954 
955     public void setRoomName(String roomName,boolean appendForDisplay) {
956         if (appendForDisplay){
957             this.roomName = this.roomName + "<br>" + StringUtils.defaultString(roomName);
958         }else{
959             this.roomName = StringUtils.defaultString(roomName);
960         }
961     }
962     public void setRoomName(String roomName,boolean appendForDisplay, String dlTypeClass) {
963         String cssClass = "";
964         if(!StringUtils.isEmpty(dlTypeClass)){
965             cssClass = "class=\"" + dlTypeClass + "\"";
966         }
967         if(StringUtils.isEmpty(this.roomName)){
968             appendForDisplay = false;
969         }
970         if (appendForDisplay){
971             this.roomName = this.roomName + "<br><span " + cssClass + " >" + roomName + "</span>";
972         }else{
973             this.roomName = "<span " + cssClass + " >" + roomName + "</span>";
974         }
975     }
976 
977     public String getTypeKey() {
978         return typeKey;
979     }
980 
981     public void setTypeKey(String typeKey) {
982         this.typeKey = typeKey;
983     }
984 
985     public boolean isSendRDLsToSchedulerAfterMSE() {
986         return isSendRDLsToSchedulerAfterMSE;
987     }
988 
989     public void setSendRDLsToSchedulerAfterMSE(boolean sendRDLsToSchedulerAfterMSE) {
990         isSendRDLsToSchedulerAfterMSE = sendRDLsToSchedulerAfterMSE;
991     }
992 
993     public boolean isSchedulesModified() {
994        return schedulesModified;
995     }
996 
997     public void setSchedulesModified(boolean schedulesModified) {
998        this.schedulesModified = schedulesModified;
999     }
1000 
1001     public SocInfo getSocInfo() {
1002         return socInfo;
1003     }
1004 
1005     public void setSocInfo(SocInfo socInfo) {
1006         this.socInfo = socInfo;
1007     }
1008 
1009     public String getAdminOrg(){
1010         return adminOrg;
1011     }
1012     public void setAdminOrg(String adminOrg){
1013         this.adminOrg=adminOrg;
1014     }
1015 
1016     public Date getTermRegStartDate() {
1017         return termRegStartDate;
1018     }
1019 
1020     public void setTermRegStartDate(Date termRegStartDate) {
1021         this.termRegStartDate = termRegStartDate;
1022     }
1023 
1024     public CourseInfo getCourse() {
1025         return course;
1026     }
1027 
1028     public void setCourse(CourseInfo course) {
1029         this.course = course;
1030     }
1031 
1032     public String getColocatedAoInfo() {
1033         return colocatedAoInfo;
1034     }
1035 
1036     public void setColocatedAoInfo(String colocatedAoInfo) {
1037         this.colocatedAoInfo = colocatedAoInfo;
1038     }
1039 
1040     public String getPopulationsJSONString() {
1041         return populationsJSONString;
1042     }
1043 
1044     public void setPopulationsJSONString(String populationsJSONString) {
1045         this.populationsJSONString = populationsJSONString;
1046     }
1047 
1048     /**
1049      * This method returns a list of comma seperated alternate course codes.
1050      * This is used in create and edit course offerings screen.
1051      * @return
1052      */
1053     public String getCrossListedCourseCodes(){
1054         return crossListedCourseCodes;
1055     }
1056 
1057     public void setCrossListedCourseCodes(String crossListedCourseCodes) {
1058         this.crossListedCourseCodes = crossListedCourseCodes;
1059     }
1060 
1061     /**
1062      * @see #setColocatedAO(boolean)
1063      * @return
1064      */
1065     public boolean isColocatedAO() {
1066         return colocatedAO;
1067     }
1068 
1069     /**
1070      * Whether this AO is part of a colocated set
1071      *
1072      * @param colocatedAO
1073      */
1074     public void setColocatedAO(boolean colocatedAO) {
1075         this.colocatedAO = colocatedAO;
1076     }
1077 
1078     public List<ColocatedActivity> getColocatedActivities() {
1079         return colocatedActivities;
1080     }
1081 
1082     public void setColocatedActivities(List<ColocatedActivity> colocatedActivities) {
1083         this.colocatedActivities = colocatedActivities;
1084     }
1085 
1086     public boolean isMaxEnrollmentShared() {
1087         return maxEnrollmentShared;
1088     }
1089 
1090     public void setMaxEnrollmentShared(boolean maxEnrollmentShared) {
1091         this.maxEnrollmentShared = maxEnrollmentShared;
1092     }
1093 
1094     public boolean getHiddenMaxEnrollmentShared(){
1095         return maxEnrollmentShared;
1096     }
1097 
1098     public int getSharedMaxEnrollment() {
1099         return sharedMaxEnrollment;
1100     }
1101 
1102     public void setSharedMaxEnrollment(int sharedMaxEnrollment) {
1103         this.sharedMaxEnrollment = sharedMaxEnrollment;
1104     }
1105 
1106     public boolean getHasSeatpools() {
1107         return hasSeatpools;
1108     }
1109 
1110     public void setHasSeatpools(boolean hasSeatpools) {
1111         this.hasSeatpools = hasSeatpools;
1112     }
1113 
1114     public ScheduleRequestSetInfo getScheduleRequestSetInfo() {
1115         return scheduleRequestSetInfo;
1116     }
1117 
1118     public void setScheduleRequestSetInfo(ScheduleRequestSetInfo scheduleRequestSetInfo) {
1119         this.scheduleRequestSetInfo = scheduleRequestSetInfo;
1120     }
1121 
1122     /**
1123      * This method return a colocated AO code for current course. This will
1124      * be displayed as the tooltip (if colocated AO exists) at manage and delete AO screen.
1125      *
1126      * @return
1127      */
1128     @SuppressWarnings("unused")
1129     public String getColocatedAoInfoUI(){
1130         //JIRA FIX : KSENROLL-8731 - Replaced StringBuffer with StringBuilder
1131         StringBuilder sb = new StringBuilder();
1132         sb.append("This activity is colocated with:<br>");
1133         sb.append(colocatedAoInfo + "<br>");
1134 
1135         return StringUtils.removeEnd(sb.toString(),"<br>");
1136     }
1137 
1138     public String getActivityOfferingScheduleingStateKey() {
1139         boolean asiExempt = false;
1140         boolean rsiExempt = false;
1141         if (!this.actualScheduleComponents.isEmpty()) {
1142             for (ScheduleWrapper actualScheduleComponent : this.actualScheduleComponents) {
1143                 if (!actualScheduleComponent.isTba()) {
1144                     return LuiServiceConstants.LUI_AO_SCHEDULING_STATE_SCHEDULED_KEY;
1145                 }
1146             }
1147             asiExempt = true;
1148         }
1149         if (!this.requestedScheduleComponents.isEmpty()) {
1150             for (ScheduleWrapper requestedScheduleComponent : this.requestedScheduleComponents) {
1151                 if (!requestedScheduleComponent.isTba()) {
1152                     return LuiServiceConstants.LUI_AO_SCHEDULING_STATE_UNSCHEDULED_KEY;
1153                 }
1154             }
1155             rsiExempt = true;
1156         }
1157 
1158         if (asiExempt || rsiExempt) {
1159             return LuiServiceConstants.LUI_AO_SCHEDULING_STATE_EXEMPT_KEY;
1160         } else {
1161             return LuiServiceConstants.LUI_AO_SCHEDULING_STATE_UNSCHEDULED_KEY;
1162         }
1163     }
1164 
1165     public boolean isPartOfColoSetOnLoadAlready() {
1166         return isPartOfColoSetOnLoadAlready;
1167     }
1168 
1169     public void setPartOfColoSetOnLoadAlready(boolean isPartOfColoSetOnLoadAlready) {
1170         this.isPartOfColoSetOnLoadAlready = isPartOfColoSetOnLoadAlready;
1171     }
1172 
1173     public boolean isColocatedOnLoadAlready() {
1174         return isColocatedOnLoadAlready;
1175     }
1176 
1177     public void setColocatedOnLoadAlready(boolean colocatedOnLoadAlready) {
1178         isColocatedOnLoadAlready = colocatedOnLoadAlready;
1179     }
1180 
1181     public boolean isSchedulingCompleted(){
1182         if (getSocInfo() != null){
1183             if (StringUtils.equals(CourseOfferingSetServiceConstants.SOC_SCHEDULING_STATE_COMPLETED,getSocInfo().getSchedulingStateKey())){
1184                 return true;
1185             }
1186         }
1187         return false;
1188     }
1189 
1190     public CourseOfferingContextBar getContextBar() {
1191         return contextBar;
1192     }
1193 
1194     public void setContextBar(CourseOfferingContextBar contextBar) {
1195         this.contextBar = contextBar;
1196     }
1197 
1198     /**
1199      * Returns the Edit Helper.
1200      *
1201      * @return
1202      */
1203     public EditRenderHelper getEditRenderHelper() {
1204         return editRenderHelper;
1205     }
1206 
1207     public SchOfClassesRenderHelper getSchOfClassesRenderHelper() {
1208         return schOfClassesRenderHelper;
1209     }
1210 
1211     public void setSchOfClassesRenderHelper(SchOfClassesRenderHelper schOfClassesRenderHelper) {
1212         this.schOfClassesRenderHelper = schOfClassesRenderHelper;
1213     }
1214 
1215     /**
1216      * Helper to render the colocated activites in Edit AO screen.
1217      */
1218     public class EditRenderHelper implements Serializable {
1219 
1220         private List<ColocatedActivity> manageSeperateEnrollmentList;
1221 
1222         private boolean scheduleEditInProgress;
1223         private boolean isPersistedRDLsExists;
1224         private String selectedAO;
1225 
1226         private String prevAOTypeName;
1227         private String nextAOTypeName;
1228 
1229         private ActivityOfferingInfo prevAO;
1230         private ActivityOfferingInfo nextAO;
1231 
1232         private List<KeyValue> aoCodes;
1233 
1234         public EditRenderHelper(){
1235             manageSeperateEnrollmentList = new ArrayList<ColocatedActivity>();
1236             aoCodes = new ArrayList<KeyValue>();
1237         }
1238 
1239         /**
1240          * @see #setManageSeperateEnrollmentList(java.util.List)
1241          * @return
1242          */
1243         public List<ColocatedActivity> getManageSeperateEnrollmentList() {
1244             return manageSeperateEnrollmentList;
1245         }
1246 
1247         /**
1248          * If the user is going to manage the enrollment list seperately for each activity offerings in a
1249          * cross listed set, this list is used to display that section at the ui.
1250          *
1251          * It's just a seperate list but it holds the same reference elements from {@link #setColocatedActivities(java.util.List)} plus
1252          * the current AO.
1253          *
1254          * @param manageSeperateEnrollmentList
1255          */
1256         @SuppressWarnings("unused")
1257         public void setManageSeperateEnrollmentList(List<ColocatedActivity> manageSeperateEnrollmentList) {
1258             this.manageSeperateEnrollmentList = manageSeperateEnrollmentList;
1259         }
1260 
1261         public boolean isPersistedRDLsExists() {
1262             return isPersistedRDLsExists;
1263         }
1264 
1265         public void setPersistedRDLsExists(boolean persistedRDLsExists) {
1266             isPersistedRDLsExists = persistedRDLsExists;
1267         }
1268 
1269         public String getColocatedActivitiesAsString(){
1270             //JIRA FIX : KSENROLL-8731 - Replaced StringBuffer with StringBuilder
1271             StringBuilder sb = new StringBuilder();
1272             for (ColocatedActivity colo : getColocatedActivities()){
1273                 sb.append(colo.getEditRenderHelper().getCode() + ", ");
1274             }
1275             return StringUtils.stripEnd(sb.toString(),", ");
1276         }
1277 
1278         public boolean isScheduleEditInProgress() {
1279             return scheduleEditInProgress;
1280         }
1281 
1282         public void setScheduleEditInProgress(boolean scheduleEditInProgress) {
1283             this.scheduleEditInProgress = scheduleEditInProgress;
1284         }
1285 
1286         public String getSelectedAO() {
1287             return selectedAO;
1288         }
1289 
1290         public void setSelectedAO(String selectedAO) {
1291             this.selectedAO = selectedAO;
1292         }
1293 
1294 
1295         public List<KeyValue> getAoCodes() {
1296             return aoCodes;
1297         }
1298 
1299         public void setAoCodes(List<KeyValue> aoCodes) {
1300             this.aoCodes = aoCodes;
1301         }
1302 
1303         public ActivityOfferingInfo getPrevAO() {
1304             return prevAO;
1305         }
1306 
1307         public void setPrevAO(ActivityOfferingInfo prevAO) {
1308             this.prevAO = prevAO;
1309         }
1310 
1311         public ActivityOfferingInfo getNextAO() {
1312             return nextAO;
1313         }
1314 
1315         public void setNextAO(ActivityOfferingInfo nextAO) {
1316             this.nextAO = nextAO;
1317         }
1318 
1319         public String getPrevAOTypeName() {
1320             return prevAOTypeName;
1321         }
1322 
1323         public void setPrevAOTypeName(String prevAOTypeName) {
1324             this.prevAOTypeName = prevAOTypeName;
1325         }
1326 
1327         public String getNextAOTypeName() {
1328             return nextAOTypeName;
1329         }
1330 
1331         public void setNextAOTypeName(String nextAOTypeName) {
1332             this.nextAOTypeName = nextAOTypeName;
1333         }
1334 
1335     }
1336 
1337     /**
1338      * Model to handle all the ui elements needed at schedule of classes view
1339      */
1340     public class SchOfClassesRenderHelper implements Serializable {
1341 
1342         private String information;
1343 
1344         public SchOfClassesRenderHelper(){
1345 
1346         }
1347 
1348         public String getInformation() {
1349             return information;
1350         }
1351 
1352         public void setInformation(String information) {
1353             this.information = information;
1354         }
1355     }
1356 
1357     // subterms
1358     public String getSubTermName() {
1359         return subTermName;
1360     }
1361 
1362     public void setSubTermName(String subTermName) {
1363         this.subTermName = subTermName;
1364     }
1365 
1366     public boolean getHasSubTerms() {
1367         return hasSubTerms;
1368     }
1369 
1370     public void setHasSubTerms(boolean hasSubTerms) {
1371         this.hasSubTerms = hasSubTerms;
1372     }
1373 
1374     public String getSubTermId() {
1375         return subTermId;
1376     }
1377 
1378     public void setSubTermId(String subTermId) {
1379         this.subTermId = subTermId;
1380     }
1381 
1382     public String getTermStartEndDate() {
1383            return termStartEndDate;
1384     }
1385 
1386     public void setTermStartEndDate(String termStartEndDate) {
1387         this.termStartEndDate = termStartEndDate;
1388     }
1389 
1390     public String getSubTermDatesJsonString() {
1391         return subTermDatesJsonString;
1392     }
1393 
1394     public void setSubTermDatesJsonString(String subTermDatesJsonString) {
1395         this.subTermDatesJsonString = subTermDatesJsonString;
1396     }
1397 
1398     /**
1399      * @see #setRemovedFromColoSet(boolean)
1400      * @return true if the user breaks the colo set
1401      */
1402     public boolean isRemovedFromColoSet() {
1403         return isRemovedFromColoSet;
1404     }
1405 
1406     /**
1407      * This flag will be set when the user breaks the AO from the colo set.
1408      *
1409      * @param removedFromColoSet
1410      */
1411     public void setRemovedFromColoSet(boolean removedFromColoSet) {
1412         isRemovedFromColoSet = removedFromColoSet;
1413     }
1414 
1415     public boolean isHasRule() {
1416         return hasRule;
1417     }
1418 
1419     public void setHasRule(boolean hasRule) {
1420         this.hasRule = hasRule;
1421     }
1422 
1423     public CourseWaitListInfo getCourseWaitListInfo() {
1424         return courseWaitListInfo;
1425     }
1426 
1427     public void setCourseWaitListInfo(CourseWaitListInfo courseWaitListInfo) {
1428         this.courseWaitListInfo = courseWaitListInfo;
1429     }
1430 
1431     public boolean isHasWaitlist() {
1432         return hasWaitlist;
1433     }
1434 
1435     public void setHasWaitlist(boolean hasWaitlist) {
1436         this.hasWaitlist = hasWaitlist;
1437     }
1438 
1439     public boolean isHasWaitlistCO() {
1440         return hasWaitlistCO;
1441     }
1442 
1443     public void setHasWaitlistCO(boolean hasWaitlistCO) {
1444         this.hasWaitlistCO = hasWaitlistCO;
1445     }
1446 
1447     public String getReinstateStateName() {
1448         return reinstateStateName;
1449     }
1450 
1451     public void setReinstateStateName(String reinstateStateName) {
1452         this.reinstateStateName = reinstateStateName;
1453     }
1454 
1455     public boolean isLimitWaitlistSize() {
1456         return limitWaitlistSize;
1457     }
1458 
1459     public void setLimitWaitlistSize(boolean limitWaitlistSize) {
1460         this.limitWaitlistSize = limitWaitlistSize;
1461     }
1462 
1463     public String getWaitListType() {
1464         return waitListType;
1465     }
1466 
1467     public void setWaitListType(String waitListType) {
1468         this.waitListType = waitListType;
1469     }
1470 
1471     public String getWaitListTypeUI() {
1472         return waitListTypeUI;
1473     }
1474 
1475     public void setWaitListTypeUI(String waitListTypeUI) {
1476         this.waitListTypeUI = waitListTypeUI;
1477     }
1478 
1479     public String getRequisite() {
1480         return requisite;
1481     }
1482 
1483     public void setRequisite(String requisite) {
1484         this.requisite = requisite;
1485     }
1486 
1487     public String getViewId() {
1488         return viewId;
1489     }
1490 
1491     public void setViewId(String viewId) {
1492         this.viewId = viewId;
1493     }
1494 
1495     public HashMap getSchedulingStateHash() {
1496         try {
1497             return CourseOfferingManagementUtil.getSchedulingStateAndNameHash();
1498         } catch (Exception e) {
1499             throw new RuntimeException(e);
1500         }
1501     }
1502 
1503     /**
1504      *   This method will update waitListType depending on automaticallyProcessed and confirmationRequired boolean
1505      *
1506      *   automatic -> automaticallyProcessed = true, confirmationRequired = false
1507      *   Confirmation (semi-automatic) -> automaticallyProcessed = true, confirmationRequired = true
1508      *   manual -> automaticallyProcessed = false, confirmationRequired = false
1509      *
1510      */
1511     public void updateWaitListType(){
1512 
1513         Boolean automaticallyProcessed = courseWaitListInfo.getAutomaticallyProcessed();
1514         Boolean confirmationRequired   = courseWaitListInfo.getConfirmationRequired();
1515         //default value is automatic
1516         if((null == automaticallyProcessed) || (null == confirmationRequired)) {
1517                waitListType = LuiServiceConstants.AUTOMATIC_WAITLIST_TYPE_KEY ;
1518                waitListTypeUI = "Automatic";
1519         } else if(automaticallyProcessed && !(confirmationRequired)){ // patch by Dyak for UMDENR-377
1520             waitListType = LuiServiceConstants.AUTOMATIC_WAITLIST_TYPE_KEY ;
1521             waitListTypeUI = "Automatic";
1522         } else if(automaticallyProcessed && confirmationRequired ) {
1523             waitListType = LuiServiceConstants.CONFIRMATION_WAITLIST_TYPE_KEY;
1524             waitListTypeUI = "Confirmation";
1525         } else if(!(automaticallyProcessed) &&  !(confirmationRequired)) {
1526             waitListType = LuiServiceConstants.MANUAL_WAITLIST_TYPE_KEY;
1527             waitListTypeUI = "Manual";
1528         }
1529     }
1530 
1531     public boolean isAuthorizedToModifyEndTimeTS() {
1532         if (isCentralSchedulingCoOrdinator){
1533             return true;
1534         } else {
1535             if (getNonStandardTimeslotCreationMode() == ActivityOfferingWrapper.NonStandardTimeslotCreationMode.ALLOWED){
1536                 return true;
1537             } else if (getNonStandardTimeslotCreationMode() == ActivityOfferingWrapper.NonStandardTimeslotCreationMode.NOT_ALLOWED){
1538                 return false;
1539             } else if (getNonStandardTimeslotCreationMode() == ActivityOfferingWrapper.NonStandardTimeslotCreationMode.NEEDS_APPROVAL){
1540                 return aoInfo.getIsApprovedForNonStandardTimeSlots();
1541             }
1542         }
1543 
1544         return false;
1545 
1546     }
1547 
1548     public String getTimeSlotType() {
1549         return timeSlotType;
1550     }
1551 
1552     public void setTimeSlotType(String timeSlotType) {
1553         this.timeSlotType = timeSlotType;
1554     }
1555 
1556     public int getCommentCount() {
1557         return commentCount;
1558     }
1559 
1560     public void setCommentCount(int commentCount) {
1561         this.commentCount = commentCount;
1562     }
1563 
1564     public String getActivityOfferingRefUri() {
1565         return activityOfferingRefUri;
1566     }
1567 }