Class Converter

java.lang.Object
de.willuhn.jameica.hbci.server.Converter

public class Converter extends Object
Hilfeklasse, welche Objekte aus HBCI4Java in unsere Datenstrukturen konvertiert und umgekehrt.
  • Constructor Details

    • Converter

      public Converter()
  • Method Details

    • HBCIUmsatz2HibiscusUmsatz

      public static Umsatz HBCIUmsatz2HibiscusUmsatz(org.kapott.hbci.GV_Result.GVRKUms.UmsLine u) throws RemoteException
      Konvertiert einen einzelnen Umsatz von HBCI4Java nach Hibiscus. Wichtig: Das zugeordnete Konto wird nicht gefuellt. Es ist daher Sache des Aufrufers, noch die Funktion umsatz.setKonto(Konto) aufzurufen, damit das Objekt in der Datenbank gespeichert werden kann.
      Parameters:
      u - der zu convertierende Umsatz.
      Returns:
      das neu erzeugte Umsatz-Objekt.
      Throws:
      RemoteException
    • cleanSepaId

      public static String cleanSepaId(String text)
      Bereinigt eine SEPA-Kennung. Bei einem User kam es vor, dass die ID nicht korrekt geparst wurde und daher auch den ganzen Rest des Verwendungszwecks (inclusive aller weiteren SEPA-Tags) enthielt. Ich konnte den Fehler nicht reproduzieren. Damit aber das Abrufen des Umsatzes deswegen nicht fehlschlaegt, kuerzen wir in dem Fall die EndToEnd-ID so weit, dass sie rein passt.
      Parameters:
      text - die SEPA-Kennung.
      Returns:
      die bereinigte SEPA-Kennung.
    • HibiscusUmsatz2HBCIUmsatz

      public static org.kapott.hbci.GV_Result.GVRKUms.UmsLine HibiscusUmsatz2HBCIUmsatz(Umsatz u) throws RemoteException
      Konvertiert einen einzelnen Umsatz von Hibiscus nach HBCI4Java.
      Parameters:
      u - der zu convertierende Umsatz.
      Returns:
      das neu erzeugte Umsatz-Objekt.
      Throws:
      RemoteException
    • HBCIDauer2HibiscusSepaDauerauftrag

      public static SepaDauerauftrag HBCIDauer2HibiscusSepaDauerauftrag(org.kapott.hbci.GV_Result.GVRDauerList.Dauer d) throws RemoteException, de.willuhn.util.ApplicationException
      Konvertiert eine Zeile aus der Liste der abgerufenen SEPA-Dauerauftraege.
      Parameters:
      d - der SEPA-Dauerauftrag aus HBCI4Java.
      Returns:
      Unser Dauerauftrag.
      Throws:
      RemoteException
      de.willuhn.util.ApplicationException
    • HBCIKontoauszug2HibiscusKontoauszug

      public static Kontoauszug HBCIKontoauszug2HibiscusKontoauszug(Konto kt, org.kapott.hbci.GV_Result.GVRKontoauszug.GVRKontoauszugEntry k) throws RemoteException, de.willuhn.util.ApplicationException
      Konvertiert einen abgerufenen Kontoauszug von HBCI4Java in das Format von Hibiscus. Achtung: Die Binaer-Daten werden hierbei ignoriert. Es ist Aufgabe des Aufrufers, die passend zu speichern.
      Parameters:
      kt - das Konto, uber das die Kontoauszuege abgerufen wurden.
      k - der Kontoauszug von HBCI4Java.
      Returns:
      der Kontoauszug von Hibiscus.
      Throws:
      RemoteException
      de.willuhn.util.ApplicationException
    • HibiscusKonto2HBCIKonto

      public static org.kapott.hbci.structures.Konto HibiscusKonto2HBCIKonto(Konto konto) throws RemoteException
      Konvertiert ein Hibiscus-Konto in ein HBCI4Java Konto.
      Parameters:
      konto - unser Konto.
      Returns:
      das HBCI4Java Konto.
      Throws:
      RemoteException
    • HBCIKonto2HibiscusKonto

      public static Konto HBCIKonto2HibiscusKonto(org.kapott.hbci.structures.Konto konto, Class passportClass) throws RemoteException
      Konvertiert ein HBCI4Java-Konto in ein Hibiscus Konto. Existiert ein Konto mit dieser Kontonummer und BLZ bereits in Hibiscus, wird jenes stattdessen zurueckgeliefert.
      Parameters:
      konto - das HBCI4Java Konto.
      passportClass - optionale Angabe einer Passport-Klasse. Ist er angegeben wird, nur dann ein existierendes Konto verwendet, wenn neben Kontonummer und BLZ auch die Klasse des Passport uebereinstimmt.
      Returns:
      unser Konto.
      Throws:
      RemoteException
    • HBCIKonto2HibiscusKonto

      public static Konto HBCIKonto2HibiscusKonto(org.kapott.hbci.structures.Konto konto) throws RemoteException
      Konvertiert ein HBCI4Java-Konto in ein Hibiscus Konto. Existiert ein Konto mit dieser Kontonummer und BLZ bereits in Hibiscus, wird jenes stattdessen zurueckgeliefert.
      Parameters:
      konto - das HBCI4Java Konto.
      Returns:
      unser Konto.
      Throws:
      RemoteException
    • Address2HBCIKonto

      public static org.kapott.hbci.structures.Konto Address2HBCIKonto(Address adresse) throws RemoteException
      Konvertiert einen Hibiscus-Adresse in ein HBCI4Java Konto.
      Parameters:
      adresse - unsere Adresse.
      Returns:
      das HBCI4Java Konto.
      Throws:
      RemoteException
    • HBCIKonto2Address

      public static HibiscusAddress HBCIKonto2Address(org.kapott.hbci.structures.Konto konto, boolean camt) throws RemoteException
      Konvertiert ein HBCI4Java Konto in eine Hibiscus-Adresse.
      Parameters:
      konto - das HBCI-Konto.
      camt - true, wenn es sich um einen CAMT-Umsatz handelt. In dem Fall wird bis auf weiteres erstmal name2 ignoriert. Siehe https://homebanking-hilfe.de/forum/topic.php?p=142206#real142206
      Returns:
      unsere Adresse.
      Throws:
      RemoteException
    • HBCIKonto2Address

      public static HibiscusAddress HBCIKonto2Address(org.kapott.hbci.structures.Konto konto) throws RemoteException
      Konvertiert ein HBCI4Java Konto in eine Hibiscus-Adresse.
      Parameters:
      konto - das HBCI-Konto.
      Returns:
      unsere Adresse.
      Throws:
      RemoteException