org.oscelot.webct.dao
Class LearningContextService

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

public class LearningContextService
extends java.lang.Object

The LearningContextService is a singleton utility that allows learning context data to be retrieved from within the Vista authentication module framework given a learning context Id. A learning context value object (LearningContextVO) is returned.

This service also allows the learning context children for a given learning context Id to be retrieved. A list of learning context Ids is returned.

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

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

Method Summary
 java.util.List getCrossListedChildren(java.lang.Long lcId)
          Retrieve a list of learning context Ids of the children for a given parent learning context Id.
 java.lang.Long getCrossListedParent(java.lang.Long lcId)
          Retrieve the learning context of the parent for a given child learning context Id.
 LearningContextVO getCrossListedParentInfo(java.lang.Long lcId)
          Retrieve the learning context of the parent for a given child learning context Id.
 java.util.Map getCrossListedSections()
          Retrieve a map of cross-listed sections.
static LearningContextService getInstance()
          Returns an instance of this service
 LearningContextVO getLCAncestor(java.lang.Long lcId, int typeLevel)
          Retrieves the learning context data for an ancestor learning context of a given type.
 java.util.List getLCChildren(long lcId)
          Deprecated. Use the getLCChildren(Long) method instead
 java.util.List getLCChildren(java.lang.Long lcId)
          Retrieve a list of learning context Ids (children) for a given learning context Id.
 java.lang.Long getLCIdAncestor(java.lang.Long lcId, int typeLevel)
          Retrieves the learning context Id for an ancestor learning context of a given type.
 LearningContextVO getLCInfo(java.lang.Long lcId)
          Retrieves the learning context data given a learning context Id
 java.lang.String getLCPathAncestor(java.lang.Long lcId, int typeLevel)
          Retrieves the path from the server level to an ancestor learning context of a given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static LearningContextService getInstance()
Returns an instance of this service

Returns:
LearningContextService

getLCInfo

public LearningContextVO getLCInfo(java.lang.Long lcId)
                            throws VistaDataException
Retrieves the learning context data given a learning context Id

Parameters:
lcId - learning context Id
Returns:
learning context value object
Throws:
VistaDataException

getLCIdAncestor

public java.lang.Long getLCIdAncestor(java.lang.Long lcId,
                                      int typeLevel)
                               throws VistaDataException
Retrieves the learning context Id for an ancestor learning context of a given type. The type level parameter should be one of the constants defined by the LearningContextVO class.

Parameters:
lcId - learning context Id
typeLevel - ancestor learning context type level
Returns:
learning context value object
Throws:
VistaDataException

getLCAncestor

public LearningContextVO getLCAncestor(java.lang.Long lcId,
                                       int typeLevel)
                                throws VistaDataException
Retrieves the learning context data for an ancestor learning context of a given type. The type level parameter should be one of the constants defined by the LearningContextVO class.

Parameters:
lcId - learning context Id
typeLevel - ancestor learning context type level
Returns:
learning context value object
Throws:
VistaDataException

getLCPathAncestor

public java.lang.String getLCPathAncestor(java.lang.Long lcId,
                                          int typeLevel)
                                   throws VistaDataException
Retrieves the path from the server level to an ancestor learning context of a given type. The type level parameter should be one of the constants defined by the LearningContextVO class.

Parameters:
lcId - learning context Id
typeLevel - ancestor learning context type level
Returns:
path to learning context
Throws:
VistaDataException

getLCChildren

public java.util.List getLCChildren(long lcId)
                             throws VistaDataException
Deprecated. Use the getLCChildren(Long) method instead

Parameters:
lcId - learning context Id
Returns:
list of learning context Ids (List<Long>)
Throws:
VistaDataException

getLCChildren

public java.util.List getLCChildren(java.lang.Long lcId)
                             throws VistaDataException
Retrieve a list of learning context Ids (children) for a given learning context Id.

Parameters:
lcId - learning context Id
Returns:
list of learning context Ids (List<Long>)
Throws:
VistaDataException

getCrossListedSections

public java.util.Map getCrossListedSections()
                                     throws VistaDataException
Retrieve a map of cross-listed sections.

Returns:
map of cross-listed sections (child, parent) (Map<Long, Long>)
Throws:
VistaDataException

getCrossListedChildren

public java.util.List getCrossListedChildren(java.lang.Long lcId)
                                      throws VistaDataException
Retrieve a list of learning context Ids of the children for a given parent learning context Id.

Parameters:
lcId - learning context Id of parent section
Returns:
list of child learning context Ids (List<Long>)
Throws:
VistaDataException

getCrossListedParent

public java.lang.Long getCrossListedParent(java.lang.Long lcId)
                                    throws VistaDataException
Retrieve the learning context of the parent for a given child learning context Id.

Parameters:
lcId - learning context Id of child section
Returns:
parent learning context Id (Long)
Throws:
VistaDataException

getCrossListedParentInfo

public LearningContextVO getCrossListedParentInfo(java.lang.Long lcId)
                                           throws VistaDataException
Retrieve the learning context of the parent for a given child learning context Id.

Parameters:
lcId - learning context Id of child section
Returns:
parent learning context (LearningContextVO)
Throws:
VistaDataException