blackboard.data.course
Class CourseMembership

java.lang.Object
  extended by blackboard.data.BbObject
      extended by blackboard.data.course.CourseMembership
All Implemented Interfaces:
Available, IBbObject, java.lang.Cloneable

public class CourseMembership
extends BbObject
implements Available

The CourseMembership class is a representation of a course membership record within the Blackboard application. A course membership record defines a user's role within a particular course.

Since:
Bb 5.5
Version:
$Revision: #1 $ $Date: 2005/06/27 $

Nested Class Summary
static class CourseMembership.Role
           
 
Field Summary
static DataType COURSE_MEMBERSHIP_DATA_TYPE
          Deprecated. Use the constant DATA_TYPE instead
static DataType DATA_TYPE
           
 
Fields inherited from class blackboard.data.BbObject
_bbAttributes
 
Constructor Summary
CourseMembership()
          Creates an instance of CourseMembership with default property values.
 
Method Summary
 void appendFavoriteLink(BbLink favoriteLink)
          Appends the given BbLink to the current list of favorite links currently defined for this CourseMembership.
 Id getCourseId()
          Returns the course Id associated with this CourseMembership .
 Id getDataSourceId()
          Returns the data source Id of this CourseMembership.
 DataType getDataType()
          Returns the DataType identifier for this object.
 java.util.Calendar getEnrollmentDate()
          Returns the date on which this CourseMembership (enrollment record) object was created.
 BbList getFavoriteLinks()
          Returns the list of favorite links for this CourseMembership.
 boolean getHasCartridgeAccess()
          Returns the has cartridge access flag for this CourseMembership.
 BbFile getImageFile()
          Returns the image of this CourseMembership object.
 java.lang.String getIntroduction()
          Returns the introduction associated with this CourseMembership.
 boolean getIsAvailable()
          Returns the availability flag for this CourseMembership.
 java.lang.String getNotes()
          Returns the notes associated with this CourseMembership.
 java.lang.String getPersonalInfo()
          Returns the personal information associated with this CourseMembership .
 CourseMembership.Role getRole()
          Returns the role for this CourseMembership.
 User getUser()
          Returns the User attribute associated with this CourseMembership.
 Id getUserId()
          Returns the user Id associated with this CourseMembership .
 void setCourseId(Id iCourseId)
          Sets the course Id value for this CourseMembership.
 void setDataSourceId(Id iDataSourceId)
          Sets the data source Id value for this CourseMembership.
 void setEnrollmentDate(java.util.Calendar cEnrollmentDate)
          Sets the enrollment date for this CourseMembership.
 void setFavoriteLinks(BbList favoriteLinks)
          Sets the list of favorite links for this CourseMembership.
 void setHasCartridgeAccess(boolean bHasCartridgeAccess)
          Sets the has cartridge flag for this CourseMembership.
 void setImageFile(BbFile imageFile)
          Sets the image value for this CourseMembership object.
 void setIntroduction(java.lang.String strIntroduction)
          Sets the introduction associated with this CourseMembership.
 void setIsAvailable(boolean bIsAvailable)
          Sets the availability flag for this CourseMembership.
 void setNotes(java.lang.String strNotes)
          Sets the notes associated with this CourseMembership.
 void setPersonalInfo(java.lang.String strPersonalInfo)
          Sets the personal information associated with this CourseMembership .
 void setRole(CourseMembership.Role eRole)
          Sets the role for this CourseMembership.
 void setUser(User user)
          Sets the User associated with this CourseMembership.
 void setUserId(Id iUserId)
          Sets the user Id value for this CourseMembership.
 
Methods inherited from class blackboard.data.BbObject
clone, getBbAttributes, getCreatedDate, getId, getModifiedDate, persist, setCreatedDate, setId, setModifiedDate, toString, validate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DATA_TYPE

public static final DataType DATA_TYPE

COURSE_MEMBERSHIP_DATA_TYPE

public static final DataType COURSE_MEMBERSHIP_DATA_TYPE
Deprecated. Use the constant DATA_TYPE instead
Constructor Detail

CourseMembership

public CourseMembership()
Creates an instance of CourseMembership with default property values.

Method Detail

getUserId

public Id getUserId()
Returns the user Id associated with this CourseMembership .

Returns:
user Id value for this course membership

setUserId

public void setUserId(Id iUserId)
Sets the user Id value for this CourseMembership.

Parameters:
iUserId - the user Id value to use for this course membership

getCourseId

public Id getCourseId()
Returns the course Id associated with this CourseMembership .

Returns:
course Id value for this course membership

setCourseId

public void setCourseId(Id iCourseId)
Sets the course Id value for this CourseMembership.

Parameters:
iCourseId - the course Id value to use for this course membership

getDataSourceId

public Id getDataSourceId()
Returns the data source Id of this CourseMembership.

Returns:
data source Id value for this course membership

setDataSourceId

public void setDataSourceId(Id iDataSourceId)
Sets the data source Id value for this CourseMembership.

Parameters:
iDataSourceId - a data source Id value to use for this course membership

getIsAvailable

public boolean getIsAvailable()
Returns the availability flag for this CourseMembership.

Specified by:
getIsAvailable in interface Available
Returns:
a boolean denoting whether this course membership is available

setIsAvailable

public void setIsAvailable(boolean bIsAvailable)
Sets the availability flag for this CourseMembership.

Specified by:
setIsAvailable in interface Available
Parameters:
bIsAvailable - true if this course membership is to be made available, false otherwise.

getRole

public CourseMembership.Role getRole()
Returns the role for this CourseMembership.

Returns:
a role value as defined in CourseMembership.Role
See Also:
CourseMembership.Role

setRole

public void setRole(CourseMembership.Role eRole)
Sets the role for this CourseMembership.

Parameters:
eRole - a valid role value as defined in CourseMembership.Role
See Also:
CourseMembership.Role

getHasCartridgeAccess

public boolean getHasCartridgeAccess()
Returns the has cartridge access flag for this CourseMembership. When a course cartridge has been "imported" into a course, all the students of the course are required to prove their ability to access the content by authenticating against the cartridge server (provide a key). Until they have, they should not be allowed to access cartridge content.

Returns:
a boolean denoting whether the user represented by this course membership has access to cartridge content within the course

setHasCartridgeAccess

public void setHasCartridgeAccess(boolean bHasCartridgeAccess)
Sets the has cartridge flag for this CourseMembership. This should be set to "true" if the user has successfully authenticated against the cartridge server for access to cartridge content within the course.

Parameters:
bHasCartridgeAccess - true if the user represented by this course membership can access cartridge content in the course, false otherwise.

getFavoriteLinks

public BbList getFavoriteLinks()
Returns the list of favorite links for this CourseMembership.

Returns:
a BbList with the favorite links defined for the course membership object

setFavoriteLinks

public void setFavoriteLinks(BbList favoriteLinks)
Sets the list of favorite links for this CourseMembership.

Parameters:
favoriteLinks - a BbList containing the set of favorite links to use for this course membership

appendFavoriteLink

public void appendFavoriteLink(BbLink favoriteLink)
Appends the given BbLink to the current list of favorite links currently defined for this CourseMembership. Nothing will be added to the list if the given BbLink is null.

Parameters:
favoriteLink - the BbLink to append to the current list of favorite links

getImageFile

public BbFile getImageFile()
Returns the image of this CourseMembership object.

Returns:
a BbFile representing the image of this course membership

setImageFile

public void setImageFile(BbFile imageFile)
Sets the image value for this CourseMembership object.

Parameters:
imageFile - a BbFile with the image for this course membership

getIntroduction

public java.lang.String getIntroduction()
Returns the introduction associated with this CourseMembership.

Returns:
the introduction value of this course membership as a String

setIntroduction

public void setIntroduction(java.lang.String strIntroduction)
Sets the introduction associated with this CourseMembership.

Parameters:
strIntroduction - a String containing the introduction for this course membership

getPersonalInfo

public java.lang.String getPersonalInfo()
Returns the personal information associated with this CourseMembership .

Returns:
a String containing the personal information value of this course membership

setPersonalInfo

public void setPersonalInfo(java.lang.String strPersonalInfo)
Sets the personal information associated with this CourseMembership .

Parameters:
strPersonalInfo - a String containing the personal information for this course membership

getNotes

public java.lang.String getNotes()
Returns the notes associated with this CourseMembership. Notes are entered using the "Electric Blackboard" tool within a course.

Returns:
a String containing the notes value of this course membership

setNotes

public void setNotes(java.lang.String strNotes)
Sets the notes associated with this CourseMembership. Notes are entered using the "Electric Blackboard" tool within a course.

Parameters:
strNotes - a String containing the notes for this course membership

getEnrollmentDate

public java.util.Calendar getEnrollmentDate()
Returns the date on which this CourseMembership (enrollment record) object was created.

Returns:
a Calendar representing the enrollment date of this CourseMembership

setEnrollmentDate

public void setEnrollmentDate(java.util.Calendar cEnrollmentDate)
Sets the enrollment date for this CourseMembership. This value does not need to be set when creating a new enrollment record because the database will default to the current date if a value is not provided.

Parameters:
cEnrollmentDate - a Calendar to use for the enrollment date

getUser

public User getUser()
Returns the User attribute associated with this CourseMembership.

This attribute is a "heavy" attribute and only contains a value if this CourseMembership was loaded using a "heavy" load method. Accessing this value when it has not been loaded is an error.

Returns:
the user value for this course membership

setUser

public void setUser(User user)
Sets the User associated with this CourseMembership.

Parameters:
user - the user attribute to use for this course membership

getDataType

public DataType getDataType()
Returns the DataType identifier for this object. Can be used to uniquely identify the "type" of this data object.

Specified by:
getDataType in interface IBbObject
Specified by:
getDataType in class BbObject
Returns:
the DataType for this object


Copyright © 2003 Blackboard, Inc. All Rights Reserved.