Package org.olat.core.util.notifications

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


    TreeVisitor tv = new TreeVisitor(visitor, course.getRunStructure().getRootNode(), true);
    tv.visitAll();
    // delete assessment notifications
    CourseNode cn = course.getRunStructure().getRootNode();
    CourseEnvironment ce = course.getCourseEnvironment();
    SubscriptionContext sc = new SubscriptionContext(CourseModule.ORES_COURSE_ASSESSMENT, ce.getCourseResourceableId(), cn.getIdent());
    NotificationsManager.getInstance().delete(sc);
   
    clearCalenderSubscriptions(course);
    // delete course configuration
    CourseConfigManagerImpl.getInstance().deleteConfigOf(course);
View Full Code Here


    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
      }
    }
View Full Code Here

  /**
   *
   *
   */
  public void testSubscriptions() {
    SubscriptionContext sc = new SubscriptionContext("Course", new Long(123), "676");
    PublisherData pd = new PublisherData("Forum", "e.g. forumdata=keyofforum", null);

    SubscriptionContext sc2 = new SubscriptionContext("Course2", new Long(123), "6762");
    PublisherData pd2 = new PublisherData("Forum", "e.g. forumdata=keyofforum2", null);

    //Publisher p = nm.getPublisher(sc);
    //assertNull(p);
    DBFactory.getInstance().closeSession();
View Full Code Here

   * Test synchronized 'findOrCreatePublisher' triggered by method 'subscribe'.
   * Start 2 threads which call 'subscribe' with same SubscriptionContext.
   * Breakpoint at doInSync, second thread must wait until thread 1 has released the breakpoint.
   */
  public void testConcurrentFindOrCreatePublisher() {
    final SubscriptionContext sc = new SubscriptionContext("Course", new Long(1238778565), "676");
    final PublisherData pd = new PublisherData("Forum", "e.g. forumdata=keyofforum", null );

    final List<Exception> exceptionHolder = Collections.synchronizedList(new ArrayList<Exception>(1));
    final List<Boolean> statusList = Collections.synchronizedList(new ArrayList<Boolean>(1));

View Full Code Here

TOP

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

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.