org.sakaiproject.component.section.support
Class IntegrationSupportImpl

java.lang.Object
  extended byorg.springframework.dao.support.DaoSupport
      extended byorg.springframework.orm.hibernate.support.HibernateDaoSupport
          extended byorg.sakaiproject.component.section.support.IntegrationSupportImpl
All Implemented Interfaces:
InitializingBean, IntegrationSupport

public class IntegrationSupportImpl
extends HibernateDaoSupport
implements IntegrationSupport

Provides integration support using the standalone hibernate implementation.


Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
IntegrationSupportImpl()
           
 
Method Summary
 ParticipationRecord addSectionMembership(String userUid, String sectionUuid, Role role)
          Adds a user to a section under the given role.
 ParticipationRecord addSiteMembership(String userUid, String siteContext, Role role)
          Adds a user to a site (or "Course").
 Course createCourse(String siteContext, String title, boolean externallyManaged, boolean selfRegistrationAllowed, boolean selfSwitchingAllowed)
          Creates a new course.
 CourseSection createSection(String courseUuid, String title, String category, Integer maxEnrollments, String location, Time startTime, Time endTime, boolean monday, boolean tuesday, boolean wednesday, boolean thursday, boolean friday, boolean saturday, boolean sunday)
          Creates a new section.
 User createUser(String userUid, String displayName, String sortName, String displayId)
          Creates a new user.
 User findUser(String userUid)
          Finds a user by their uuid.
 Set getAllSectionMemberships(String userUid, String siteContext)
          Gets all of the section-scoped ParticipationRecords for a user in a given site.
 List getAllSiteMemberships(String userUid)
          Gets all of the site-scoped ParticipationRecords for a user.
 void removeSectionMembership(String userUid, String sectionUuid)
          Removes a user from membership in a section.
 void removeSiteMembership(String userUid, String siteContext)
          Removes a user from a site (or "Course").
 void setCourseManager(CourseManager courseManager)
           
 void setSectionManager(SectionManager sectionManager)
           
 void setUserManager(UserManager userManager)
           
 void setUuidManager(UuidManager uuidManager)
           
 
Methods inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport
checkDaoConfig, closeSessionIfNecessary, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntegrationSupportImpl

public IntegrationSupportImpl()
Method Detail

createCourse

public Course createCourse(String siteContext,
                           String title,
                           boolean externallyManaged,
                           boolean selfRegistrationAllowed,
                           boolean selfSwitchingAllowed)
Description copied from interface: IntegrationSupport
Creates a new course.

Specified by:
createCourse in interface IntegrationSupport
Parameters:
siteContext -
title -
externallyManaged -
selfRegistrationAllowed -
selfSwitchingAllowed -
Returns:

createSection

public CourseSection createSection(String courseUuid,
                                   String title,
                                   String category,
                                   Integer maxEnrollments,
                                   String location,
                                   Time startTime,
                                   Time endTime,
                                   boolean monday,
                                   boolean tuesday,
                                   boolean wednesday,
                                   boolean thursday,
                                   boolean friday,
                                   boolean saturday,
                                   boolean sunday)
Description copied from interface: IntegrationSupport
Creates a new section.

Specified by:
createSection in interface IntegrationSupport
Parameters:
courseUuid -
title -
category -
maxEnrollments -
location -
startTime -
endTime -
monday -
tuesday -
wednesday -
thursday -
friday -
saturday -
sunday -
Returns:

createUser

public User createUser(String userUid,
                       String displayName,
                       String sortName,
                       String displayId)
Description copied from interface: IntegrationSupport
Creates a new user.

Specified by:
createUser in interface IntegrationSupport
Parameters:
userUid -
displayName -
sortName -
displayId -
Returns:

findUser

public User findUser(String userUid)
Description copied from interface: IntegrationSupport
Finds a user by their uuid.

Specified by:
findUser in interface IntegrationSupport
Parameters:
userUid -
Returns:

getAllSiteMemberships

public List getAllSiteMemberships(String userUid)
Description copied from interface: IntegrationSupport
Gets all of the site-scoped ParticipationRecords for a user. This can be a mix of enrollments and instructor or TA records, since a user can play different roles in different sites.

Specified by:
getAllSiteMemberships in interface IntegrationSupport
Parameters:
userUid -
Returns:

getAllSectionMemberships

public Set getAllSectionMemberships(String userUid,
                                    String siteContext)
Description copied from interface: IntegrationSupport
Gets all of the section-scoped ParticipationRecords for a user in a given site. The returned Set should contain either enrollment, instructor, or TA records, since a user can not play different roles in the sections belonging to a single site.

Specified by:
getAllSectionMemberships in interface IntegrationSupport
Parameters:
userUid -
siteContext -
Returns:

addSiteMembership

public ParticipationRecord addSiteMembership(String userUid,
                                             String siteContext,
                                             Role role)
Description copied from interface: IntegrationSupport
Adds a user to a site (or "Course").

Specified by:
addSiteMembership in interface IntegrationSupport
Parameters:
userUid -
siteContext -
role -
Returns:

removeSiteMembership

public void removeSiteMembership(String userUid,
                                 String siteContext)
Description copied from interface: IntegrationSupport
Removes a user from a site (or "Course").

Specified by:
removeSiteMembership in interface IntegrationSupport
Parameters:
userUid -
siteContext -

addSectionMembership

public ParticipationRecord addSectionMembership(String userUid,
                                                String sectionUuid,
                                                Role role)
Description copied from interface: IntegrationSupport
Adds a user to a section under the given role.

Specified by:
addSectionMembership in interface IntegrationSupport
Parameters:
userUid -
sectionUuid -
role -
Returns:

removeSectionMembership

public void removeSectionMembership(String userUid,
                                    String sectionUuid)
Description copied from interface: IntegrationSupport
Removes a user from membership in a section.

Specified by:
removeSectionMembership in interface IntegrationSupport
Parameters:
userUid -
sectionUuid -

setSectionManager

public void setSectionManager(SectionManager sectionManager)

setCourseManager

public void setCourseManager(CourseManager courseManager)

setUserManager

public void setUserManager(UserManager userManager)

setUuidManager

public void setUuidManager(UuidManager uuidManager)