Package de.bps.olat.util.notifications

Examples of de.bps.olat.util.notifications.SubscriptionProviderImpl


    .getAllRightGroupsFromAllContexts();
    learningGroups.addAll(rightGroups);
    //all learning and right group calendars
    for (BusinessGroup bg : learningGroups) {
      KalendarRenderWrapper calRenderWrapper = calMan.getGroupCalendar(bg);
      SubscriptionProvider subProvider = new SubscriptionProviderImpl(calRenderWrapper);
      SubscriptionContext subsContext = subProvider.getSubscriptionContext();
      Publisher pub = nfm.getPublisher(subsContext);
      if (pub != null) {
        pub.setState(1); //int 0 is OK -> all other is not OK
      }
    }
    //the course calendar
    try {
      /**
       * TODO:gs 2010-01-26
       * OLAT-4947: if we do not have an repo entry we get an exception here.
       * This is normal in the case of courseimport and click canceling.
       */
      course.getCourseTitle();
      KalendarRenderWrapper courseCalendar = calMan.getCourseCalendar(course);
      SubscriptionProvider subProvider = new SubscriptionProviderImpl(courseCalendar, course);
      Publisher pub = nfm.getPublisher(subProvider.getSubscriptionContext());
      if (pub != null) {
        pub.setState(1);
      }
    } catch (AssertException e) {
      //if we have a broken course (e.g. canceled import or no repo entry somehow) skip calendar deletion...
View Full Code Here


   
    //change state of publisher so that notifications of deleted group calendars make no problems
    CalendarManager calMan = CalendarManagerFactory.getInstance().getCalendarManager();
    NotificationsManager nfm = NotificationsManager.getInstance();
    KalendarRenderWrapper calRenderWrapper = calMan.getGroupCalendar(currBusinessGroup);
    SubscriptionProvider subProvider = new SubscriptionProviderImpl(calRenderWrapper);
    SubscriptionContext subsContext = subProvider.getSubscriptionContext();
    Publisher pub = nfm.getPublisher(subsContext);
    if (pub != null) {
      pub.setState(1); //int 0 is OK -> all other is not OK
    }
   
View Full Code Here

    allCalendarWrappers.addAll(importedCalendarWrappers);
    weeklyCalendar = new WeeklyCalendarComponent("weeklyCalendar", allCalendarWrappers, 7, getTranslator());
    weeklyCalendar.addListener(this);

    // subscription, see OLAT-3861
    SubscriptionProvider provider = new SubscriptionProviderImpl(caller, calendarWrappers.get(0));
    subsContext = provider.getSubscriptionContext();
    // if sc is null, then no subscription is desired
    if (subsContext != null) {
      csc = provider.getContextualSubscriptionController(ureq, getWindowControl());
      vcMain.put("calsubscription", csc.getInitialComponent());
    }

    ComponentUtil.registerForValidateEvents(vcMain, this);
View Full Code Here

        for( Object calWrapperObj : calendarWrappers) {
          calWrapper = (KalendarRenderWrapper) calWrapperObj;
          if(affectedCal == calWrapper.getKalendar()) break;
        }
        if(calWrapper != null) {
          SubscriptionProvider provider = new SubscriptionProviderImpl(calWrapper);
          SubscriptionContext tmpSubsContext = provider.getSubscriptionContext();
          NotificationsManager.getInstance().markPublisherNews(tmpSubsContext, ureq.getIdentity());
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of de.bps.olat.util.notifications.SubscriptionProviderImpl

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.