001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/course-management/tags/sakai_2-4-1/cm-impl/hibernate-impl/impl/src/java/org/sakaiproject/coursemanagement/impl/CourseManagementServiceSampleChainImpl.java $
003: * $Id: CourseManagementServiceSampleChainImpl.java 21050 2007-02-06 16:12:06Z jholtzman@berkeley.edu $
004: ***********************************************************************************
005: *
006: * Copyright (c) 2006 The Sakai Foundation.
007: *
008: * Licensed under the Educational Community License, Version 1.0 (the "License");
009: * you may not use this file except in compliance with the License.
010: * You may obtain a copy of the License at
011: *
012: * http://www.opensource.org/licenses/ecl1.php
013: *
014: * Unless required by applicable law or agreed to in writing, software
015: * distributed under the License is distributed on an "AS IS" BASIS,
016: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017: * See the License for the specific language governing permissions and
018: * limitations under the License.
019: *
020: **********************************************************************************/package org.sakaiproject.coursemanagement.impl;
021:
022: import java.util.List;
023: import java.util.Locale;
024: import java.util.Map;
025: import java.util.Set;
026:
027: import org.sakaiproject.coursemanagement.api.AcademicSession;
028: import org.sakaiproject.coursemanagement.api.CanonicalCourse;
029: import org.sakaiproject.coursemanagement.api.CourseManagementService;
030: import org.sakaiproject.coursemanagement.api.CourseOffering;
031: import org.sakaiproject.coursemanagement.api.CourseSet;
032: import org.sakaiproject.coursemanagement.api.Enrollment;
033: import org.sakaiproject.coursemanagement.api.EnrollmentSet;
034: import org.sakaiproject.coursemanagement.api.Section;
035: import org.sakaiproject.coursemanagement.api.exception.IdNotFoundException;
036:
037: /**
038: * A template to use when implementing CourseManagementService to provide
039: * course and enrollment data in a federated CM configuration. Extending this class
040: * should be useful for institutions intending to federate external datasources
041: * (via webservices, SIS APIs, etc) with Sakai's hibernate-based
042: * CourseManagementService.
043: *
044: * @author <a href="mailto:jholtzman@berkeley.edu">Josh Holtzman</a>
045: *
046: */
047: public class CourseManagementServiceSampleChainImpl implements
048: CourseManagementService {
049:
050: public Set findCourseOfferings(String courseSetEid,
051: String academicSessionEid) throws IdNotFoundException {
052: throw new IdNotFoundException(courseSetEid, CourseSet.class
053: .getName());
054: }
055:
056: public List findCourseSets(String category) {
057: return null;
058: }
059:
060: public Set findCurrentlyEnrolledEnrollmentSets(String userId) {
061: return null;
062: }
063:
064: public Set findCurrentlyInstructingEnrollmentSets(String userId) {
065: return null;
066: }
067:
068: public Enrollment findEnrollment(String userId, String eid) {
069: return null;
070: }
071:
072: public Set findInstructingSections(String userId) {
073: return null;
074: }
075:
076: public Set findInstructingSections(String userId,
077: String academicSessionEid) throws IdNotFoundException {
078: throw new IdNotFoundException(academicSessionEid,
079: AcademicSession.class.getName());
080: }
081:
082: public AcademicSession getAcademicSession(String academicSessionEid)
083: throws IdNotFoundException {
084: throw new IdNotFoundException(academicSessionEid,
085: AcademicSession.class.getName());
086: }
087:
088: public List getAcademicSessions() {
089: return null;
090: }
091:
092: public CanonicalCourse getCanonicalCourse(String canonicalCourseEid)
093: throws IdNotFoundException {
094: throw new IdNotFoundException(canonicalCourseEid,
095: CanonicalCourse.class.getName());
096: }
097:
098: public Set getCanonicalCourses(String courseSetEid)
099: throws IdNotFoundException {
100: throw new IdNotFoundException(courseSetEid, CourseSet.class
101: .getName());
102: }
103:
104: public Set getChildCourseSets(String parentCourseSetEid)
105: throws IdNotFoundException {
106: throw new IdNotFoundException(parentCourseSetEid,
107: CourseSet.class.getName());
108: }
109:
110: public Set getChildSections(String parentSectionEid)
111: throws IdNotFoundException {
112: throw new IdNotFoundException(parentSectionEid, Section.class
113: .getName());
114: }
115:
116: public CourseOffering getCourseOffering(String courseOfferingEid)
117: throws IdNotFoundException {
118: throw new IdNotFoundException(courseOfferingEid,
119: CourseOffering.class.getName());
120: }
121:
122: public Set getCourseOfferingMemberships(String courseOfferingEid)
123: throws IdNotFoundException {
124: throw new IdNotFoundException(courseOfferingEid,
125: CourseOffering.class.getName());
126: }
127:
128: public Set getCourseOfferingsInCourseSet(String courseSetEid)
129: throws IdNotFoundException {
130: throw new IdNotFoundException(courseSetEid, CourseSet.class
131: .getName());
132: }
133:
134: public CourseSet getCourseSet(String courseSetEid)
135: throws IdNotFoundException {
136: throw new IdNotFoundException(courseSetEid, CourseSet.class
137: .getName());
138: }
139:
140: public Set getCourseSetMemberships(String courseSetEid)
141: throws IdNotFoundException {
142: throw new IdNotFoundException(courseSetEid, CourseSet.class
143: .getName());
144: }
145:
146: public Set getCourseSets() {
147: return null;
148: }
149:
150: public List getCurrentAcademicSessions() {
151: return null;
152: }
153:
154: public EnrollmentSet getEnrollmentSet(String enrollmentSetEid)
155: throws IdNotFoundException {
156: throw new IdNotFoundException(enrollmentSetEid,
157: EnrollmentSet.class.getName());
158: }
159:
160: public Set getEnrollmentSets(String courseOfferingEid)
161: throws IdNotFoundException {
162: throw new IdNotFoundException(courseOfferingEid,
163: CourseOffering.class.getName());
164: }
165:
166: public Set getEnrollments(String enrollmentSetEid)
167: throws IdNotFoundException {
168: throw new IdNotFoundException(enrollmentSetEid,
169: EnrollmentSet.class.getName());
170: }
171:
172: public Set getEquivalentCanonicalCourses(String canonicalCourseEid)
173: throws IdNotFoundException {
174: throw new IdNotFoundException(canonicalCourseEid,
175: CanonicalCourse.class.getName());
176: }
177:
178: public Set getEquivalentCourseOfferings(String courseOfferingEid)
179: throws IdNotFoundException {
180: throw new IdNotFoundException(courseOfferingEid,
181: CourseOffering.class.getName());
182: }
183:
184: public Set getInstructorsOfRecordIds(String enrollmentSetEid)
185: throws IdNotFoundException {
186: throw new IdNotFoundException(enrollmentSetEid,
187: EnrollmentSet.class.getName());
188: }
189:
190: public Section getSection(String sectionEid)
191: throws IdNotFoundException {
192: throw new IdNotFoundException(sectionEid, Section.class
193: .getName());
194: }
195:
196: public Set getSectionMemberships(String sectionEid)
197: throws IdNotFoundException {
198: throw new IdNotFoundException(sectionEid, Section.class
199: .getName());
200: }
201:
202: public Set getSections(String courseOfferingEid)
203: throws IdNotFoundException {
204: throw new IdNotFoundException(courseOfferingEid,
205: CourseOffering.class.getName());
206: }
207:
208: public boolean isEmpty(String courseSetEid) {
209: throw new UnsupportedOperationException();
210: }
211:
212: public boolean isEnrolled(String userId, Set enrollmentSetEids) {
213: throw new UnsupportedOperationException();
214: }
215:
216: public boolean isEnrolled(String userId, String eid) {
217: throw new UnsupportedOperationException();
218: }
219:
220: public Set findEnrolledSections(String userId) {
221: return null;
222: }
223:
224: public Map findCourseOfferingRoles(String userEid) {
225: return null;
226: }
227:
228: public Map findCourseSetRoles(String userEid) {
229: return null;
230: }
231:
232: public Map findSectionRoles(String userEid) {
233: return null;
234: }
235:
236: public Set getCourseOfferingsInCanonicalCourse(
237: String canonicalCourseEid) throws IdNotFoundException {
238: throw new IdNotFoundException(canonicalCourseEid,
239: CanonicalCourse.class.getName());
240: }
241:
242: public boolean isAcademicSessionDefined(String eid) {
243: throw new UnsupportedOperationException();
244: }
245:
246: public boolean isCanonicalCourseDefined(String eid) {
247: throw new UnsupportedOperationException();
248: }
249:
250: public boolean isCourseOfferingDefined(String eid) {
251: throw new UnsupportedOperationException();
252: }
253:
254: public boolean isCourseSetDefined(String eid) {
255: throw new UnsupportedOperationException();
256: }
257:
258: public boolean isEnrollmentSetDefined(String eid) {
259: throw new UnsupportedOperationException();
260: }
261:
262: public boolean isSectionDefined(String eid) {
263: throw new UnsupportedOperationException();
264: }
265:
266: public List<String> getSectionCategories() {
267: return null;
268: }
269:
270: public String getSectionCategoryDescription(String categoryCode) {
271: return null;
272: }
273:
274: public Map<String, String> getEnrollmentStatusDescriptions(
275: Locale locale) {
276: return null;
277: }
278:
279: public Map<String, String> getGradingSchemeDescriptions(
280: Locale locale) {
281: return null;
282: }
283:
284: public Map<String, String> getMembershipStatusDescriptions(
285: Locale locale) {
286: return null;
287: }
288: }
|