Package org.olat.admin.securitygroup.gui

Examples of org.olat.admin.securitygroup.gui.IdentitiesMoveEvent


        bgm.removeFromWaitingListAndFireEvent(ureq.getIdentity(), identities, currBusinessGroup, flags);
      }
      fireEvent(ureq, Event.CHANGED_EVENT );
    } else if (source == waitingGruppeController) {
      if (event instanceof IdentitiesMoveEvent) {
        IdentitiesMoveEvent identitiesMoveEvent = (IdentitiesMoveEvent) event;
        BusinessGroupAddResponse response = bgm.moveIdenityFromWaitingListToParticipant(identitiesMoveEvent.getChosenIdentities(), ureq.getIdentity(), currBusinessGroup, flags);
        identitiesMoveEvent.setNotMovedIdentities(response.getIdentitiesAlreadyInGroup());
        identitiesMoveEvent.setMovedIdentities(response.getAddedIdentities());
        // Participant and waiting-list were changed => reload both
        partipGrpCntrllr.reloadData();
        waitingGruppeController.reloadData();
        // send mail for all of them
        MailerWithTemplate mailer = MailerWithTemplate.getInstance();
        MailTemplate mailTemplate = identitiesMoveEvent.getMailTemplate();
        if (mailTemplate != null) {
          MailerResult mailerResult = mailer.sendMailAsSeparateMails(identitiesMoveEvent.getMovedIdentities(), null, null, mailTemplate, null);
          MailHelper.printErrorsAndWarnings(mailerResult, getWindowControl(), ureq.getLocale());
        }
        fireEvent(ureq, Event.CHANGED_EVENT );   
      }
    } else if (source == this.modifyBusinessGroupController) {
View Full Code Here


        fireEvent(urequest, Event.CHANGED_EVENT );     
      } else if (event instanceof IdentitiesRemoveEvent) {
        ProjectBrokerManagerFactory.getProjectGroupManager().removeCandidates(((IdentitiesRemoveEvent)event).getRemovedIdentities(), project);
        fireEvent(urequest, Event.CHANGED_EVENT );
      } else if (event instanceof IdentitiesMoveEvent) {
        IdentitiesMoveEvent identitiesMoveEvent = (IdentitiesMoveEvent) event;
        ProjectBrokerManagerFactory.getProjectGroupManager().acceptCandidates(identitiesMoveEvent.getChosenIdentities(), project, urequest.getIdentity(),
                                    projectBrokerModuleConfiguration.isAutoSignOut(), projectBrokerModuleConfiguration.isAcceptSelectionManually());
        identitiesMoveEvent.setMovedIdentities(identitiesMoveEvent.getChosenIdentities());
        identitiesMoveEvent.setNotMovedIdentities(new ArrayList());
        // send mail for all of them
        MailerWithTemplate mailer = MailerWithTemplate.getInstance();
        MailTemplate mailTemplate = identitiesMoveEvent.getMailTemplate();
        if (mailTemplate != null) {
          List<Identity> ccIdentities = new ArrayList<Identity>();
          if(mailTemplate.getCpfrom()) {
            // add sender as CC
            ccIdentities.add(urequest.getIdentity());
          } else {
            ccIdentities = null
          }
          MailerResult mailerResult = mailer.sendMailAsSeparateMails(identitiesMoveEvent.getMovedIdentities(), ccIdentities, null, mailTemplate, null);
          MailHelper.printErrorsAndWarnings(mailerResult, getWindowControl(), urequest.getLocale());
        }
        fireEvent(urequest, Event.CHANGED_EVENT );   
        // Participant and waiting-list were changed => reload both
        projectMemberController.reloadData();
View Full Code Here

TOP

Related Classes of org.olat.admin.securitygroup.gui.IdentitiesMoveEvent

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.