org.olat.course.assessment
Class AssessmentNotificationsHandler

java.lang.Object
  extended by org.olat.course.assessment.AssessmentNotificationsHandler
All Implemented Interfaces:
NotificationsHandler

public class AssessmentNotificationsHandler
extends java.lang.Object
implements NotificationsHandler

Description:
Calculates it the user has any assessment news for the notification system. Currently this checks for new tests

Initial Date: 21-giu-2005

Author:
Roberto Bagnoli

Constructor Summary
AssessmentNotificationsHandler()
          Don't use this! Always use the getInstance() method.
 
Method Summary
 SubscriptionInfo createSubscriptionInfo(Subscriber subscriber, java.util.Locale locale, java.util.Date compareDate)
          pre: the publisher of the subscriber param must be valid!
 java.lang.String createTitleInfo(Subscriber subscriber, java.util.Locale locale)
          get specific titleInfo for this kind of notification a generic approach won't work, so collect info with handlers.
 PublisherData getAssessmentPublisherData(ICourse course, java.lang.String businessPath)
          Return PublisherData instance to use for assessment notification.

PRE CONDITIONS course != null
static AssessmentNotificationsHandler getInstance()
           
 void markPublisherNews(Identity ident, java.lang.Long courseId)
          Signal the NotificationsManagerImpl about assessment news available for a course.

PRE CONDITIONS courseId != null
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssessmentNotificationsHandler

public AssessmentNotificationsHandler()
Don't use this! Always use the getInstance() method. This is only used once by Spring!

Method Detail

getInstance

public static AssessmentNotificationsHandler getInstance()
Returns:
the singleton instance

getAssessmentPublisherData

public PublisherData getAssessmentPublisherData(ICourse course,
                                                java.lang.String businessPath)
Return PublisherData instance to use for assessment notification.

PRE CONDITIONS

Parameters:
course -
the - business path
Returns:
the publisherdata

markPublisherNews

public void markPublisherNews(Identity ident,
                              java.lang.Long courseId)
Signal the NotificationsManagerImpl about assessment news available for a course.

PRE CONDITIONS

Parameters:
courseId - the resourceable id of the course to signal news about
ident - the identity to ignore news for

createSubscriptionInfo

public SubscriptionInfo createSubscriptionInfo(Subscriber subscriber,
                                               java.util.Locale locale,
                                               java.util.Date compareDate)
Description copied from interface: NotificationsHandler
pre: the publisher of the subscriber param must be valid!

Specified by:
createSubscriptionInfo in interface NotificationsHandler
Returns:
the specificNotificationData (never null, but can be a nosubscriptioninfo)
See Also:
org.olat.notifications.NotificationsHandler#createSubscriptionInfo(org.olat.notifications.Subscriber, java.util.Locale, java.util.Date)

createTitleInfo

public java.lang.String createTitleInfo(Subscriber subscriber,
                                        java.util.Locale locale)
Description copied from interface: NotificationsHandler
get specific titleInfo for this kind of notification a generic approach won't work, so collect info with handlers.

Specified by:
createTitleInfo in interface NotificationsHandler
Returns: