org.sakaiproject.component.section.sakai
Class CourseSectionImpl

java.lang.Object
  extended by org.sakaiproject.component.section.sakai.CourseSectionImpl
All Implemented Interfaces:
Serializable, Comparable<CourseSection>, CourseSection, LearningContext

public class CourseSectionImpl
extends Object
implements CourseSection, Comparable<CourseSection>, Serializable

See Also:
Serialized Form

Field Summary
protected  String category
           
static String CATEGORY
           
protected  Course course
           
protected  String description
           
protected  String eid
           
static String EID
           
static String END_TIME
           
static String FRIDAY
           
protected  boolean lazy_eid
           
static String LOCATION
           
static String MAX_ENROLLMENTS
           
protected  Integer maxEnrollments
           
protected  List<Meeting> meetings
           
static String MONDAY
           
static String SATURDAY
           
static String SEP_CHARACTER
           
static String START_TIME
           
static String SUNDAY
           
static String THURSDAY
           
protected  String title
           
static String TUESDAY
           
protected  String uuid
           
static String WEDNESDAY
           
 
Constructor Summary
CourseSectionImpl(Course course, String title, String uuid, String category, Integer maxEnrollments, String location, Time startTime, Time endTime, boolean monday, boolean tuesday, boolean wednesday, boolean thursday, boolean friday, boolean saturday, boolean sunday)
          Convenience constructor to create a CourseSection with a single meeting.
CourseSectionImpl(org.sakaiproject.site.api.Group group)
           
 
Method Summary
 int compareTo(CourseSection other)
          Compares CourseSectionImpls based on their category ID and title.
static Time convertStringToTime(String str)
           
static String convertTimeToString(Time time)
           
 void decorateGroup(org.sakaiproject.site.api.Group group)
          Decorates the framework's section (group) with metadata from this CourseSection.
 boolean equals(Object o)
           
 String getCategory()
          Gets the category ID of this CourseSection.
 Course getCourse()
          Gets the Course that this CourseSection belongs to
 String getDescription()
           
 String getEid()
          The enterprise ID of this CourseSection.
 org.sakaiproject.site.api.Group getGroup()
          Access the group object being decorated.
 Integer getMaxEnrollments()
          Gets the maximum number of enrollments allowed in this CourseSection.
 List<Meeting> getMeetings()
          Gets the meetings for this CourseSection.
 String getTitle()
           
 String getUuid()
           
 int hashCode()
           
 void setCategory(String category)
           
 void setCourse(Course course)
           
 void setDescription(String description)
           
 void setEid(String eid)
           
 void setMaxEnrollments(Integer maxEnrollments)
           
 void setMeetings(List<Meeting> meetings)
           
 void setTitle(String title)
           
 void setUuid(String uuid)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

SEP_CHARACTER

public static final String SEP_CHARACTER
See Also:
Constant Field Values

CATEGORY

public static final String CATEGORY
See Also:
Constant Field Values

END_TIME

public static final String END_TIME
See Also:
Constant Field Values

START_TIME

public static final String START_TIME
See Also:
Constant Field Values

LOCATION

public static final String LOCATION
See Also:
Constant Field Values

MAX_ENROLLMENTS

public static final String MAX_ENROLLMENTS
See Also:
Constant Field Values

MONDAY

public static final String MONDAY
See Also:
Constant Field Values

TUESDAY

public static final String TUESDAY
See Also:
Constant Field Values

WEDNESDAY

public static final String WEDNESDAY
See Also:
Constant Field Values

THURSDAY

public static final String THURSDAY
See Also:
Constant Field Values

FRIDAY

public static final String FRIDAY
See Also:
Constant Field Values

SATURDAY

public static final String SATURDAY
See Also:
Constant Field Values

SUNDAY

public static final String SUNDAY
See Also:
Constant Field Values

EID

public static final String EID
See Also:
Constant Field Values

description

protected String description

uuid

protected String uuid

course

protected Course course

category

protected String category

maxEnrollments

protected Integer maxEnrollments

meetings

protected List<Meeting> meetings

title

protected String title

eid

protected String eid

lazy_eid

protected boolean lazy_eid
Constructor Detail

CourseSectionImpl

public CourseSectionImpl(Course course,
                         String title,
                         String uuid,
                         String category,
                         Integer maxEnrollments,
                         String location,
                         Time startTime,
                         Time endTime,
                         boolean monday,
                         boolean tuesday,
                         boolean wednesday,
                         boolean thursday,
                         boolean friday,
                         boolean saturday,
                         boolean sunday)
Convenience constructor to create a CourseSection with a single meeting.

Parameters:
course -
title -
uuid -
category -
maxEnrollments -
location -
startTime -
endTime -
monday -
tuesday -
wednesday -
thursday -
friday -
saturday -
sunday -

CourseSectionImpl

public CourseSectionImpl(org.sakaiproject.site.api.Group group)
Method Detail

convertTimeToString

public static final String convertTimeToString(Time time)

convertStringToTime

public static final Time convertStringToTime(String str)

decorateGroup

public void decorateGroup(org.sakaiproject.site.api.Group group)
Decorates the framework's section (group) with metadata from this CourseSection.

Parameters:
group - The framework group

getCategory

public String getCategory()
Description copied from interface: CourseSection
Gets the category ID of this CourseSection. Students may be enrolled in only one section of a given category per Course.

Specified by:
getCategory in interface CourseSection
Returns:

setCategory

public void setCategory(String category)

getCourse

public Course getCourse()
Description copied from interface: CourseSection
Gets the Course that this CourseSection belongs to

Specified by:
getCourse in interface CourseSection
Returns:

setCourse

public void setCourse(Course course)

getEid

public String getEid()
Description copied from interface: CourseSection
The enterprise ID of this CourseSection. CourseSections that model Sections from the CM service have enterprise IDs. Manually created CourseSections have an EID of null.

Specified by:
getEid in interface CourseSection
Returns:
The enterprise ID of the Section that this CourseSection models.

setEid

public void setEid(String eid)

getDescription

public String getDescription()

setDescription

public void setDescription(String description)

getMeetings

public List<Meeting> getMeetings()
Description copied from interface: CourseSection
Gets the meetings for this CourseSection.

Specified by:
getMeetings in interface CourseSection
Returns:

setMeetings

public void setMeetings(List<Meeting> meetings)

getMaxEnrollments

public Integer getMaxEnrollments()
Description copied from interface: CourseSection
Gets the maximum number of enrollments allowed in this CourseSection. Instructors and TAs may assign more than the maximum number of enrollments, but students may not self enroll in a section at or above the maximum number of enrollments.

Specified by:
getMaxEnrollments in interface CourseSection
Returns:

setMaxEnrollments

public void setMaxEnrollments(Integer maxEnrollments)

getTitle

public String getTitle()
Specified by:
getTitle in interface LearningContext

setTitle

public void setTitle(String title)
Specified by:
setTitle in interface LearningContext

getUuid

public String getUuid()
Specified by:
getUuid in interface LearningContext

setUuid

public void setUuid(String uuid)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

public int compareTo(CourseSection other)
Compares CourseSectionImpls based on their category ID and title. Sections without a category are sorted last.

Specified by:
compareTo in interface Comparable<CourseSection>

toString

public String toString()
Overrides:
toString in class Object

getGroup

public org.sakaiproject.site.api.Group getGroup()
Access the group object being decorated. This field is transient, so this is likely to return null. This method should not be added to the CourseSection interface, since it is implementation dependent.

Returns:
The transient Group object being modeled.


Copyright © 2011 Sakai Project. All Rights Reserved.