Package org.olat.group.ui.edit

Examples of org.olat.group.ui.edit.BusinessGroupModifiedEvent


   
    ChiefControllerMessageEvent ccme = new ChiefControllerMessageEvent();
    ccme.setMsg("yes, it is a message");
    System.out.println("result:"+ObjectCloner.deepCopy(ccme));

    BusinessGroupModifiedEvent bgme = new BusinessGroupModifiedEvent("com", new BusinessGroup(){

      public Boolean getAutoCloseRanksEnabled() {
        return null;
      }
View Full Code Here


    }
  }

  public void event(Event event) {
    if (event instanceof BusinessGroupModifiedEvent) {
      BusinessGroupModifiedEvent mev = (BusinessGroupModifiedEvent) event;
      // TODO:fj:b this operation should not be too expensive since many other
      // users have to be served also
      // store the event and apply it only when the component validate event is
      // fired.
      // FIXME:fj:a check all such event that they do not say, execute more than
      // 1-2 db queries : 100 listening users -> 100-200 db queries!
      // TODO:fj:b concept of defering that event if this controller here is in
      // the dispatchEvent - code (e.g. DefaultController implements
      // GenericEventListener)
      // -> to avoid rare race conditions like e.g. dispose->deregister and null
      // controllers, but queue is still firing events
      boolean modified = mev.updateBusinessGroupList(groupList, ident);
      if (modified) tableCtr.modelChanged();
    }
  }
View Full Code Here

      if (!delEvent.targetEquals(businessGroup)) throw new AssertException(
          "receiving a delete event for a olatres we never registered for!!!:" + delEvent.getDerivedOres());
      dispose();

    } else if (event instanceof BusinessGroupModifiedEvent) {
      BusinessGroupModifiedEvent bgmfe = (BusinessGroupModifiedEvent) event;
      if (event.getCommand().equals(BusinessGroupModifiedEvent.CONFIGURATION_MODIFIED_EVENT)) {
        // reset business group property manager
        this.bgpm = new BusinessGroupPropertyManager(this.businessGroup);
        // update reference to update business group object
        this.businessGroup = BusinessGroupManagerImpl.getInstance().loadBusinessGroup(this.businessGroup);
        main.contextPut("BuddyGroup", this.businessGroup);
        TreeModel trMdl = buildTreeModel();
        bgTree.setTreeModel(trMdl);
        if (bgEditCntrllr == null) {
          // change didn't origin by our own edit controller
          getWindowControl().setInfo(translate("grouprun.configurationchanged"));
          bgTree.setSelectedNodeId(trMdl.getRootNode().getIdent());
          mainPanel.setContent(main);
        }
      } else if (bgmfe.wasMyselfRemoved(identity)) {
        //nothing more here!! The message will be created and displayed upon disposing
        dispose();//disposed message controller will be set
      }
    } else if(event instanceof AssessmentEvent) {
      if(((AssessmentEvent)event).getEventType().equals(AssessmentEvent.TYPE.STARTED)) {
View Full Code Here

  @Override
  public void sendGroupChangeEvent(Project project, Long courseResourceableId, Identity identity) {
    ICourse course = CourseFactory.loadCourse(courseResourceableId);
    RepositoryEntry ores = RepositoryManager.getInstance().lookupRepositoryEntry(course, true);
    MultiUserEvent modifiedEvent = new BusinessGroupModifiedEvent(BusinessGroupModifiedEvent.IDENTITY_ADDED_EVENT, project.getProjectGroup(), identity);
    CoordinatorManager.getCoordinator().getEventBus().fireEventToListenersOf(modifiedEvent, ores);
  }
View Full Code Here

        }
        // raise a flag to indicate refresh
        needsRebuildAfterRunDone = true;
      }
    } else if (event instanceof BusinessGroupModifiedEvent) {
      BusinessGroupModifiedEvent bgme = (BusinessGroupModifiedEvent) event;
      Identity identity = uce.getIdentityEnvironment().getIdentity();
      // only do something if this identity is affected by change and the action
      // was adding or removing of the user
      if (bgme.wasMyselfAdded(identity) || bgme.wasMyselfRemoved(identity)) {
        // 1) reinitialize all group memberships
        initGroupMemberships(identity);
        // 2) reinitialize the users roles and rights
        initUserRolesAndRights(identity);
        // 3) rebuild toolboxes with link to groups and tools
        removeAsListenerAndDispose(toolC);
        toolC = initToolController(identity, null);
        Component toolComp = (toolC == null ? null : toolC.getInitialComponent());
        columnLayoutCtr.setCol2(toolComp);
        needsRebuildAfterRunDone = true;
      } else if (bgme.getCommand().equals(BusinessGroupModifiedEvent.GROUPRIGHTS_MODIFIED_EVENT)) {
        // check if this affects a right group where the user does participate.
        // if so, we need
        // to rebuild the toolboxes
        if (PersistenceHelper.listContainsObjectByKey(rightGroups, bgme.getModifiedGroupKey())) {
          // 1) reinitialize all group memberships
          initGroupMemberships(identity);
          // 2) reinitialize the users roles and rights
          initUserRolesAndRights(identity);
          // 3) rebuild toolboxes with link to groups and tools
View Full Code Here

TOP

Related Classes of org.olat.group.ui.edit.BusinessGroupModifiedEvent

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.