com.xerceo.learn
Class LearnContext

java.lang.Object
  extended by com.xerceo.ManagedAppContext
      extended by com.xerceo.learn.LearnContext
All Implemented Interfaces:
CourseCompletedEventListener, PrerequisitesStatusProvider, java.io.Serializable, java.util.EventListener, javax.management.NotificationListener, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean

public class LearnContext
extends ManagedAppContext
implements java.io.Serializable, PrerequisitesStatusProvider, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, CourseCompletedEventListener

Xerceo Learn application context Singleton JavaBean.

Version:
#xerceo-1.0#
Author:
tim.potter@xerceo.com
See Also:
Serialized Form

Field Summary
protected  java.lang.String beanName
           
protected  java.util.Properties config
          Configuration properties.
protected  ContentRepository contentRepository
          An interface to a content repository, such as a database.
protected  EventService eventService
           
protected  ExtensibleProfileFactory extProfileFactory
           
protected  GlobalObjectiveManager globalObjMgr
          An interface to a global objective management provider, such as a database.
static java.lang.String ID
           
protected  LearnerManager lrnrMgr
          An interface to a learner management provider, such as a database.
protected  javax.mail.Session mailSession
          A reference to a JavaMail Session
protected  java.lang.String orgId
           
protected  PortalContext portal
           
protected  ReportManager reportMgr
          An interface to a report management provider, such as a database.
protected  PortalRoleVerifier roleVerifier
           
protected  RuleManager ruleManager
          An interface to a rule manager.
protected  org.apache.velocity.app.VelocityEngine velocityEngine
           
static Messages xmsg
           
 
Fields inherited from class com.xerceo.ManagedAppContext
APP_ID, AVAILABLE, DEFAULT_NS_URI, DEGRADED, DEV_MODE, enableJMX, ENV, FAILED, FAILING, INVALID_LICENSE, isMBeanServerOwner, jmxAgentId, jmxHttpAdaptor, jmxService, LICENSE_XML, licenseType, MBEAN_XML, mbeanName, mbeanNameBase, NO_LICENSE, PRODUCTION_MODE, realPath, startTimeMillis, statusInfo, UNAVAILABLE, version
 
Constructor Summary
LearnContext()
          Creates an instance of the Xerceo Learn application context.
 
Method Summary
 void addCommitPayloadSize(long size)
           
 void addCourse(Course course)
          Adds a new course to the runtime environment.
 void addFinishPayloadSize(long size)
           
 void afterPropertiesSet()
           
 boolean checkPrerequisites(java.lang.String learnerId, java.lang.String courseId, SCOData scoData)
          Determines if a user has satisfied all of the prerequisites in order to launch a given SCO.
 void clearSCODataCache()
           
 void clearTemplates()
          Clears all cached XSL Templates objects used for creating certificates of completion.
 java.util.Collection courseCollection()
          Returns a Collection of Course objects for all courses in the runtime environment.
 void createCertificate(java.lang.String learnerId, java.lang.String courseId, java.lang.String date, org.xml.sax.ContentHandler sax)
          Creates an XML document that can be transformed into a certificate of completion for a course.
protected  void createEventTypes()
           
 void createSeedData()
           
 void deleteGlobalObjectiveProgress(java.lang.String learnerId, java.lang.String objId)
           
 boolean drop(java.lang.String learnerId, java.lang.String courseId)
          Drops a course for a specific user.
 boolean exists(java.lang.String courseId)
          Determines if a course exists in the runtime environment.
 java.lang.String exportCourseStats(java.lang.String courseId, java.util.Properties filter, java.io.OutputStream out, java.util.Locale locale)
          Exports statistics for a course as XML.
 java.lang.String exportTranscript(java.lang.String adminId, java.lang.String createdOn, java.util.Locale adminLocale, java.lang.String learnerId, java.lang.String transcriptName)
          Exports a learner transcript to an XML file for a specific user.
 java.util.Iterator findCourses(CourseSearchCriteria searchCriteria)
          Returns an iterator over a sorted list of Course objects for all courses in the runtime environment that match the specified search criteria.
 java.util.Set findLearnersWithRule(Rule rule)
          Performs the Who report.
 void finishSCOData(java.lang.String learnerId, java.lang.String courseId, SCOData scoData, ActivityTree tree)
          Saves a SCO data record to persistent storage.
 java.util.Iterator getActivitiesForObjective(java.lang.String goId)
           
 java.util.Map getActivityMapForObjective(java.lang.String goId)
           
 ActivityTree getActivityTree(java.lang.String learnerId, java.lang.String courseId)
           
 java.lang.String getAppKey()
           
 java.lang.String getAppName()
           
 java.lang.String getAssetLaunchPath(java.lang.String context, java.lang.String courseId, java.lang.String assetId)
          Implements a mapping of an asset launch path specified in the imsmanifest.xml file to a real URL path on this server.
 double getAverageCommitTime()
           
 double getAverageFailureCommitTime()
           
 double getAverageFailureFinishTime()
           
 double getAverageFailureInitializeTime()
           
 double getAverageFailureLaunchTime()
           
 double getAverageFinishTime()
           
 double getAverageInitializeTime()
           
 double getAverageLaunchTime()
           
 double getAverageSuccessCommitTime()
           
 double getAverageSuccessFinishTime()
           
 double getAverageSuccessInitializeTime()
           
 double getAverageSuccessLaunchTime()
           
 double getAvgCommitPayloadSize()
           
 double getAvgFinishPayloadSize()
           
 java.lang.String getBeanName()
           
 javax.xml.transform.Templates getCertificateTemplates(java.lang.String courseId)
          Returns a cached Templates object for generating the certificate of completion for a course.
 long getCommitCount()
           
 long getCommitCountPerHour()
           
 long getCommitCountPerMinute()
           
 long getCommitCountPerPeriod(long period)
           
 long getCommitCountPerSecond()
           
 ContentRepository getContentRepository()
           
 java.lang.String getContentRepositoryInfo()
           
 Course getCourse(java.lang.String courseId)
          Returns a Course object for a given course identifier.
 CatalogNode getCourseCatalog(java.lang.String catalogRootName, java.lang.String catalogRootPrefix, java.lang.String catalogDelim, java.util.Locale locale)
           
 int getCourseCount()
          Returns the number of courses currently active in the system.
 java.lang.String getCourseItemStatus(java.lang.String learnerId, java.lang.String courseId, java.lang.String itemId)
          Called by the Prerequisites parser to determine the status of a CourseItem.
 CourseStatus getCourseStatusForLearner(java.lang.String learnerId, java.lang.String courseId)
          Gets information about a learner's current status in a specific course.
 boolean getCreateSeedData()
           
 EventService getEventService()
           
 ExtensibleProfileFactory getExtensibleProfileFactory()
           
 long getFailureCommitCount()
           
 double getFailureCommitRate()
           
 long getFailureFinishCount()
           
 double getFailureFinishRate()
           
 long getFailureInitializeCount()
           
 double getFailureInitializeRate()
           
 long getFailureLaunchCount()
           
 double getFailureLaunchRate()
           
 long getFinishCount()
           
 long getFinishCountPerHour()
           
 long getFinishCountPerMinute()
           
 long getFinishCountPerPeriod(long period)
           
 long getFinishCountPerSecond()
           
 GlobalObjectiveManager getGlobalObjectiveManager()
           
 long getInitializeCount()
           
 long getInitializeCountPerHour()
           
 long getInitializeCountPerMinute()
           
 long getInitializeCountPerPeriod(long period)
           
 long getInitializeCountPerSecond()
           
 long getLaunchCount()
           
 long getLaunchCountPerHour()
           
 long getLaunchCountPerMinute()
           
 long getLaunchCountPerPeriod(long period)
           
 long getLaunchCountPerSecond()
           
 LearnerManager getLearnerManager()
           
 java.lang.String getLearnerManagerInfo()
           
 java.util.Iterator getLearners()
          Provides a list of String user identifiers for all users known to the Learn, this includes users in both the xerceo and xerceoadmin roles.
 java.util.Iterator getLearners(java.util.Properties criteria)
          Provides a list of String user identifiers for all users known to the Learn, this includes users in both the xerceo and xerceoadmin roles.
 javax.mail.Session getMailSession()
           
 int getMaxCourses()
           
 int getMaxLearners()
           
 java.lang.String getOrganization()
           
 PortalContext getPortalContext()
           
 PortalRoleVerifier getPortalRoleVerifier()
           
 java.util.Map getRegisteredLearners(java.lang.String courseId)
          Provides a sorted Map (based on user identifier) of CourseStatus objects for all users registered for a specific course.
 java.util.Map getRegisteredLearners(java.lang.String courseId, java.util.Properties filter)
          Provides a sorted Map (based on user identifier) of CourseStatus objects for all users registered for a specific course.
protected  ReportBuilder getReportBuilder(java.io.File reportsConfigFile, java.lang.String courseId)
          Dynamically loads and configures a custom report builder from the classpath for creating reports for a specific course.
 ReportBuilder getReportBuilder(java.lang.String courseId)
           
 ReportManager getReportManager()
           
 RuleManager getRuleManager()
           
 SCOData getSCOData(java.lang.String learnerId, java.lang.String courseId, java.lang.String scoId)
          Reads a SCO data record from persistent storage.
 SCOData getSCODataAfterCleanup(java.lang.String learnerId, java.lang.String courseId, java.lang.String scoId)
          Reads a SCO data record from persistent storage after clearing the cache.
 java.lang.String getSCOLaunchPath(java.lang.String context, java.lang.String courseId, java.lang.String scoId)
          Implements a mapping of a SCO launch path specified in the imsmanifest.xml file to a real URL path on this server.
 java.util.Iterator getSCOListForResource(java.lang.String refId, java.lang.String infuseId)
           
 long getSuccessCommitCount()
           
 double getSuccessCommitRate()
           
 long getSuccessFinishCount()
           
 double getSuccessFinishRate()
           
 long getSuccessInitializeCount()
           
 double getSuccessInitializeRate()
           
 long getSuccessLaunchCount()
           
 double getSuccessLaunchRate()
           
 javax.xml.transform.Templates getTemplates(java.lang.String templateName)
           
 java.util.Map getTranscriptsForLearner(java.lang.String learnerId)
           
 org.apache.velocity.app.VelocityEngine getVelocityEngine()
           
 void importTranscript(java.lang.String learnerId)
          Import a learner transcript from an XML file for a specific user.
 void importTranscript(java.lang.String learnerId, org.xml.sax.InputSource saxIn)
          Import a learner transcript from an XML file for a specific user.
protected  void initializeExt(java.util.Properties configProps)
          Initialize the Xerceo LearnContext Singleton JavaBean.
protected  org.tiling.scheduling.ScheduleIterator initializeScheduleIterator(java.lang.String iterClassName)
          Initialize the schedule iterator given the class name of the iterator.
protected  LearnTask initializeTaskObject(java.lang.String taskClassName)
          Intialize the task object specified by the task's class name.
protected  void initializeTasks()
          Schedules a set of custom tasks to run in the background of the Learn at specified intervals.
 boolean isRegistered(java.lang.String learnerId, java.lang.String courseId)
          Determines if a learner is registered for a specific course.
 boolean isSCOData(java.lang.String learnerId, java.lang.String courseId, java.lang.String scoId)
          Determines if a persistent SCO data record exists for a given learner.
 java.util.Iterator listActiveCoursesForLearner(java.lang.String learnerId)
          Provides a sorted list (based on the last access timestamp, most recently accessed courses first) of courses that a specific user is registered in, but has NOT completed.
 java.util.Iterator listCompletedCoursesForLearner(java.lang.String learnerId)
          Provides a sorted list (based on the completion date, most recently completed courses first) of courses that a specific user has completed.
 java.util.Iterator listCourseRoles()
           
 java.util.Iterator listCourses()
          Returns an iterator over a list of Course objects for all courses in the runtime environment.
 java.util.Iterator listCoursesForLearner(java.lang.String learnerId)
          Provides a sorted list (based on the last access timestamp, most recently accessed courses first) of courses that a specific user is registered for.
 java.util.Iterator listGlobalObjectiveProgressForLearner(java.lang.String learnerId)
          Provides a list of ObjectiveProgress objects that encapsulate a specific learner's current progress towards satisfying a global objective.
static java.lang.String logException(Messages XMSG, java.lang.String key, java.lang.Object[] args, LearnException lrnExc)
          Convenience method for logging an LearnException, which typically has an embedded application exception of interest.
 void onCourseCompleted(java.lang.String learnerId, java.lang.String courseId)
          Fires on course completed rules.
 void onLearnerSessionCreated(javax.servlet.ServletContext application, javax.servlet.http.HttpSession session, java.lang.String learnerId)
          Adds a user to the run-time environment; this method is called after a user has been authenticated by the application server.
 CourseStatus preloadForLaunch(java.lang.String learnerId, java.lang.String courseId)
          Performance optimization method that allows the LMS to preload SCOData instances into the cache for a learner when the learning session begins.
 void register(java.lang.String learnerId, java.lang.String learnerName, java.lang.String courseId, java.lang.String orgId, java.lang.String creditMode)
          Registers a user for a course.
 boolean removeCourse(java.lang.String courseId)
          Removes a course from the runtime environment.
 void saveSCOData(java.lang.String learnerId, java.lang.String courseId, SCOData scoData)
          Saves a SCO data record to persistent storage.
 boolean sendAdminEmail(java.util.Properties filters, java.lang.String subject, java.lang.String body)
          Sends an administration email to a set of users in the system based on filters provided.
 void setBeanName(java.lang.String beanName)
           
 void setContentRepository(ContentRepository contentRepository)
           
 void setCreateSeedData(boolean createSeedData)
           
 void setEventService(EventService eventService)
           
 void setGlobalObjectiveManager(GlobalObjectiveManager glom)
           
 void setLearnerManager(LearnerManager lrnrMgr)
           
 void setOrganization(java.lang.String orgId)
           
 void setPortalContext(PortalContext portal)
           
 void setPortalRoleVerifier(PortalRoleVerifier roleVerifier)
           
 void setReportManager(ReportManager reportMgr)
           
 void setRuleManager(RuleManager ruleManager)
           
 void setVelocityEngine(org.apache.velocity.app.VelocityEngine velocityEngine)
           
 void shutdown()
          Stops the Xerceo Learn application.
 double updateAverageCommitTime(long time)
           
 double updateAverageFailureCommitTime(long time)
           
 double updateAverageFailureFinishTime(long time)
           
 double updateAverageFailureInitializeTime(long time)
           
 double updateAverageFailureLaunchTime(long time)
           
 double updateAverageFinishTime(long time)
           
 double updateAverageInitializeTime(long time)
           
 double updateAverageLaunchTime(long time)
           
 double updateAverageSuccessCommitTime(long time)
           
 double updateAverageSuccessFinishTime(long time)
           
 double updateAverageSuccessInitializeTime(long time)
           
 double updateAverageSuccessLaunchTime(long time)
           
 void updateCourseStatus(CourseStatus courseStatus)
          Updates the CourseStatus for a learner.
 
Methods inherited from class com.xerceo.ManagedAppContext
getAgentId, getId, getLicenseType, getMBeanName, getMBeanServer, getRealPath, getResourceAsStream, getStartDateTime, getStatus, getStatus, getStatusInfo, getTimestamp, getVersion, handleNotification, initialize, initializeJMX, isJMXEnabled, loadClass, setAgentId, setEnableJMX, setJmxHttpAdaptor, setMbeanNameBase, setRealPath, setStatusInfo, startHTTPAdaptor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final java.lang.String ID
See Also:
Constant Field Values

xmsg

public static Messages xmsg

config

protected java.util.Properties config
Configuration properties.


contentRepository

protected transient ContentRepository contentRepository
An interface to a content repository, such as a database.


lrnrMgr

protected transient LearnerManager lrnrMgr
An interface to a learner management provider, such as a database.


globalObjMgr

protected transient GlobalObjectiveManager globalObjMgr
An interface to a global objective management provider, such as a database.


reportMgr

protected transient ReportManager reportMgr
An interface to a report management provider, such as a database.


ruleManager

protected transient RuleManager ruleManager
An interface to a rule manager.


mailSession

protected transient javax.mail.Session mailSession
A reference to a JavaMail Session


beanName

protected java.lang.String beanName

portal

protected PortalContext portal

extProfileFactory

protected ExtensibleProfileFactory extProfileFactory

eventService

protected EventService eventService

velocityEngine

protected org.apache.velocity.app.VelocityEngine velocityEngine

orgId

protected java.lang.String orgId

roleVerifier

protected PortalRoleVerifier roleVerifier
Constructor Detail

LearnContext

public LearnContext()
             throws ManagedAppInitializationException
Creates an instance of the Xerceo Learn application context.

Throws:
ManagedAppInitializationException
Method Detail

logException

public static final java.lang.String logException(Messages XMSG,
                                                  java.lang.String key,
                                                  java.lang.Object[] args,
                                                  LearnException lrnExc)
Convenience method for logging an LearnException, which typically has an embedded application exception of interest.

Parameters:
XMSG - The message logger service.
key - The message key.
args - The dynamic args to the MessageFormatter
lrnExc - The LearnException to log
Returns:
The formatted log message.

createSeedData

public void createSeedData()
                    throws java.lang.Exception
Throws:
java.lang.Exception

getBeanName

public java.lang.String getBeanName()

setBeanName

public void setBeanName(java.lang.String beanName)
Specified by:
setBeanName in interface org.springframework.beans.factory.BeanNameAware

getOrganization

public java.lang.String getOrganization()

setOrganization

public void setOrganization(java.lang.String orgId)

getAppKey

public java.lang.String getAppKey()
Overrides:
getAppKey in class ManagedAppContext

getAppName

public java.lang.String getAppName()
Overrides:
getAppName in class ManagedAppContext

setPortalRoleVerifier

public void setPortalRoleVerifier(PortalRoleVerifier roleVerifier)

getPortalRoleVerifier

public PortalRoleVerifier getPortalRoleVerifier()

setPortalContext

public void setPortalContext(PortalContext portal)

getPortalContext

public PortalContext getPortalContext()

setLearnerManager

public void setLearnerManager(LearnerManager lrnrMgr)

getLearnerManager

public LearnerManager getLearnerManager()

setContentRepository

public void setContentRepository(ContentRepository contentRepository)

getContentRepository

public ContentRepository getContentRepository()

setGlobalObjectiveManager

public void setGlobalObjectiveManager(GlobalObjectiveManager glom)

getReportManager

public ReportManager getReportManager()

setReportManager

public void setReportManager(ReportManager reportMgr)

getGlobalObjectiveManager

public GlobalObjectiveManager getGlobalObjectiveManager()

getExtensibleProfileFactory

public ExtensibleProfileFactory getExtensibleProfileFactory()

setEventService

public void setEventService(EventService eventService)

getEventService

public EventService getEventService()

getVelocityEngine

public org.apache.velocity.app.VelocityEngine getVelocityEngine()

setVelocityEngine

public void setVelocityEngine(org.apache.velocity.app.VelocityEngine velocityEngine)

setRuleManager

public void setRuleManager(RuleManager ruleManager)

getRuleManager

public RuleManager getRuleManager()

initializeExt

protected void initializeExt(java.util.Properties configProps)
                      throws java.lang.Exception
Initialize the Xerceo LearnContext Singleton JavaBean.

Overrides:
initializeExt in class ManagedAppContext
Throws:
java.lang.Exception

getMailSession

public javax.mail.Session getMailSession()

getMaxCourses

public final int getMaxCourses()

getMaxLearners

public final int getMaxLearners()

getContentRepositoryInfo

public final java.lang.String getContentRepositoryInfo()

getLearnerManagerInfo

public final java.lang.String getLearnerManagerInfo()

getLaunchCount

public long getLaunchCount()

getLaunchCountPerPeriod

public long getLaunchCountPerPeriod(long period)

getLaunchCountPerSecond

public long getLaunchCountPerSecond()

getLaunchCountPerMinute

public long getLaunchCountPerMinute()

getLaunchCountPerHour

public long getLaunchCountPerHour()

getAverageLaunchTime

public double getAverageLaunchTime()

getSuccessLaunchCount

public long getSuccessLaunchCount()

getSuccessLaunchRate

public double getSuccessLaunchRate()

getAverageSuccessLaunchTime

public double getAverageSuccessLaunchTime()

getFailureLaunchCount

public long getFailureLaunchCount()

getFailureLaunchRate

public double getFailureLaunchRate()

getAverageFailureLaunchTime

public double getAverageFailureLaunchTime()

updateAverageLaunchTime

public double updateAverageLaunchTime(long time)

updateAverageSuccessLaunchTime

public double updateAverageSuccessLaunchTime(long time)

updateAverageFailureLaunchTime

public double updateAverageFailureLaunchTime(long time)

getInitializeCount

public long getInitializeCount()

getInitializeCountPerPeriod

public long getInitializeCountPerPeriod(long period)

getInitializeCountPerSecond

public long getInitializeCountPerSecond()

getInitializeCountPerMinute

public long getInitializeCountPerMinute()

getInitializeCountPerHour

public long getInitializeCountPerHour()

getAverageInitializeTime

public double getAverageInitializeTime()

getSuccessInitializeCount

public long getSuccessInitializeCount()

getSuccessInitializeRate

public double getSuccessInitializeRate()

getAverageSuccessInitializeTime

public double getAverageSuccessInitializeTime()

getFailureInitializeCount

public long getFailureInitializeCount()

getFailureInitializeRate

public double getFailureInitializeRate()

getAverageFailureInitializeTime

public double getAverageFailureInitializeTime()

updateAverageInitializeTime

public double updateAverageInitializeTime(long time)

updateAverageSuccessInitializeTime

public double updateAverageSuccessInitializeTime(long time)

updateAverageFailureInitializeTime

public double updateAverageFailureInitializeTime(long time)

getCommitCount

public long getCommitCount()

getAvgCommitPayloadSize

public double getAvgCommitPayloadSize()

addCommitPayloadSize

public void addCommitPayloadSize(long size)

getAvgFinishPayloadSize

public double getAvgFinishPayloadSize()

addFinishPayloadSize

public void addFinishPayloadSize(long size)

getCommitCountPerPeriod

public long getCommitCountPerPeriod(long period)

getCommitCountPerSecond

public long getCommitCountPerSecond()

getCommitCountPerMinute

public long getCommitCountPerMinute()

getCommitCountPerHour

public long getCommitCountPerHour()

getAverageCommitTime

public double getAverageCommitTime()

getSuccessCommitCount

public long getSuccessCommitCount()

getSuccessCommitRate

public double getSuccessCommitRate()

getAverageSuccessCommitTime

public double getAverageSuccessCommitTime()

getFailureCommitCount

public long getFailureCommitCount()

getFailureCommitRate

public double getFailureCommitRate()

getAverageFailureCommitTime

public double getAverageFailureCommitTime()

updateAverageCommitTime

public double updateAverageCommitTime(long time)

updateAverageSuccessCommitTime

public double updateAverageSuccessCommitTime(long time)

updateAverageFailureCommitTime

public double updateAverageFailureCommitTime(long time)

getFinishCount

public long getFinishCount()

getFinishCountPerPeriod

public long getFinishCountPerPeriod(long period)

getFinishCountPerSecond

public long getFinishCountPerSecond()

getFinishCountPerMinute

public long getFinishCountPerMinute()

getFinishCountPerHour

public long getFinishCountPerHour()

getAverageFinishTime

public double getAverageFinishTime()

getSuccessFinishCount

public long getSuccessFinishCount()

getSuccessFinishRate

public double getSuccessFinishRate()

getAverageSuccessFinishTime

public double getAverageSuccessFinishTime()

getFailureFinishCount

public long getFailureFinishCount()

getFailureFinishRate

public double getFailureFinishRate()

getAverageFailureFinishTime

public double getAverageFailureFinishTime()

updateAverageFinishTime

public double updateAverageFinishTime(long time)

updateAverageSuccessFinishTime

public double updateAverageSuccessFinishTime(long time)

updateAverageFailureFinishTime

public double updateAverageFailureFinishTime(long time)

onLearnerSessionCreated

public void onLearnerSessionCreated(javax.servlet.ServletContext application,
                                    javax.servlet.http.HttpSession session,
                                    java.lang.String learnerId)
                             throws LearnException
Adds a user to the run-time environment; this method is called after a user has been authenticated by the application server. In other words, this method does not authenticate or authorize the user. Moreover, it shouldn't be treated as a method for adding a user to the system, which is the responsibility of an enterprise security system, not a learning management system.

Parameters:
application - The Web application context.
session - The HTTP Session.
learnerId - The ID of the user to add to the Learn.
Throws:
LearnException

getLearners

public java.util.Iterator getLearners()
                               throws LearnException
Provides a list of String user identifiers for all users known to the Learn, this includes users in both the xerceo and xerceoadmin roles.

Returns:
an Iterator of a collection of String user names.
Throws:
LearnException

getLearners

public java.util.Iterator getLearners(java.util.Properties criteria)
                               throws LearnException
Provides a list of String user identifiers for all users known to the Learn, this includes users in both the xerceo and xerceoadmin roles.

Parameters:
criteria - The filter criteria to bring back a subset of users.
Returns:
an Iterator of a collection of String user names.
Throws:
LearnException

getRegisteredLearners

public java.util.Map getRegisteredLearners(java.lang.String courseId)
                                    throws LearnException
Provides a sorted Map (based on user identifier) of CourseStatus objects for all users registered for a specific course.

Parameters:
courseId - The course identifier.
Returns:
an Mapping of user identifier to CourseStatus objects that gives information about each user that is registered for a specific course.
Throws:
LearnException - if an error occurs while reading the list of users from the underlying persistence mechanism; most likely wraps another persistence mechanism specfic exception, such as an SQLException.

getRegisteredLearners

public java.util.Map getRegisteredLearners(java.lang.String courseId,
                                           java.util.Properties filter)
                                    throws LearnException
Provides a sorted Map (based on user identifier) of CourseStatus objects for all users registered for a specific course.

Parameters:
courseId - The course identifier.
filter - The learner filter criteria, in case there are too many to bring back in a single query.
Returns:
an Mapping of user identifier to CourseStatus objects that gives information about each user that is registered for a specific course.
Throws:
LearnException - if an error occurs while reading the list of users from the underlying persistence mechanism; most likely wraps another persistence mechanism specfic exception, such as an SQLException.

listCompletedCoursesForLearner

public java.util.Iterator listCompletedCoursesForLearner(java.lang.String learnerId)
                                                  throws LearnException
Provides a sorted list (based on the completion date, most recently completed courses first) of courses that a specific user has completed.

Parameters:
learnerId - The user identifier.
Returns:
an Iterator over a collection of CourseStatus objects.
Throws:
LearnException - if an error occurs while reading the list of courses from the underlying persistence mechanism; most likely wraps another persistence mechanism specfic exception, such as an SQLException.
See Also:
CourseStatus

getCourseStatusForLearner

public CourseStatus getCourseStatusForLearner(java.lang.String learnerId,
                                              java.lang.String courseId)
                                       throws LearnException
Gets information about a learner's current status in a specific course.

Parameters:
learnerId - The user identifier.
courseId - The course identifier.
Returns:
A CourseStatus object that gives the learner's current status in the course.
Throws:
LearnException - if an error occurs while reading the CourseStatus from the underlying persistence mechanism; most likely wraps another persistence mechanism s