org.sakaiproject.component.section.sakai
Class CourseManagerImpl

java.lang.Object
  extended by org.sakaiproject.component.section.sakai.CourseManagerImpl
All Implemented Interfaces:
CourseManager

public class CourseManagerImpl
extends Object
implements CourseManager

Sakai implementation of CourseManager. Uses Sakai Sites API to store all course metadata needed by the Section Info tool.

Author:
Josh Holtzman

Constructor Summary
CourseManagerImpl()
           
 
Method Summary
 ParticipationRecord addEnrollment(User user, Course course)
          Not supported in sakai
 ParticipationRecord addInstructor(User user, Course course)
          Not supported in sakai
 ParticipationRecord addTA(User user, Course course)
          Not supported in sakai
 boolean courseExists(String siteContext)
          The Sakai implementation uses the SiteService API, so if the site exists then the "Course" exists.
 Course createCourse(String siteContext, String title, boolean selfRegAllowed, boolean selfSwitchingAllowed, boolean externallyManaged)
          Creates a new Course object for this site.
 void removeCourseMembership(String userUid, Course course)
          Not supported in sakai
 void removeOrphans(String siteContext)
          This is handled by the Site and AuthzGroup Services in Sakai.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CourseManagerImpl

public CourseManagerImpl()
Method Detail

createCourse

public Course createCourse(String siteContext,
                           String title,
                           boolean selfRegAllowed,
                           boolean selfSwitchingAllowed,
                           boolean externallyManaged)
Description copied from interface: CourseManager
Creates a new Course object for this site.

Specified by:
createCourse in interface CourseManager
Parameters:
siteContext - The site context
title - The title of the course or site
selfRegAllowed - Whether to allow students to register for sections in this course.
selfSwitchingAllowed - Whether to allow students to switch sections in this course.
externallyManaged - Whether to flag this course as externally manager (read-only to the app).
Returns:
The newly created Course object.

courseExists

public boolean courseExists(String siteContext)
The Sakai implementation uses the SiteService API, so if the site exists then the "Course" exists.

Specified by:
courseExists in interface CourseManager
Parameters:
siteContext - The site context
Returns:

removeOrphans

public void removeOrphans(String siteContext)
This is handled by the Site and AuthzGroup Services in Sakai. No need to do anything here.

Specified by:
removeOrphans in interface CourseManager
Parameters:
siteContext - The site context from which to remove the orphaned records

addInstructor

public ParticipationRecord addInstructor(User user,
                                         Course course)
Not supported in sakai

Specified by:
addInstructor in interface CourseManager
Returns:

addEnrollment

public ParticipationRecord addEnrollment(User user,
                                         Course course)
Not supported in sakai

Specified by:
addEnrollment in interface CourseManager
Returns:

addTA

public ParticipationRecord addTA(User user,
                                 Course course)
Not supported in sakai

Specified by:
addTA in interface CourseManager
Returns:

removeCourseMembership

public void removeCourseMembership(String userUid,
                                   Course course)
Not supported in sakai

Specified by:
removeCourseMembership in interface CourseManager


Copyright © 2011 Sakai Project. All Rights Reserved.