meetingTimes.add(meeting); cmAdmin.updateSection(section);
public void postProcess(ProcessorState state) throws Exception { Map<String, List<CourseMeeting>> meetings = getMeetings(state); log.debug("postProcess() " + meetings.size() + " sections to inspect"); for (String sectionEid : meetings.keySet()) { Section section = null; if (cmService.isSectionDefined(sectionEid)) { section = cmService.getSection(sectionEid); } else { log.error("can't add meeting no section with eid of {} found", sectionEid); continue; } List<CourseMeeting> currentMeetings = meetings.get(sectionEid); // clear existing sections cmAdmin.removeAllSectionMeetings(sectionEid); section.setMeetings(new HashSet<>()); for (CourseMeeting courseMeeting : currentMeetings) { Meeting meeting = cmAdmin.newSectionMeeting(sectionEid, courseMeeting.getLocation(), null, null, courseMeeting.getNotes()); section.getMeetings().add(meeting); } cmAdmin.updateSection(section); } }
public void postProcess(ProcessorState state) throws Exception { Map<String, List<CourseMeeting>> meetings = getMeetings(state); log.debug("postProcess() " + meetings.size() + " sections to inspect"); for (String sectionEid : meetings.keySet()) { Section section = null; if (cmService.isSectionDefined(sectionEid)) { section = cmService.getSection(sectionEid); } else { log.error("can't add meeting no section with eid of {} found", sectionEid); continue; } List<CourseMeeting> currentMeetings = meetings.get(sectionEid); // clear existing sections cmAdmin.removeAllSectionMeetings(sectionEid); section.setMeetings(new HashSet<>()); for (CourseMeeting courseMeeting : currentMeetings) { Meeting meeting = cmAdmin.newSectionMeeting(sectionEid, courseMeeting.getLocation(), null, null, courseMeeting.getNotes()); section.getMeetings().add(meeting); } cmAdmin.updateSection(section); } }
public Section updateSection(Section section, String[] data) { log.debug("Updating Section {}", section.getEid()); section.setTitle(data[1]); section.setDescription(data[2]); section.setCategory(data[3]); if (StringUtils.isNotBlank(data[4]) && cmService.isSectionDefined(data[4])) { section.setParent(cmService.getSection(data[4])); } // Note: There's no way to change the course offering. This makes sense, though. if (cmService.isEnrollmentSetDefined(data[5])) { section.setEnrollmentSet(cmService.getEnrollmentSet(data[5])); } cmAdmin.updateSection(section); return section; }
public Section updateSection(Section section, String[] data) { log.debug("Updating Section {}", section.getEid()); section.setTitle(data[1]); section.setDescription(data[2]); section.setCategory(data[3]); if (StringUtils.isNotBlank(data[4]) && cmService.isSectionDefined(data[4])) { section.setParent(cmService.getSection(data[4])); } // Note: There's no way to change the course offering. This makes sense, though. if (cmService.isEnrollmentSetDefined(data[5])) { section.setEnrollmentSet(cmService.getEnrollmentSet(data[5])); } cmAdmin.updateSection(section); return section; }
meetings.add(mtg); sec.setMeetings(meetings); cmAdmin.updateSection(sec);
protected Section updateSection(Section section, Element element) { if(log.isDebugEnabled()) log.debug("Updating Section + " + section.getEid()); section.setTitle(element.getChildText("title")); section.setDescription(element.getChildText("description")); section.setCategory(element.getChildText("category")); if(cmService.isSectionDefined(element.getChildText("parent-section-eid"))) { section.setParent(cmService.getSection(element.getChildText("parent-section-eid"))); } // Note: There's no way to change the course offering. This makes sense, though. if(cmService.isEnrollmentSetDefined(element.getChildText("enrollment-set-eid"))) { section.setEnrollmentSet(cmService.getEnrollmentSet(element.getChildText("enrollment-set-eid"))); } cmAdmin.updateSection(section); return section; }
lec1Meetings.add(mtg1); lec1.setMeetings(lec1Meetings); cmAdmin.updateSection(lec1); if(log.isDebugEnabled()) log.debug("Created section " + lec1Eid); lec2Meetings.add(mtg2); lec2.setMeetings(lec2Meetings); cmAdmin.updateSection(lec2); if(log.isDebugEnabled()) log.debug("Created section " + lec2Eid);