Package org.olat.core.util.event

Examples of org.olat.core.util.event.MultiUserEvent


   */
  @Override
  @SuppressWarnings("unused")
  protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    Locale loc = I18nManager.getInstance().getLocaleOrDefault(getSelectedLanguage());
    MultiUserEvent mue = new LanguageChangedEvent(loc, ureq);
    ureq.getUserSession().setLocale(loc);
    ureq.getUserSession().putEntry("negotiated-locale", loc);
    OLATResourceable wrappedLocale = OresHelper.createOLATResourceableType(Locale.class);
    ureq.getUserSession().getSingleUserEventCenter().fireEventToListenersOf(mue, wrappedLocale);
    // Update in velocity for flag
View Full Code Here


    } else if (source == testPerf) {
      // send 1000 (short) messages over the cluster bus
      int cnt = 1000;
      long start = System.nanoTime();
      for (int i = 0; i < cnt; i++) {
        clusBus.fireEventToListenersOf(new MultiUserEvent("jms-perf-test-"+i+" of "+cnt),ORES_TEST);
      }
      long stop = System.nanoTime();
      long dur = stop-start;
      double inmilis = dur / 1000000;
      double avg = dur / cnt;
View Full Code Here

  protected void formOK(UserRequest ureq) {
    // update repo entry
    RepositoryManager.getInstance().setDescriptionAndName(entry, displayName.getValue().trim(), description.getValue().trim());
    this.entry = (RepositoryEntry) DBFactory.getInstance().loadObject(entry);
    // inform anybody interrested about this change
    MultiUserEvent modifiedEvent = new EntryChangedEvent(entry, EntryChangedEvent.MODIFIED_DESCRIPTION);
    CoordinatorManager.getCoordinator().getEventBus().fireEventToListenersOf(modifiedEvent, entry);
    // notify parent controller
    fireEvent(ureq, Event.CHANGED_EVENT);
  }
View Full Code Here

   */
  @Override
  protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if(source == langs) {
      Locale loc = I18nManager.getInstance().getLocaleOrDefault(getSelectedLanguage());
      MultiUserEvent mue = new LanguageChangedEvent(loc, ureq);
      setLocale(loc, true);
      ureq.getUserSession().setLocale(loc);
      ureq.getUserSession().putEntry(LocaleNegotiator.NEGOTIATED_LOCALE, loc);
     
      FormLayoutContainer langLayout = (FormLayoutContainer)flc.getFormComponent("langLayout");
View Full Code Here

    } else if (source == glossaryToolCtr) {
      //fire info to IFrameDisplayController
      Long courseID = course.getResourceableId();
      // must work with SP and CP nodes, IFrameDisplayController listens to this event and expects "ICourse" resources.
      String oresName = ICourse.class.getSimpleName();
      ureq.getUserSession().getSingleUserEventCenter().fireEventToListenersOf(new MultiUserEvent(event.getCommand()), OresHelper.createOLATResourceableInstance(oresName, courseID));
    }
  }
View Full Code Here

    return publishTreeModel;
  }

  void changeGeneralAccess(UserRequest ureq, int access){
    RepositoryManager.getInstance().setAccess(repositoryEntry, access);
    MultiUserEvent modifiedEvent = new EntryChangedEvent(repositoryEntry, EntryChangedEvent.MODIFIED_AT_PUBLISH);
    CoordinatorManager.getCoordinator().getEventBus().fireEventToListenersOf(modifiedEvent, repositoryEntry);
  }
View Full Code Here

    ObjectMessage om = (ObjectMessage) message;
    try {
      // unpack
      JMSWrapper jmsWrapper = (JMSWrapper) om.getObject();
      Integer nodeId = jmsWrapper.getNodeId();     
      MultiUserEvent event = jmsWrapper.getMultiUserEvent();
      OLATResourceable ores = jmsWrapper.getOres();
      boolean fromSameNode = clusterConfig.getNodeId().equals(nodeId);

      // update nodeinfo statistics
      NodeInfo nodeInfo = getNodeInfoFor(nodeId);
View Full Code Here

        //if not a course, update the repositoryEntry NOW!
        if(!repositoryEntry.getOlatResource().getResourceableTypeName().equals(CourseModule.getCourseTypeName())) {
          RepositoryManager.getInstance().setProperties(repositoryEntry, propPupForm.canCopy(), propPupForm.canReference(), propPupForm.canLaunch(), propPupForm.canDownload() );   
          RepositoryManager.getInstance().setAccess(repositoryEntry, propPupForm.getAccess());   
          // inform anybody interrested about this change
          MultiUserEvent modifiedEvent = new EntryChangedEvent(repositoryEntry, EntryChangedEvent.MODIFIED);
          CoordinatorManager.getCoordinator().getEventBus().fireEventToListenersOf(modifiedEvent, repositoryEntry);     
          fireEvent(ureq, Event.CHANGED_EVENT);
        }       
        return;
      }
View Full Code Here

          RepositoryManager.getInstance().setProperties(repositoryEntry, propPupForm.canCopy(), propPupForm.canReference(), propPupForm.canLaunch(), propPupForm.canDownload() );   
          RepositoryManager.getInstance().setAccess(repositoryEntry, propPupForm.getAccess());
          repositoryEntry = RepositoryManager.getInstance().lookupRepositoryEntry(repositoryEntry.getKey());
          repositoryEntryChanged = false;
         
          MultiUserEvent modifiedEvent = new EntryChangedEvent(repositoryEntry, EntryChangedEvent.MODIFIED);
          CoordinatorManager.getCoordinator().getEventBus().fireEventToListenersOf(modifiedEvent, repositoryEntry);
         
          // do logging
          ThreadLocalUserActivityLogger.log(LearningResourceLoggingAction.REPOSITORY_ENTRY_PROPERTIES, getClass());
         
View Full Code Here

        pm.updateProperty(p);
      }
     
    });//end syncerCallback
    EventBus eb = CoordinatorManager.getCoordinator().getEventBus();
    MultiUserEvent mue = new MultiUserEvent(message);
    eb.fireEventToListenersOf(mue, INFO_MESSAGE_ORES);
  }
View Full Code Here

TOP

Related Classes of org.olat.core.util.event.MultiUserEvent

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.