Package org.olat.core.util.mail

Examples of org.olat.core.util.mail.MailNotificationEditController


        deleteUserMailCtr.dispose();
      }
      MailTemplate deleteMailTemplate = createMailTemplate(translate(KEY_EMAIL_SUBJECT), translate(KEY_EMAIL_BODY));
      deleteMailTemplate.addToContext("lastloginduration",   Integer.toString(UserDeletionManager.getInstance().getLastLoginDuration() ));
      deleteMailTemplate.addToContext("durationdeleteemail", Integer.toString(UserDeletionManager.getInstance().getDeleteEmailDuration() ));
      deleteUserMailCtr = new MailNotificationEditController(getWindowControl(), ureq, deleteMailTemplate, true);
     
      this.listenTo(deleteUserMailCtr);
      cmc = new CloseableModalController(getWindowControl(), translate("close"), deleteUserMailCtr.getInitialComponent());
      cmc.activate();
    } else {     
View Full Code Here


        .translate("wizard.step3.mail.body", new String[] {
            courseTitle,
            ureq.getIdentity().getUser().getProperty(UserConstants.FIRSTNAME, null) + " "
                + ureq.getIdentity().getUser().getProperty(UserConstants.LASTNAME, null) }));
    if(mailNotificationCtr != null) mailNotificationCtr.dispose();
    mailNotificationCtr = new MailNotificationEditController(getWindowControl(), ureq, mailTempl, false);
    mailNotificationCtr.addControllerListener(this);
    sendNotificationVC = new VelocityContainer("sendnotification", VELOCITY_ROOT + "/sendnotification.html", translator, this);
    sendNotificationVC.put("notificationForm", mailNotificationCtr.getInitialComponent());
    panel.setContent(sendNotificationVC);
  }
View Full Code Here

            //valid selection to be deleted.
            if (removeUserMailDefaultTempl == null) {
              doBuildConfirmDeleteDialog(ureq);
            } else {
              if (addUserMailCtr != null) addUserMailCtr.dispose();
              removeUserMailCtr = new MailNotificationEditController(getWindowControl(), ureq, removeUserMailDefaultTempl, true);             
              this.listenTo(removeUserMailCtr);
              cmc = new CloseableModalController(getWindowControl(), translate("close"), removeUserMailCtr.getInitialComponent());
              cmc.activate();
            }
          }
        }
      }
    } else if (sourceController == removeUserMailCtr) {
      if (event == Event.DONE_EVENT) {
        removeUserMailCustomTempl = removeUserMailCtr.getMailTemplate();
        cmc.deactivate();
        doBuildConfirmDeleteDialog(ureq);
      } else if (event == Event.CANCELLED_EVENT) {
        cmc.deactivate();
      } else {
        throw new RuntimeException("unknown event ::" + event.getCommand());
      }

    } else if (sourceController == usc) {
      if (event == Event.CANCELLED_EVENT) {
        cmc.deactivate();
      } else {
        if (event instanceof SingleIdentityChosenEvent) {
          SingleIdentityChosenEvent singleEvent = (SingleIdentityChosenEvent) event;
          Identity choosenIdentity = singleEvent.getChosenIdentity();
          if (choosenIdentity == null) {
            showError("msg.selectionempty");
            return;
          }
          toAdd = new ArrayList<Identity>();
          toAdd.add(choosenIdentity);
        } else if (event instanceof MultiIdentityChosenEvent) {
          MultiIdentityChosenEvent multiEvent = (MultiIdentityChosenEvent) event;
          toAdd = multiEvent.getChosenIdentities();
          if (toAdd.size() == 0) {
            showError("msg.selectionempty");
            return;
          }
        } else {
          throw new RuntimeException("unknown event ::" + event.getCommand());
        }
        // in both cases continue adding the users or asking for the mail
        // template if available (=not null)
        cmc.deactivate();
        if (addUserMailDefaultTempl == null) {
          doAddIdentitiesToGroup(ureq, toAdd, null);
        } else {
          if (addUserMailCtr != null) addUserMailCtr.dispose();
          addUserMailCtr = new MailNotificationEditController(getWindowControl(), ureq, addUserMailDefaultTempl, true);         
          this.listenTo(addUserMailCtr);
          cmc = new CloseableModalController(getWindowControl(), translate("close"), addUserMailCtr.getInitialComponent());
          cmc.activate();
        }
      }
View Full Code Here

            getWindowControl().setWarning(translate("msg.selectionempty"));
          else {       
            List<Identity> objects = identitiesTableModel.getIdentities(tmse.getSelection());
            toTransfer = objects;
            if (transferMailCtr != null) transferMailCtr.dispose();
            transferMailCtr = new MailNotificationEditController(getWindowControl(), ureq, transferUserMailTempl, true);
            transferMailCtr.addControllerListener(this);
            cmc = new CloseableModalController(getWindowControl(), translate("close"), transferMailCtr.getInitialComponent());
            cmc.activate();
            return; // don't execute super method
          }
View Full Code Here

        // wizard stops here - no mail template to fill out
        fireEvent(ureq, new MultiIdentityChosenEvent(this.oks));
      } else {
        // next step is the notification mail form
        if (mailCtr != null) mailCtr.dispose();
        mailCtr = new MailNotificationEditController(getWindowControl(), ureq, mailTemplate, false);
        mailCtr.addControllerListener(this);
        setNextWizardStep(translator.translate("import.title.email"), mailCtr.getInitialComponent());
      }
    } else if (source == backButton) {
      // go back one step in wizard
View Full Code Here

      public void putVariablesInMailContext(VelocityContext context, Identity identity) {
        // nothing to do
      }
    };
   
    mailCtr = new MailNotificationEditController(getWindowControl(), ureq, mailTempl, false);
    mailCtr.addControllerListener(this);
   
    vcStep3 = new VelocityContainer("replacewizard_step3", VELOCITY_ROOT + "/replacewizard_step3.html", translator, this);
    vcStep3.put("mailform", mailCtr.getInitialComponent());
    this.setNextWizardStep(translator.translate("replace.wizard.title.step3"), vcStep3);
View Full Code Here

        deleteRepositoryMailCtr.dispose();
      }
      MailTemplate deleteMailTemplate = createMailTemplate(pT.translate(KEY_EMAIL_SUBJECT), pT.translate(KEY_EMAIL_BODY));
      deleteMailTemplate.addToContext("lastloginduration",   Integer.toString(RepositoryDeletionManager.getInstance().getLastUsageDuration() ));
      deleteMailTemplate.addToContext("durationdeleteemail", Integer.toString(RepositoryDeletionManager.getInstance().getDeleteEmailDuration() ));
      deleteRepositoryMailCtr = new MailNotificationEditController(getWindowControl(), ureq, deleteMailTemplate, true);
      deleteRepositoryMailCtr.addControllerListener(this);
      cmc = new CloseableModalController(getWindowControl(), pT.translate("close"), deleteRepositoryMailCtr.getInitialComponent());
      cmc.activate();
    } else {
      getWindowControl().setWarning(pT.translate("nothing.selected.msg"));
View Full Code Here

    tableListParticipants.setTableDataModel(listTableData);
  }

  private void createAddedNotificationMail(UserRequest ureq, String subjectStr) {
    MailTemplate mailTempl = denManager.getAddedMailTemplate(ureq, subjectStr, getTranslator());
    addedNotificationCtr = new MailNotificationEditController(getWindowControl(), ureq, mailTempl, false);
    addedNotificationCtr.addControllerListener(this);
    VelocityContainer sendNotificationVC = new VelocityContainer("sendnotification", VELOCITY_ROOT + "/sendnotification.html", getTranslator(), this);
    sendNotificationVC.put("notificationForm", addedNotificationCtr.getInitialComponent());
    notificationCmc = new CloseableModalController(getWindowControl(), "close", sendNotificationVC);
    notificationCmc.activate();
View Full Code Here

    notificationCmc.activate();
  }

  private void createRemovedNotificationMail(UserRequest ureq, String subjectStr) {
    MailTemplate mailTempl = denManager.getRemovedMailTemplate(ureq, subjectStr, getTranslator());
    addedNotificationCtr = new MailNotificationEditController(getWindowControl(), ureq, mailTempl, false);
    addedNotificationCtr.addControllerListener(this);
    VelocityContainer sendNotificationVC = new VelocityContainer("sendnotification", VELOCITY_ROOT + "/sendnotification.html", getTranslator(), this);
    sendNotificationVC.put("notificationForm", addedNotificationCtr.getInitialComponent());
    notificationCmc = new CloseableModalController(getWindowControl(), "close", sendNotificationVC);
    notificationCmc.activate();
View Full Code Here

        deleteGroupMailCtr.dispose();
      }
      MailTemplate deleteMailTemplate = createMailTemplate(pT.translate(KEY_EMAIL_SUBJECT), pT.translate(KEY_EMAIL_BODY));
      deleteMailTemplate.addToContext("lastloginduration",   Integer.toString(UserDeletionManager.getInstance().getLastLoginDuration() ));
      deleteMailTemplate.addToContext("durationdeleteemail", Integer.toString(UserDeletionManager.getInstance().getDeleteEmailDuration() ));
      deleteGroupMailCtr = new MailNotificationEditController(getWindowControl(), ureq, deleteMailTemplate, true);
      deleteGroupMailCtr.addControllerListener(this);
      cmc = new CloseableModalController(getWindowControl(), pT.translate("close"), deleteGroupMailCtr.getInitialComponent());
      cmc.activate();

    } else {
View Full Code Here

TOP

Related Classes of org.olat.core.util.mail.MailNotificationEditController

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.