public boolean groupExists(String groupId) { if (cmService.isSectionDefined(groupId)) return true; return false; } }
public void setCourseOffering(CourseOffering courseOffering) { this.courseOffering = courseOffering; if(courseOffering == null) { this.courseOfferingEid = null; } else { this.courseOfferingEid = courseOffering.getEid(); // Make sure we update the cached eid } } public Section getParent() {
public void setCanonicalCourse(CanonicalCourse canonicalCourse) { this.canonicalCourse = canonicalCourse; if(canonicalCourse == null) { this.canonicalCourseEid = null; } else { this.canonicalCourseEid = canonicalCourse.getEid(); } }
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 void processRow(String[] data, ProcessorState state) throws Exception { log.debug("Reconciling enrollment set {}", data[0]); if (cmService.isEnrollmentSetDefined(data[0])) { EnrollmentSet enrollmentSet = cmService.getEnrollmentSet(data[0]); log.debug("Updating EnrollmentSet {}", enrollmentSet.getEid()); enrollmentSet.setTitle(data[1]); enrollmentSet.setDescription(data[2]); enrollmentSet.setCategory(data[3]); enrollmentSet.setDefaultEnrollmentCredits(data[5]); cmAdmin.updateEnrollmentSet(enrollmentSet); } else { log.debug("Adding EnrollmentSet {}", data[0]); cmAdmin.createEnrollmentSet(data[0], data[1], data[2], data[3], data[5], data[4], null); } }
protected CourseOffering updateCourseOffering(CourseOffering courseOffering, Element element) { if(log.isDebugEnabled()) log.debug("Updating CourseOffering + " + courseOffering.getEid()); AcademicSession newAcademicSession = cmService.getAcademicSession(element.getChildText("academic-session-eid")); courseOffering.setTitle(element.getChildText("title")); courseOffering.setDescription(element.getChildText("description")); courseOffering.setStatus(element.getChildText("status")); courseOffering.setAcademicSession(newAcademicSession); courseOffering.setStartDate(getDate(element.getChildText("start-date"))); courseOffering.setEndDate(getDate(element.getChildText("end-date"))); // Note: we can't update a course offering's canonical course. This seems reasonable. cmAdmin.updateCourseOffering(courseOffering); return courseOffering; }
protected CourseSet updateCourseSet(CourseSet courseSet, Element element) { if(log.isDebugEnabled()) log.debug("Updating CourseSet + " + courseSet.getEid()); courseSet.setTitle(element.getChildText("title")); courseSet.setDescription(element.getChildText("description")); courseSet.setCategory(element.getChildText("category")); String parentEid = element.getChildText("parent-course-set"); if(cmService.isCourseSetDefined(parentEid)) { CourseSet parent = cmService.getCourseSet(parentEid); courseSet.setParent(parent); } cmAdmin.updateCourseSet(courseSet); return courseSet; }
protected EnrollmentSet updateEnrollmentSet(EnrollmentSet enrollmentSet, Element element) { if(log.isDebugEnabled()) log.debug("Updating EnrollmentSet + " + enrollmentSet.getEid()); enrollmentSet.setTitle(element.getChildText("title")); enrollmentSet.setDescription(element.getChildText("description")); enrollmentSet.setCategory(element.getChildText("category")); enrollmentSet.setDefaultEnrollmentCredits(element.getChildText("default-enrollment-credits")); // Note: It is not possible to change the course offering, but this seems OK. cmAdmin.updateEnrollmentSet(enrollmentSet); return enrollmentSet; }
public void updateAcademicSession(AcademicSession session, String[] data) { log.debug("Updating AcademicSession {}", session.getEid()); session.setTitle(data[1]); session.setDescription(data[2]); session.setStartDate(getDate(data[3])); session.setEndDate(getDate(data[4])); cmAdmin.updateAcademicSession(session); setCurrentStatus(session); }
protected void updateCanonicalCourse(CanonicalCourse canonicalCourse, Element element) { if(log.isDebugEnabled()) log.debug("Updating CanonicalCourse + " + canonicalCourse.getEid()); canonicalCourse.setTitle(element.getChildText("title")); canonicalCourse.setDescription(element.getChildText("description")); cmAdmin.updateCanonicalCourse(canonicalCourse); }
public void processRow(String[] data, ProcessorState state) throws Exception { log.debug("Reconciling section cateogory {}", data[0]); List<String> sectionCategories = cmService.getSectionCategories(); if (!sectionCategories.contains(data[0])) { cmAdmin.addSectionCategory(data[0], data[1]); } }
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; }
public void processRow(String[] data, ProcessorState state) throws Exception { log.debug("Reconciling enrollment set {}", data[0]); if (cmService.isEnrollmentSetDefined(data[0])) { EnrollmentSet enrollmentSet = cmService.getEnrollmentSet(data[0]); log.debug("Updating EnrollmentSet {}", enrollmentSet.getEid()); enrollmentSet.setTitle(data[1]); enrollmentSet.setDescription(data[2]); enrollmentSet.setCategory(data[3]); enrollmentSet.setDefaultEnrollmentCredits(data[5]); cmAdmin.updateEnrollmentSet(enrollmentSet); } else { log.debug("Adding EnrollmentSet {}", data[0]); cmAdmin.createEnrollmentSet(data[0], data[1], data[2], data[3], data[5], data[4], null); } }
public void updateAcademicSession(AcademicSession session, String[] data) { log.debug("Updating AcademicSession {}", session.getEid()); session.setTitle(data[1]); session.setDescription(data[2]); session.setStartDate(getDate(data[3])); session.setEndDate(getDate(data[4])); cmAdmin.updateAcademicSession(session); setCurrentStatus(session); }
public void setCourseOffering(CourseOffering courseOffering) { this.courseOffering = courseOffering; if(courseOffering == null) { this.courseOfferingEid = null; } else { this.courseOfferingEid = courseOffering.getEid(); // Make sure we update the cached eid } } public Section getParent() {
public void setCanonicalCourse(CanonicalCourse canonicalCourse) { this.canonicalCourse = canonicalCourse; if(canonicalCourse == null) { this.canonicalCourseEid = null; } else { this.canonicalCourseEid = canonicalCourse.getEid(); } }
public void processRow(String[] data, ProcessorState state) throws Exception { log.debug("Reconciling section cateogory {}", data[0]); List<String> sectionCategories = cmService.getSectionCategories(); if (!sectionCategories.contains(data[0])) { cmAdmin.addSectionCategory(data[0], data[1]); } }
public SectionCmImpl(String eid, String title, String description, String category, Section parent, CourseOffering courseOffering, EnrollmentSet enrollmentSet, Integer maxSize) { this.eid = eid; this.title = title; this.description = description; this.category = category; this.parent = parent; this.courseOffering = courseOffering; if(courseOffering != null) { this.courseOfferingEid = courseOffering.getEid(); } this.enrollmentSet = enrollmentSet; this.maxSize = maxSize; }
public CourseOfferingCmImpl(String eid, String title, String description,String status, AcademicSession academicSession, CanonicalCourse canonicalCourse, Date startDate, Date endDate) { this.eid = eid; this.title = title; this.description = description; this.status = status; this.academicSession = academicSession; this.canonicalCourse = canonicalCourse; if(canonicalCourse == null) { this.canonicalCourseEid = null; } else { this.canonicalCourseEid = canonicalCourse.getEid(); } this.startDate = startDate; this.endDate = endDate; }
public SectionCmImpl(String eid, String title, String description, String category, Section parent, CourseOffering courseOffering, EnrollmentSet enrollmentSet, Integer maxSize) { this.eid = eid; this.title = title; this.description = description; this.category = category; this.parent = parent; this.courseOffering = courseOffering; if(courseOffering != null) { this.courseOfferingEid = courseOffering.getEid(); } this.enrollmentSet = enrollmentSet; this.maxSize = maxSize; }