Package org.kapott.hbci.passport

Examples of org.kapott.hbci.passport.HBCIPassportChipcard


      return;

    Application.getController().start(new BackgroundTask() {
      public void run(ProgressMonitor monitor) throws ApplicationException
      {
        HBCIPassportChipcard passport = null;
        try
        {
          // Ist hier etwas umstaendlich, weil wir das Handle
          // nicht aufmachen duerfen. Wuerden wir das tun, dann
          // wuerde HBCI4Java automatisch die UPD abrufen wollen,
          // was fehlschlagen wird, wenn wir ungueltige Daten
          // auf der Karte haben. Auf diese Weise hier koennen
          // wir aber die Daten ohne Bank-Kontakt aendern
          AbstractPlugin plugin = Application.getPluginLoader().getPlugin(HBCI.class);
          HBCICallback callback = ((HBCI)plugin).getHBCICallback();
          if (callback != null && (callback instanceof HBCICallbackSWT))
            ((HBCICallbackSWT)callback).setCurrentHandle(new PassportHandleImpl(getConfig()));

          passport = DDVConfigFactory.createPassport(getConfig());

          AccountContainerDialog d = new AccountContainerDialog(passport);
          AccountContainer container = (AccountContainer) d.open();
         
          passport.setBLZ(container.blz);
          passport.setUserId(container.userid);
          passport.setCustomerId(container.customerid);
          passport.setHost(container.host);
          passport.setFilterType(container.filter);
          passport.setCountry(container.country);
         
          passport.saveChanges();
         
         
          passport.saveBankData();
          Application.getMessagingFactory().sendMessage(new StatusBarMessage(i18n.tr("Bankdaten gespeichert"),StatusBarMessage.TYPE_SUCCESS));
        }
        catch (ApplicationException ae)
        {
          Application.getMessagingFactory().sendMessage(new StatusBarMessage(ae.getMessage(),StatusBarMessage.TYPE_ERROR));
        }
        catch (OperationCanceledException oce)
        {
          Logger.info("operation cancelled");
          Application.getMessagingFactory().sendMessage(new StatusBarMessage(i18n.tr("Vorgang abgebrochen"),StatusBarMessage.TYPE_ERROR));
        }
        catch (Exception e)
        {
          if (HBCIProperties.getCause(e,OperationCanceledException.class) != null)
          {
            Logger.info("operation cancelled");
            Application.getMessagingFactory().sendMessage(new StatusBarMessage(i18n.tr("Vorgang abgebrochen"),StatusBarMessage.TYPE_ERROR));
          }
          else
          {
            Logger.error("error while changing bank data",e);
            Application.getMessagingFactory().sendMessage(new StatusBarMessage(i18n.tr("Fehler beim �ndern der Bankdaten: {0}",e.getMessage()),StatusBarMessage.TYPE_ERROR));
          }
        }
        finally
        {
          if (passport != null)
          {
            try
            {
              Logger.info("closing passport");
              passport.close();
            }
            catch (Exception e)
            {
              Logger.error("unable to close passport",e);
            }
View Full Code Here

TOP

Related Classes of org.kapott.hbci.passport.HBCIPassportChipcard

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.