Package org.olat.core.util.notifications

Examples of org.olat.core.util.notifications.NotificationsHandler


    notificationsList = man.getValidSubscribers(identity);
    // calc subscriptioninfo for all subscriptions and, if only those with news are to be shown, remove the other ones
    for (Iterator<Subscriber> it_subs = notificationsList.iterator(); it_subs.hasNext();) {
      Subscriber subscriber = it_subs.next();
      Publisher pub = subscriber.getPublisher();
      NotificationsHandler notifHandler = man.getNotificationsHandler(pub);
      SubscriptionInfo subsInfo = notifHandler.createSubscriptionInfo(subscriber, locale, compareDate);
      if (!subsInfo.hasNews()) {
        it_subs.remove();
      }
    }
    return convertNotificationToPortletEntryList(notificationsList);
View Full Code Here


    // calc subscriptioninfo for all subscriptions and, if only those with news are to be shown, remove the other ones
    for (Iterator<Subscriber> it_subs = notificationsList.iterator(); it_subs.hasNext();) {
      Subscriber subscriber = it_subs.next();
      Publisher pub = subscriber.getPublisher();
      try {
        NotificationsHandler notifHandler = man.getNotificationsHandler(pub);
        SubscriptionInfo subsInfo = notifHandler.createSubscriptionInfo(subscriber, locale, compareDate);
        if (!subsInfo.hasNews()) {
          it_subs.remove();
        }
      } catch(Exception e) {
        log.error("Cannot load publisher:" + pub, e);
View Full Code Here

    if (latestEmailed == null) throw new AssertException("compareDate may not be null, use a date from history");
   
    try {
      SubscriptionItem si = null;
      Publisher pub = subscriber.getPublisher();
      NotificationsHandler notifHandler = getNotificationsHandler(pub);
      // do not create subscription item when deleted
      if (isPublisherValid(pub)) {
        if (isLogDebugEnabled()) logDebug("NotifHandler: " + notifHandler.getClass().getName() + " compareDate: " + latestEmailed.toString() + " now: " + new Date().toString(), null);
        SubscriptionInfo subsInfo = notifHandler.createSubscriptionInfo(subscriber, locale, latestEmailed);
        if (subsInfo.hasNews()) {
          String title = getFormatedTitle(subsInfo, subscriber, locale, mimeTypeTitle);
         
          String itemLink = null;
          if(subsInfo.getCustomUrl() != null) {
View Full Code Here

   
    String title = subsInfo.getTitle(mimeType);
    if (StringHelper.containsNonWhitespace(title)) {
      titleSb.append(": ").append(title);
    } else {
      NotificationsHandler notifHandler = getNotificationsHandler(pub);
      String titleInfo = notifHandler.createTitleInfo(subscriber, locale);
      if (StringHelper.containsNonWhitespace(titleInfo)) {
        titleSb.append(": ").append(titleInfo);
      }
    }
   
View Full Code Here

      case 1:
        String containerType = pub.getResName();
        String containerTypeTrans = ControllerFactory.translateResourceableTypeName(containerType, getLocale());
        return containerTypeTrans;
      case 2:
        NotificationsHandler handler = NotificationsManager.getInstance().getNotificationsHandler(pub);
        String title = handler.createTitleInfo(sub, getLocale());
        if(title == null) {
          return "";
        }
        return title;
      default:
View Full Code Here

TOP

Related Classes of org.olat.core.util.notifications.NotificationsHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.