Package de.willuhn.jameica.hbci.passports.rdh.rmi

Examples of de.willuhn.jameica.hbci.passports.rdh.rmi.RDHKey


    I18N i18n = Application.getPluginLoader().getPlugin(HBCI.class).getResources().getI18N();

    Logger.info("open rdh passport");
    try {
 
      RDHKey activeKey = this.key != null ? this.key : RDHKeyFactory.findByKonto(passport != null ? passport.getKonto() : null);
     
      if (activeKey == null)
        throw new ApplicationException(i18n.tr("Keine Schl�ssel-Diskette f�r dieses Konto definiert"));

      String filename = activeKey.getFilename();
     
      File f = new File(filename);
      if (!f.exists())
      {
        InsertKeyDialog kd = new InsertKeyDialog(f);
        Boolean b = (Boolean) kd.open();
        if (b == null || !b.booleanValue())
          throw new OperationCanceledException(i18n.tr("Schl�sseldiskette nicht eingelegt oder nicht lesbar"));
      }
     
      Logger.info("using passport file " + filename);

      String hbciVersion = activeKey.getHBCIVersion();
      if (hbciVersion == null)
      {
        // Bei der Neuerstellung fragen wir immer den User nach der HBCI-Version
        // Wir fragen die HBCI-Version via Messaging ab, damit sie ggf. auch
        // (z.Bsp. vom Payment-Server) automatisch beantwortet werden kann.
        QueryMessage msg = new QueryMessage(passport);
        Application.getMessagingFactory().getMessagingQueue("hibiscus.passport.rdh.hbciversion").sendSyncMessage(msg);
        Object data = msg.getData();
        if (data == null || !(data instanceof String))
          throw new ApplicationException(i18n.tr("HBCI-Version nicht ermittelbar"));
        hbciVersion = (String) msg.getData();
       
        // Wir merken uns die Auswahl damit wir den User nicht immer wieder fragen muessen
        // Siehe auch http://www.onlinebanking-forum.de/phpBB2/viewtopic.php?t=14883
        if (hbciVersion != null)
        {
          Logger.info("storing hbci [" + hbciVersion + "] version for key " + filename);
          activeKey.setHBCIVersion(hbciVersion);
        }
      }

      hbciPassport = activeKey.load();
     
      // Wir speichern die verwendete PIN/TAN-Config im Passport. Dann wissen wir
      // spaeter in den HBCI-Callbacks noch, aus welcher Config der Passport
      // erstellt wurde. Wird z.Bsp. vom Payment-Server benoetigt.
      ((AbstractHBCIPassport)hbciPassport).setPersistentData(CONTEXT_CONFIG,activeKey);
View Full Code Here


  {
    GenericIterator i = getKeys();
    if (!i.hasNext())
      throw new ApplicationException(i18n.tr("Bitte erstellen Sie zuerst eine Schl�sseldiskette"));

    RDHKey key = null;
   

    ArrayList keys = new ArrayList();
    while (i.hasNext())
    {
      key = (RDHKey) i.next();
      if (!key.isEnabled())
        continue;

      // BUGZILLA 173
      Konto[] verdrahtet = key.getKonten();
      if (konto != null && verdrahtet != null && verdrahtet.length > 0)
      {
        for (int j=0;j<verdrahtet.length;++j)
        {
          Konto k = verdrahtet[j];
          if (konto.equals(k))
          {
            Logger.info("found config via account. url: " + key.getFilename());
            return key;
          }
        }
      }
     
View Full Code Here

   
    GenericIterator list = RDHKeyFactory.getKeys();
    List<KeyObject> l = new ArrayList<KeyObject>();
    while (list.hasNext())
    {
      RDHKey key = (RDHKey) list.next();
      l.add(new KeyObject(key));
    }
   
    this.table = new TablePart(l, new Action() {
      public void handleAction(Object context) throws ApplicationException
View Full Code Here

    // Wir ermitteln die Liste der bereits verlinkten Konten
    ArrayList linked = new ArrayList();
    GenericIterator keys = RDHKeyFactory.getKeys();
    while (keys.hasNext())
    {
      RDHKey key = (RDHKey) keys.next();
      if (!key.isEnabled())
        continue;
     
      if (this.myKey != null && this.myKey.equals(key))
        continue; // Das sind wir selbst

      Konto[] konten = key.getKonten();
      if (konten == null || konten.length == 0)
        continue;
      for (int i=0;i<konten.length;++i)
      {
        linked.add(konten[i]);
View Full Code Here

   */
  public HBCIPassport getHBCIPassport() throws RemoteException, ApplicationException, OperationCanceledException
  {
    if (this.passport != null)
      return this.passport;
    RDHKey key = getKey();
    if (key == null)
      throw new ApplicationException(i18n.tr("Kein Schl�ssel ausgew�hlt"));
    this.passport = key.load();
    return this.passport;
  }
View Full Code Here

                             "entfernt. Die Schl�sseldatei selbst bleibt erhalten.");
       
          if (!Application.getCallback().askUser(q))
            return;

          RDHKey k = (RDHKey) context;
          RDHKeyFactory.removeKey(k);
          GUI.startView(View.class,null);
        }
        catch (OperationCanceledException e)
        {
          Logger.info("operation cancelled");
          return;
        }
        catch (ApplicationException ae)
        {
          throw ae;
        }
        catch (Exception e2)
        {
          Logger.error("unable to delete key",e2);
          Application.getMessagingFactory().sendMessage(new StatusBarMessage(i18n.tr("Fehler beim L�schen des Schl�ssels"),StatusBarMessage.TYPE_ERROR));
        }
      }
    },"user-trash-full.png"));

    keyList.setContextMenu(ctx);
   


    // Format fuer aktiv/inaktiv
    keyList.setFormatter(new TableFormatter()
    {
      public void format(TableItem item)
      {
        try
        {
          RDHKey key = (RDHKey) item.getData();
          if (!key.isEnabled())
            item.setForeground(Color.COMMENT.getSWTColor());
        }
        catch (Exception e)
        {
          Logger.error("error while formatting key",e);
View Full Code Here

  /**
   * Startet die Erzeugung eines INI-Briefs.
   */
  public synchronized void startIniLetter()
  {
    RDHKey key = getKey();
    if (key == null)
    {
      Application.getMessagingFactory().sendMessage(new StatusBarMessage(i18n.tr("Bitte w�hlen Sie eine Schl�sseldatei aus"),StatusBarMessage.TYPE_ERROR));
      return;
    }
   
    HBCIPassport passport = null;
    try
    {
      passport = key.load();
      NewKeysDialog d = new NewKeysDialog(passport);
      d.open();
    }
    catch (OperationCanceledException oce)
    {
View Full Code Here

  /**
   * Synchronisiert die Signatur-ID.
   */
  public synchronized void syncSigId()
  {
    RDHKey key = getKey();
    if (key == null)
    {
      Application.getMessagingFactory().sendMessage(new StatusBarMessage(i18n.tr("Bitte w�hlen Sie eine Schl�sseldatei aus"),StatusBarMessage.TYPE_ERROR));
      return;
    }
   
    HBCIPassport passport = null;
    HBCIHandler handler = null;
    try
    {
      String s = i18n.tr("Sind Sie sicher?");
      if (!Application.getCallback().askUser(s))
        return;

      passport = key.load();
      passport.syncSigId();

      QueryMessage msg = new QueryMessage(passport);
      Application.getMessagingFactory().getMessagingQueue("hibiscus.passport.rdh.hbciversion").sendSyncMessage(msg);
      Object data = msg.getData();
View Full Code Here

   * Speichert die Einstellungen fuer den aktuellen Schluessel.
   * @return true, wenn das Speichern erfolgreich war.
   */
  public synchronized boolean handleStore()
  {
    RDHKey key = getKey();
    if (key == null)
    {
      Application.getMessagingFactory().sendMessage(new StatusBarMessage(i18n.tr("Bitte w�hlen Sie eine Schl�sseldatei aus"),StatusBarMessage.TYPE_ERROR));
      return false;
    }

    try
    {
      Konto[] konten = null;
      List checked = getKontoAuswahl().getItems();
      if (checked != null && checked.size() > 0)
        konten = (Konto[]) checked.toArray(new Konto[checked.size()]);
      key.setKonten(konten);
     
      key.setHBCIVersion((String)getHBCIVersion().getValue());
      key.setAlias((String)getAlias().getValue());

     
      HBCIPassport p = getHBCIPassport();
      if (p != null)
      {
View Full Code Here

TOP

Related Classes of de.willuhn.jameica.hbci.passports.rdh.rmi.RDHKey

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.