Ejemplo n.º 1
0
  /** @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) */
  public void actionPerformed(ActionEvent evt) {
    setEnabled(false);
    // check if we are online
    if (ConnectionStateImpl.getInstance().isOnline() == false) {
      // offline -> go online
      ConnectionStateImpl.getInstance().setOnline(true);
    }

    // get outbox folder
    OutboxFolder folder = (OutboxFolder) FolderTreeModel.getInstance().getFolder("103");

    // create referenc
    MailFolderCommandReference r = new MailFolderCommandReference(folder);

    // start command
    SendAllMessagesCommand c = new SendAllMessagesCommand(this, r);

    CommandProcessor.getInstance().addOp(c);
  }
Ejemplo n.º 2
0
  public void wizardFinished(WizardModelEvent e) {
    IExtensionHandler pluginHandler = (IExtensionHandler) data.getData("Plugin.handler");
    AbstractMailboxImporter importer = null;
    Object[] args =
        new Object[] {data.getData("Location.destination"), data.getData("Location.source")};

    try {
      IExtension extension = pluginHandler.getExtension((String) data.getData("Plugin.ID"));

      importer = (AbstractMailboxImporter) extension.instanciateExtension(args);
    } catch (PluginException e1) {
      if (Logging.DEBUG) e1.printStackTrace();

      return;
    }

    ImportFolderCommandReference r =
        new ImportFolderCommandReference((IMailFolder) args[0], (File[]) args[1], importer);
    CommandProcessor.getInstance().addOp(new ImportMessageCommand(r));
  }