org.sakaiproject.component.section.sakai21
Class CourseManagerImpl

java.lang.Object
  extended byorg.sakaiproject.component.section.sakai21.CourseManagerImpl
All Implemented Interfaces:
CourseManager

public class CourseManagerImpl
extends Object
implements CourseManager

Sakai 2.1 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 2.1
 ParticipationRecord addInstructor(User user, Course course)
          Not supported in sakai 2.1
 ParticipationRecord addTA(User user, Course course)
          Not supported in sakai 2.1
 boolean courseExists(String siteContext)
          The Sakai 2.1 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 2.1
 void removeOrphans(String siteContext)
          This is handled by the Site and AuthzGroup Services in Sakai 2.1.
 
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 2.1 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 2.1. 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 2.1

Specified by:
addInstructor in interface CourseManager
Parameters:
user -
course -
Returns:

addEnrollment

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

Specified by:
addEnrollment in interface CourseManager
Parameters:
user -
course -
Returns:

addTA

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

Specified by:
addTA in interface CourseManager
Parameters:
user -
course -
Returns:

removeCourseMembership

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

Specified by:
removeCourseMembership in interface CourseManager
Parameters:
userUid -
course -