org.oscelot.webct.dao
Class LearningContextVO

java.lang.Object
  extended byorg.oscelot.webct.dao.LearningContextVO

public class LearningContextVO
extends java.lang.Object

The LearningContextVO is a value object that contains details about the learning context.

Based on com.webct.platform.sdkext.authmoduledata.LearningContextVO

Version:
2.5 (31-Oct-11)
Author:
Stephen P Vickers

Field Summary
static int TYPELEVEL_ALL
           
static int TYPELEVEL_COURSE
           
static int TYPELEVEL_DIVISION
           
static int TYPELEVEL_DOMAIN
           
static int TYPELEVEL_GROUP
           
static int TYPELEVEL_INSTITUTION
           
static int TYPELEVEL_LEARNING_GROUP
           
static int TYPELEVEL_SECTION
           
static int TYPELEVEL_SERVER
           
 
Constructor Summary
LearningContextVO()
          Deprecated. LearningContextVO objects should be created using the LearningContextService.getLCInfo(Long) and UserService.getLearningContexts(String, int) methods.
LearningContextVO(java.lang.String administrativePeriod, java.lang.String endDate, int endDateRestricted, java.lang.String fullDescription, java.lang.String glcId, java.lang.String imsId, java.lang.String imsSource, long lcId, java.lang.String longDescription, java.lang.String name, java.lang.String organizationName, java.lang.String organizationType, java.lang.String organizationUnit, long parentLcId, java.lang.String path, java.lang.String startDate, int startDateRestricted, java.lang.String templateId, java.lang.String title, int typeLevel)
          Deprecated. LearningContextVO objects should be created using the LearningContextService.getLCInfo(Long) and UserService.getLearningContexts(String, int) methods.
 
Method Summary
 java.lang.String getAdministrativePeriod()
          Get the administrative period
 java.util.Map getChildMembers()
          Get a map of members and the learning context in which their enrolment exists.
 java.util.Map getChildMembers(java.lang.String role)
          Get a map of members and the learning context in which their enrolment exists The learning context ID will be the same as the current learning context except where it is the parent of a cross-listed set of sections.
 java.util.List getCrossListedChildren()
          Retrieve a list of learning context Ids of the children for this learning context.
 java.lang.Long getCrossListedParent()
          Retrieve the learning context Id of the parent for this learning context.
 LearningContextVO getCrossListedParentInfo()
          Retrieve the LearningContextVO of the parent for this learning context.
 java.lang.String getDataSource()
          Get the data source
 java.lang.String getEmail()
          Get the email
 java.lang.String getEndDate()
          Deprecated. Use the getEndDateTime() method instead
 int getEndDateRestricted()
          Deprecated. Use the isEndDateRestricted() method instead
 java.lang.Long getEndDateTime()
          Get the end date
 java.lang.String getFormattedName(java.lang.String format)
          Get a formatted learning context name.
 java.lang.String getFormattedName(java.lang.String format, java.lang.String dateFormat, java.lang.String timeFormat)
          Get a formatted learning context name (with specified date and time formats).
 java.lang.String getFullDescription()
          Get the full description
 java.lang.String getGlcId()
          Get the global learning context Id
 java.lang.String getImsId()
          Get the IMS Id
 java.lang.String getImsSource()
          Get the IMS source
 java.lang.Long getInstitutionLCId()
          Get the parent learning context Id
 java.lang.Long getLastArchivedDateTime()
          Get the last archived date
 long getLcId()
          Deprecated. Use the getLCId() method instead
 java.lang.Long getLCId()
          Get the learning context Id
 java.lang.String getLongDescription()
          Get the long description
 java.util.List getMemberIDsWhere(int fieldType, java.lang.String fieldName, java.lang.String fieldValue, java.util.List roles)
          Get a list of member IDs satisfying a specified condition
 java.util.List getMembers()
          Get a list of members
 java.util.List getMembers(java.util.List roles, int pageNum, int pageSize)
          Get a list of members
 java.util.List getMembers(java.lang.String role)
          Get a list of members
 java.util.List getMembers(java.lang.String role, int pageNum, int pageSize)
          Get a list of members
 java.util.Map getMemberSettingsWhere(int fieldType, java.lang.String fieldName, java.lang.String fieldValue, java.util.List roles)
          Get a map of member setting values satisfying a specified condition
 java.util.List getMembersWhere(int fieldType, java.lang.String fieldName, java.lang.String fieldValue, java.util.List roles, int pageNum, int pageSize)
          Get a list of members satisfying a specified condition
 java.lang.String getName()
          Get the learning context name
 java.lang.Long getNumMembersWhere(int fieldType, java.lang.String fieldName, java.lang.String fieldValue, java.util.List roles)
          Get a count of members satisfying a specified condition
 java.lang.String getOrganizationName()
          Get the organization name
 java.lang.String getOrganizationType()
          Get the organization type
 java.lang.String getOrganizationUnit()
          Get the organization unit
 long getParentLcId()
          Deprecated. Use the getParentLCId() method instead
 java.lang.Long getParentLCId()
          Get the parent learning context Id
 java.lang.String getPath()
          Get the learning context path
 java.lang.String getStartDate()
          Deprecated. Use the getStartDateTime() method instead
 int getStartDateRestricted()
          Deprecated. Use the isStartDateRestricted() method instead
 java.lang.Long getStartDateTime()
          Get the start date
 java.lang.String getTemplateId()
          Get the template Id
 TermVO getTerm()
          Get the term
 java.lang.String getTitle()
          Get the learning context title
 java.lang.String getTypeLabel()
          Get the learning context type label
 int getTypeLevel()
          Get the learning context type level
 java.lang.String getWebLink()
          Get the web link
 boolean isCourse()
          Is this learning context a course?
 boolean isCrossListedChild()
          Is the learning context a cross-listed child section?
 boolean isCrossListedParent()
          Is the learning context a cross-listed parent section?
 boolean isDivision()
          Is this learning context a division?
 boolean isDomain()
          Is this learning context a domain?
 boolean isEndDateRestricted()
          Is the end date restricted?
 boolean isGroup()
          Is this learning context a group?
 boolean isInstitution()
          Is this learning context an institution?
 boolean isSection()
          Is this learning context a section?
 boolean isServer()
          Is this learning context a server?
 boolean isStartDateRestricted()
          Is the start date restricted?
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPELEVEL_SERVER

public static final int TYPELEVEL_SERVER
See Also:
Constant Field Values

TYPELEVEL_DOMAIN

public static final int TYPELEVEL_DOMAIN
See Also:
Constant Field Values

TYPELEVEL_INSTITUTION

public static final int TYPELEVEL_INSTITUTION
See Also:
Constant Field Values

TYPELEVEL_DIVISION

public static final int TYPELEVEL_DIVISION
See Also:
Constant Field Values

TYPELEVEL_GROUP

public static final int TYPELEVEL_GROUP
See Also:
Constant Field Values

TYPELEVEL_COURSE

public static final int TYPELEVEL_COURSE
See Also:
Constant Field Values

TYPELEVEL_SECTION

public static final int TYPELEVEL_SECTION
See Also:
Constant Field Values

TYPELEVEL_LEARNING_GROUP

public static final int TYPELEVEL_LEARNING_GROUP
See Also:
Constant Field Values

TYPELEVEL_ALL

public static final int TYPELEVEL_ALL
See Also:
Constant Field Values
Constructor Detail

LearningContextVO

public LearningContextVO()
Deprecated. LearningContextVO objects should be created using the LearningContextService.getLCInfo(Long) and UserService.getLearningContexts(String, int) methods.


LearningContextVO

public LearningContextVO(java.lang.String administrativePeriod,
                         java.lang.String endDate,
                         int endDateRestricted,
                         java.lang.String fullDescription,
                         java.lang.String glcId,
                         java.lang.String imsId,
                         java.lang.String imsSource,
                         long lcId,
                         java.lang.String longDescription,
                         java.lang.String name,
                         java.lang.String organizationName,
                         java.lang.String organizationType,
                         java.lang.String organizationUnit,
                         long parentLcId,
                         java.lang.String path,
                         java.lang.String startDate,
                         int startDateRestricted,
                         java.lang.String templateId,
                         java.lang.String title,
                         int typeLevel)
Deprecated. LearningContextVO objects should be created using the LearningContextService.getLCInfo(Long) and UserService.getLearningContexts(String, int) methods.

Parameters:
administrativePeriod - administrative period
endDate - end date
endDateRestricted - end date restricted
fullDescription - full description
glcId - global learning context Id
imsId - ims Id
imsSource - ims source
lcId - learning context Id
longDescription - long description
name - name
organizationName - organization name
organizationType - organization type
organizationUnit - organization unit
parentLcId - parent learning context Id
path - path
startDate - start date
startDateRestricted - start date restricted
templateId - template Id
title - title
typeLevel - type level
Method Detail

getAdministrativePeriod

public java.lang.String getAdministrativePeriod()
Get the administrative period

Returns:
String - administrative period

getDataSource

public java.lang.String getDataSource()
Get the data source

Returns:
String - data source

getEmail

public java.lang.String getEmail()
Get the email

Returns:
String - email

getEndDate

public java.lang.String getEndDate()
Deprecated. Use the getEndDateTime() method instead

Returns:
String - end date (unix epoch time in milliseconds)

getEndDateTime

public java.lang.Long getEndDateTime()
Get the end date

Returns:
Long - end date (unix epoch time in milliseconds)

getEndDateRestricted

public int getEndDateRestricted()
Deprecated. Use the isEndDateRestricted() method instead

Returns:
boolean - is the end date restricted

getFullDescription

public java.lang.String getFullDescription()
Get the full description

Returns:
String - full description

getGlcId

public java.lang.String getGlcId()
Get the global learning context Id

Returns:
String - global learning context Id

getImsId

public java.lang.String getImsId()
Get the IMS Id

Returns:
String - IMS Id

getImsSource

public java.lang.String getImsSource()
Get the IMS source

Returns:
String IMS source

getInstitutionLCId

public java.lang.Long getInstitutionLCId()
Get the parent learning context Id

Returns:
Long - institution learning context Id (null if server or domain level)

getLastArchivedDateTime

public java.lang.Long getLastArchivedDateTime()
Get the last archived date

Returns:
Long - last archived date (unix epoch time in milliseconds)

getLcId

public long getLcId()
Deprecated. Use the getLCId() method instead

Returns:
long - learning context Id

getLCId

public java.lang.Long getLCId()
Get the learning context Id

Returns:
Long - learning context Id

getLongDescription

public java.lang.String getLongDescription()
Get the long description

Returns:
String - long description

getName

public java.lang.String getName()
Get the learning context name

Returns:
String - learning context name

getOrganizationName

public java.lang.String getOrganizationName()
Get the organization name

Returns:
String - organization name

getOrganizationType

public java.lang.String getOrganizationType()
Get the organization type

Returns:
String - organization type

getOrganizationUnit

public java.lang.String getOrganizationUnit()
Get the organization unit

Returns:
String - organization unit

getParentLcId

public long getParentLcId()
Deprecated. Use the getParentLCId() method instead

Returns:
long - parent learning context Id

getParentLCId

public java.lang.Long getParentLCId()
Get the parent learning context Id

Returns:
Long - parent learning context Id

getPath

public java.lang.String getPath()
Get the learning context path

Returns:
String - learning context path

getStartDate

public java.lang.String getStartDate()
Deprecated. Use the getStartDateTime() method instead

Returns:
String - start date (unix epoch time in milliseconds)

getStartDateTime

public java.lang.Long getStartDateTime()
Get the start date

Returns:
Long - start date (unix epoch time in milliseconds)

getStartDateRestricted

public int getStartDateRestricted()
Deprecated. Use the isStartDateRestricted() method instead

Returns:
boolean - is the start date restricted

getTemplateId

public java.lang.String getTemplateId()
Get the template Id

Returns:
String - learning context template Id

getTitle

public java.lang.String getTitle()
Get the learning context title

Returns:
String - learning context title

getTypeLabel

public java.lang.String getTypeLabel()
Get the learning context type label

Returns:
String - returns the type label (GROUP, COURSE, SECTION, ...)

getTypeLevel

public int getTypeLevel()
Get the learning context type level

Returns:
int - type level

getWebLink

public java.lang.String getWebLink()
Get the web link

Returns:
String - web link

getTerm

public TermVO getTerm()
Get the term

Returns:
TermVO - term

getFormattedName

public java.lang.String getFormattedName(java.lang.String format)
Get a formatted learning context name.

The format parameter is used to specify how a name is displayed. It uses the same variable substitution as used by WebCT in the My Blackboard settings for the Section link display and Section description display:

The following additional variable substitutions are supported:

Any date and time substitutions will use formats of d-MMM-yyyy and HH:mm but these defaults can be overridden by including a dateformat and/or timeformat setting in the properties file. If the learning context does not have a parent (i.e. server level) no substitution is performed for parent-related variables.

Parameters:
format - format of name to be generated
Returns:
String - formatted learning context name

getFormattedName

public java.lang.String getFormattedName(java.lang.String format,
                                         java.lang.String dateFormat,
                                         java.lang.String timeFormat)
Get a formatted learning context name (with specified date and time formats).

See getFormattedName(String) method for details of the format parameter.

The date and time formats should be strings using the patterns supported by java.text.SimpleDateFormat. Null values will cause the default to be used. Note that it is possible to include time patterns in the date format string and vice versa.

Parameters:
format - format of name to be generated
dateFormat - format for displaying dates
timeFormat - format for displaying times
Returns:
String - formatted learning context name

getMembers

public java.util.List getMembers()
Get a list of members

Returns:
List - list of members (as UserVO elements)

getMembers

public java.util.List getMembers(java.lang.String role)
Get a list of members

Parameters:
role - the role which members should have (null for any role)
Returns:
List - list of members (as UserVO elements)

getMembers

public java.util.List getMembers(java.lang.String role,
                                 int pageNum,
                                 int pageSize)
Get a list of members

Parameters:
role - the role which members should have (null for any role)
pageNum - the page number of the set of members to return (0 for all)
pageSize - the maximum number of members to return (0 for default)
Returns:
List - list of members (as UserVO elements)

getMembers

public java.util.List getMembers(java.util.List roles,
                                 int pageNum,
                                 int pageSize)
Get a list of members

Parameters:
roles - list containing the roles which members should have at least one of (null for any role)
pageNum - the page number of the set of members to return (0 for all)
pageSize - the maximum number of members to return (0 for default)
Returns:
List - list of members (as UserVO elements)

getMembersWhere

public java.util.List getMembersWhere(int fieldType,
                                      java.lang.String fieldName,
                                      java.lang.String fieldValue,
                                      java.util.List roles,
                                      int pageNum,
                                      int pageSize)
Get a list of members satisfying a specified condition

Parameters:
fieldType - one of the constants representing the type of field being used as a selection condition
fieldName - name of the field used in the selection condition
fieldValue - LIKE clause to apply to the field (null for any non-null value)
roles - list containing the roles which members should have at least one of (null for any role)
pageNum - the page number of the set of members to return (0 for all)
pageSize - the maximum number of members to return (0 for default)
Returns:
List - list of members (as UserVO elements)

getMemberIDsWhere

public java.util.List getMemberIDsWhere(int fieldType,
                                        java.lang.String fieldName,
                                        java.lang.String fieldValue,
                                        java.util.List roles)
Get a list of member IDs satisfying a specified condition

Parameters:
fieldType - one of the constants representing the type of field being used as a selection condition
fieldName - name of the field used in the selection condition
fieldValue - LIKE clause to apply to the field (null for any non-null value)
roles - list containing the roles which members should have at least one of (null for any role)
Returns:
List - list of members IDs

getMemberSettingsWhere

public java.util.Map getMemberSettingsWhere(int fieldType,
                                            java.lang.String fieldName,
                                            java.lang.String fieldValue,
                                            java.util.List roles)
Get a map of member setting values satisfying a specified condition

Parameters:
fieldType - one of the constants representing the type of field being used as a selection condition
fieldName - name of the field used in the selection condition
fieldValue - LIKE clause to apply to the field (null for any non-null value)
roles - list containing the roles which members should have at least one of (null for any role)
Returns:
Map - map of member IDs and related setting values

getNumMembersWhere

public java.lang.Long getNumMembersWhere(int fieldType,
                                         java.lang.String fieldName,
                                         java.lang.String fieldValue,
                                         java.util.List roles)
Get a count of members satisfying a specified condition

Parameters:
fieldType - one of the constants representing the type of field being used as a selection condition
fieldName - name of the field used in the selection condition
fieldValue - LIKE clause to apply to the field (null for any non-null value)
roles - list containing the roles which members should have at least one of (null for any role)
Returns:
List - list of members (as UserVO elements)

getChildMembers

public java.util.Map getChildMembers()
Get a map of members and the learning context in which their enrolment exists. The learning context ID will be the same as the current learning context except where it is the parent of a cross-listed set of sections.

Returns:
Map - members with associated learning context (Map<UserVO, Long>)

getChildMembers

public java.util.Map getChildMembers(java.lang.String role)
Get a map of members and the learning context in which their enrolment exists The learning context ID will be the same as the current learning context except where it is the parent of a cross-listed set of sections.

Parameters:
role - the role which members should have (null for any role)
Returns:
Map - members with associated learning context (Map<UserVO, Long>)

getCrossListedChildren

public java.util.List getCrossListedChildren()
                                      throws VistaDataException
Retrieve a list of learning context Ids of the children for this learning context.

Returns:
list of child learning context Ids (List<Long>)
Throws:
VistaDataException

getCrossListedParent

public java.lang.Long getCrossListedParent()
                                    throws VistaDataException
Retrieve the learning context Id of the parent for this learning context.

Returns:
parent learning context Id (Long)
Throws:
VistaDataException

getCrossListedParentInfo

public LearningContextVO getCrossListedParentInfo()
                                           throws VistaDataException
Retrieve the LearningContextVO of the parent for this learning context.

Returns:
parent learning context (LearningContextVO)
Throws:
VistaDataException

isServer

public boolean isServer()
Is this learning context a server?

Returns:
boolean - is this learning context a server

isDomain

public boolean isDomain()
Is this learning context a domain?

Returns:
boolean - is this learning context a domain

isInstitution

public boolean isInstitution()
Is this learning context an institution?

Returns:
boolean - is this learning context an institution

isDivision

public boolean isDivision()
Is this learning context a division?

Returns:
boolean - is this learning context a division

isGroup

public boolean isGroup()
Is this learning context a group?

Returns:
boolean - is this learning context a group

isCourse

public boolean isCourse()
Is this learning context a course?

Returns:
boolean - is this learning context a course

isSection

public boolean isSection()
Is this learning context a section?

Returns:
boolean - is this learning context a section

isStartDateRestricted

public boolean isStartDateRestricted()
Is the start date restricted?

Returns:
boolean - is the start date restricted

isEndDateRestricted

public boolean isEndDateRestricted()
Is the end date restricted?

Returns:
boolean - is the end date restricted

isCrossListedParent

public boolean isCrossListedParent()
Is the learning context a cross-listed parent section?

Returns:
boolean - is a cross-listed parent section

isCrossListedChild

public boolean isCrossListedChild()
Is the learning context a cross-listed child section?

Returns:
boolean - is a cross-listed child section

toString

public java.lang.String toString()